New SAS User

Completely new to SAS or trying something new with SAS? Post here for help getting started.
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jawhitmire
Quartz | Level 8

Good day,

 

The following code successfully saves the plot 'gplot##.png' in the desired location on my desktop.

I would like to name the plot something other than 'gplot##.png'.  In the following attempt, I tried to name the png image, 'graph.png'.

What I would like to know is how to specify the name of the 'png' image.

 

filename odsout "C:\Users\jawhitmi\Desktop\";
ods _all_ close;

goptions reset=all border device=png;

proc format;
	value mmm_fmt
	1='Al '
	2='B  '
	3='Ca '
	4='Cl '
	5='Fe '
	6='Li '
	7='Mg '
	8='NO2'
	9='NO3'
	10='Na '
	11='S  '
	12='Si '
	13='TOC'
	14='Ti '
	15='Zn '
	16='Zr '
	;
run;

ods html path=odsout body="graph.png" style=statistical;

title1 "Maximum Ratio of Run 3 over Law 6";

symbol1 interpol=join value=dot;

proc gplot data=work.calc_ratios;
	plot MaxRatio*Compound / hminor=0;
run;

symbol1 interpol=join  width=2 value=circle c=indigo;

legend1 label=none value=(tick=1 "Ug/Ml");

format compound $3.;

quit;

Thank you for your time and feedback.

 

Jane

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:
BODY= refers to the name of the HTML file that will CONTAIN the image file created by PROC GPLOT. So you will NOT be changing the name of the PNG file with this method. Consider this example:
use_name_option.png
The NAME= option inside PROC GPLOT is how you change the name of the PNG file that is created.

 

Cynthia

View solution in original post

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

Hi:
BODY= refers to the name of the HTML file that will CONTAIN the image file created by PROC GPLOT. So you will NOT be changing the name of the PNG file with this method. Consider this example:
use_name_option.png
The NAME= option inside PROC GPLOT is how you change the name of the PNG file that is created.

 

Cynthia

jawhitmire
Quartz | Level 8

Hi Cynthia,

 

Thank you for the assistance with SAS ODS.

 

Do you have an example to share?

 

Jane

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1908 views
  • 1 like
  • 2 in conversation