I have two simple questions.
First, is it possible to autosave the figure by "pdf" file? I reviewed your website http://www.ats.ucla.edu/stat/sas/faq/sasgraphs.htm the title is represented as "How can I save a SAS graph to a gif file? ?". However, I cannot find the solution to this problem.
Second, is it possible to create a subplot in SAS?I hope to put first figure in left panel and the secend figure in the right panel. Like in R, we can use par(mfrow)
%%%%%%%%%% In R %%%%%%%%%%%%%%
par(mfrow=c(1,3))#create a 1*3 matrix plot
plot(x=(1:10),y=(2:11), xlab="x", ylab="y")#only dots
plot(x=(1:10),y=(2:11),type="l",lty=4, xlab="x", ylab="y")#only lines
plot(x=(1:10),y=(2:11),type="l",lty=4, xlab="x", ylab="y")#add dots among lines
%%%%%%%%%% In SAS %%%%%%%%%%%
proc gplot data=hw1; *first figure;
proc gplot data=hw2; *second figure;
Investigate using ODS PDF to capture your GPLOT output - visit the SAS support http://support.sas.com/ and use the SEARCH facility or use Google advanced with the argument "save gplot pdf site:sas.com" for topic-related documentation and technical conference papers and sample code snippets.
The web site you referenced is a UCLA web site. Someone there wrote a very nice example. In fact, the answer to how to save your graphic file image to a GIF file -IS- shown:
filename outgraph 'e:\temp\mygraph.gif';
goptions gsfname=outgraph dev=gif373;
The 2 immediately relevant statements (about creating a GIF file) in this example are the FILENAME statement and the GOPTIONS statement. The FILENAME statement establishes the name of the GIF file and the GOPTIONS statement tells SAS to use that location as the storage location for the graphs generated by the PROC GPLOT steps.
In addition to investigating the SAS documentation on the topic, as Scott pointed out, the SAS web site to search is support.sas.com - -and if you search there, you will find that there are a number of ways to generate plots in panels, depending on which version of SAS you are using.
If you are using SAS 8 or SAS 9.1.3 with SAS/Graph, then PROC GPLOT is how you would create your graphs and then you would use PROC GREPLAY to replay them side by side or in an arrangement of your choosing.
If you are using SAS 9.2, then you could use the above methods or you could also use some of the STAT procedures which automatically produce statistical graphic images, related to your analysis. Then, two of the new procedures related to statistical graph production are the new SGPLOT procedure and the SGPANEL procedures.
As for the paneling question, the answer is yes.
If your plots are from a BY group, you can use PROC SGPANEL.
If they are just arbitrary plots of variables from the same data set,
look into using the ODS Graphics Designer which is drag-and-drop (and also can generate the code to create the same plot): http://support.sas.com/resources/papers/proceedings09/198-2009.pdf
If you need to create panels of scatter plots or series plots without classification, you can use PROC SGSCATTER. The Graph Template Langauge (GTL) has the ultimate flexibility for creating ad-hoc panels.