HI i am creating graphs using GPLOT , (specifically ploting prices against time) using by statement (Stock name), i get more than 100 graphs and i want to have 10 graphs per page as an output, NEED HELP URGENTLY
You can use GREPLAY to 1) define the page layout for 10 graphs and 2) associate each set of 10 graphs, in turn, to your template. - PG
I al having problems defining the layout can you please guide me how to , because such a template doesnot exist in built in templates , and further more if i use builtin templates it gives me a singe page and not multiple pages
I haven't used GREPLAY in ages. Basically, I never had the patience to get the result that I wanted. I much prefer SGPANEL for this kind of graph layout. Consider :
data test;
call streaminit(87575);
value = 100;
do stock = 1 to 100;
do time = 1 to 20;
value + rand("NORMAL",0,5);
output;
end;
end;
run;
proc sgpanel data=test;
panelby stock / layout=panel rows=5 columns=2;
series x=time y=value;
run;
hth
PG
When you say you want "10 graphs per page as an output", what form do you want this output to be in? ...
A web page, printed page, physical computer screen, pdf document pages, html pages, 10 graphs per png image, other?
PDF document would be fine,
hi ... the attached SAS code produced the attached PDF file (I'm sure Robert will also have ideas) .. the PNG file is just a screen capture of the PDF output
given that you'll accept PDF output, it's easy to place output from SAS/Graph PROCs at various locations on a page using GOPTIONS (vorigin and horigin)
you can also specify the size of the output from SAS/Graph PROCs with GOPTIONS (hsize and vsize)
if you look at any of the maps on this page ... http://www.health.ny.gov/statistics/chac/chds.htm ... the horizontal bar chart and map were placed on the same page using the method shown in the attached SAS code (just scroll down and click on any map link)
hi ... the SAS code is in the TEN_THINGS_SAS.ZIP that's attcahed (along with the PDF and PNG files) to my posting
just in case that's still a problem ...
proc sort data=sashelp.class out=class;
by height;
run;
ods results off;
ods listing close;
* use startpage=never to keep adding to a single page;
ods pdf file='z:\ten_things.pdf' notoc startpage=never;
options orientation=landscape;
* title for all ten "plots";
goptions reset=all border ftext='calibri' htext=2.5;
proc gslide;
title 'TEN "DIFFERENT" THINGS FROM SAS/GRAPH GPLOT AND GSLIDE ON ONE PAGE' ls=2;
run;
quit;
* resize graphics output to 2x3 inches;
goptions reset=all border ftext='calibri' gunit=pct htext=3 hsize=2in vsize=3in;
symbol1 v=dot i=join h=2 c=blue;
axis1 label=(a=90);
* use horigin and vorigin to place output on the page;
* 5 charts from GPLOT;
proc gplot data=class;
title 'PLOT #1' ls=2;
goptions horigin=0.4in vorigin=1.0in;
plot weight*height / vaxis=axis1;
run;
title 'PLOT #2' ls=2;
goptions horigin=2.45in;
plot weight*height / vaxis=axis1;
run;
title 'PLOT #3' ls=2;
goptions horigin=4.5in;
plot weight*height / vaxis=axis1;
run;
title 'PLOT #4' ls=2;
goptions horigin=6.6in;
plot weight*height / vaxis=axis1;
run;
title 'PLOT #5' ls=2;
goptions horigin=8.65in;
plot weight*height / vaxis=axis1;
run;
quit;
* 5 charts from GLSIDE;
proc gslide;
title 'GSLIDE #1' ls=2;
goptions horigin=0.4in vorigin=4.25in;
run;
title 'GSLIDE #2' ls=2;
goptions horigin=2.45in;
run;
title 'GSLIDE #3' ls=2;
goptions horigin=4.5in;
run;
title 'GSLIDE #4' ls=2;
goptions horigin=6.6in;
run;
title 'GSLIDE #5' ls=2;
goptions horigin=8.65in;
run;
quit;
ods pdf close;
ods listing;
ods results;
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 how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.