If you want to plot all the graphs in one file without using ODS, you should add the following line at the beginning of your program.
filename mygraph 'usrroom.ps';
goptions reset=global DEVICE=pscolor gsfmode=append gsfname=mygraph;
**this would generate 3.ext - a postscript file that contains the boxplots ****;
**note that ‘device=PSLEPSFC’ and filename mygraph 'usrroom.eps' ; would result in a eps file with colors**;
**note that ‘device=pscolor’ would result in a graph with colors**;
**if you do not use gsfname option, then sas would name the file by default sasgraph.ps. **;
This would generate a single file postscript(ps) file ‘usrroom.ps’ with all your plots .
inserting ps files in word
Convert ps files to enhanced post script files for inserting into word documents in unix/hsph by typing
convert file.ps file.eps
ps files can be made into a pdf file in unix/hsph by typing
ps2pdf usrroom.ps graphs.pdf
"No device name has been given--please enter device name:"
If you enter ‘ps’ or ‘pscolor’, you would get a postscript file.
If you want to make separate files for each graph it can be done by using goptions before each plot as shown in the following code
If you want to plot separate file for each graph, you should add the following line at the beginning of your program.
filename mygraph '/usr2/users/student/username/graphs';
goptions reset=global DEVICE=html gsfmode=append gsfname=mygraph;
This would generate gif files in files in folder /graphs. gif files are easy to insert in word .
If you want to plot separate pdf file for each graph, you can add the following line at the beginning of each proc gplot command.
filename grafout '1.pdf'; proc gplot data=weights;
goptions device=pdf gsfname=grafout gaccess=sasgastd gsfmode=replace;
symbol value=dot color=purple;
**this would generate 1.pdf file that contains the plots of birth weight with age****;
**However, SAS would automatically map colors to greyscale in this file**
proc gplot data=weights;
A good guide on plotting (pdf) is available here.