• JoomlaWorks AJAX Header Rotator
  • JoomlaWorks AJAX Header Rotator
  • JoomlaWorks AJAX Header Rotator
  • JoomlaWorks AJAX Header Rotator
  • JoomlaWorks AJAX Header Rotator
  • JoomlaWorks AJAX Header Rotator
  • JoomlaWorks AJAX Header Rotator
  • JoomlaWorks AJAX Header Rotator
  • JoomlaWorks AJAX Header Rotator
  • JoomlaWorks AJAX Header Rotator
How to quickly improve the appearance of a graph PDF Print E-mail
SAS Tip #135

Default SAS graphics sometimes don’t look as good as a chart from EXCEL. However a few simple statements can rectify this.
Increase Resolution – Use a combination of the graphics options xmax, ymax, xpixels & ypixels.
Use a TrueType (proportional) font – Use the ftext graphic option.
Fix the height of text – when you play with resolutions the text may appear bigger or smaller than you want, so it's good to use the htext option to set the height of text as a percentage of the graphics area.

Basic Code

ods listing close ;
ods html file='c:\test.html' gpath='c:\temp' ;
goptions reset=all ;
proc gplot data=sashelp.air ;
  plot date*air ;
run ;
ods html close ;

Graph Produced

Basic Graph

Enhanced Code

ods listing close ;
ods html file='c:\test.html' gpath='c:\temp' ;
goptions reset=all 
         xmax=8cm ymax=8cm
         xpixels=900 ypixels=900
         ftext='SAS Monospace'
         htext=3pct ;
proc gplot data=sashelp.air ;
  plot date*air ;
run ;
ods html close ;

Graph Produced

Enhanced Graph

Tested under SAS 9.1.3 SP4 using Windows XP Professional
Wood Street Consultants Ltd. | tips AT woodstreet.org.uk | www.woodstreet.org.uk
Last Updated ( Wednesday, 11 October 2006 )