Hi everyone,
So, I have this dataset for differnet industries and different years. and I have this simple code to plot trends of industries:
proc gplot data=have;
plot var1*year;
by industry;
run;
I have 18 industries, so the output gives me 18 different graph sheets. Now, I want to write a code to take all of these to a picture. So I have added this code before running the plot:
filename output 'd:\myfile.gif';
goptions device=gif gsfname=output gsfmode=replace;
But, it gives me only one of the industries. My question is that, is there anyway to convert all of 18 graphs to 18 distinct pictures by a simple code?
I really appreciate your helps.
Thanks.
A couple of things.
PROC GREPLAY will allow you to combine the multiple plots.
If you have SAS 9.3 or later, the ODS graphics and the SG procedures have a lot of the combination tools built in. Check out
http://blogs.sas.com/content/graphicallyspeaking/
for some examples.
A couple of things.
PROC GREPLAY will allow you to combine the multiple plots.
If you have SAS 9.3 or later, the ODS graphics and the SG procedures have a lot of the combination tools built in. Check out
http://blogs.sas.com/content/graphicallyspeaking/
for some examples.
Hi, As Doc suggested, there are some very good examples on line. Here is a quick scatter plot that uses PROC SGPANEL to create a paneled plot. With only 3 values for CHOL_STATUS, the panel is small and "auto-arranged" but you can arrange the layout however you want (3 rows of 6 or 6 rows of 3) for your data. The doc shows how to get row-wise or column-wise panels.
Cynthia
ods _all_ close;
ods listing sge=off;
proc sgpanel data=sashelp.heart;
panelby chol_status;
scatter x=ageatdeath y=cholesterol;
run;
I suspect if you are generating HTML output and pay attention to which folder that output goes to, you will find a plethora of PNG files (basically GIF equivalents) all sequentially numbered named gplot.png, gplot2.png, ...
If that location happens to be the temporary work library location don't expect them to survive as SAS shut down, but directing the HTML output to a specific location should let you control where to find them.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.