pharmasug logo

  • Home
  • Conference Schedule
  • Conference Seminars
  • Registration
  • Conference Papers
  • Exhibitors & Sponsors
  • Important Dates
  • Remository
  • PharmaSUG 2010
  • PharmaSUG 2010
  • PharmaSUG 2010
  • PharmaSUG 2010
  • PharmaSUG 2010
  • PharmaSUG 2010
  • PharmaSUG 2010
  • PharmaSUG 2010
  • PharmaSUG 2010
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
 

Menu

Upcoming Conference
Tips and Techniques
Newsletters
Industry Links
SAS Press Releases (Books)
FAQ
Executive Committee
 
Privacy Policy
About PharmaSUG

Copyright © 2004-2009 The Pharmaceutical Industry SAS® Users Group

SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.