SAS Tips: High Resolution Graphics

Back


Example of a SAS program that does a high resolution plot on a printer named "smear" by using PROC GPLOT instead of PROC PLOT:
filename grafout pipe 'smear';
goption targetdevice=psl rotate
        gsfname=grafout 
        gsfmode=replace;

title 'Predicted Values for Cortisol Data';
symbol1 i=join c=green w=1 r=467;
proc gplot data=p uniform;
  plot pred*abstime=patno /nolegend;
  by type;
run;
After executing any gplot procedure, you will be able to view the plot in the graph window. Use the window's file menu to print.

To save graphs as postscript file when running batch mode SAS, use the following SAS code:

filename fileref "myfile.ps";
goptions gsfname=fileref device=psl gsfmode=append noprompt;
With these statements, PROC GPLOT results go directly to "myfile.ps". (Note that replace is the other gsfmode.)
Reference
This is supposed to let you save colored postscript graphs to a file in batch mode:
FILENAME GSASFILE 'histcolor.ps';
       GOPTIONS DEVICE=PHASER GACCESS=GSASFILE GSFMODE=APPEND;