Improving the look of text for SAS/GRAPH

Introduction

Graphs created by SAS/GRAPH have gained the reputation of looking ugly. However, in many cases, this is due to the fonts used. SAS has a lot of its own fonts but these are mostly software fonts and do not look good. You might have used the fonts "simplex" and "duplex" and been disappointed in the results. However, if you are working on a PC, then there are a lot of other fonts you can use and these can look a lot better and give more readable text.

Your source of fonts

If you click on "Start" and then "Control Panel" you will either see just a few categoories or you will see a lot of icons. If you are only seeing a few categories then switch to "Classic View" to see the full list of icons and then double click on "Fonts". You might then want to choose the "Details" view in the "View" pull-down menu. SAS can use a lot of the TrueType fonts you will see listed there. Here you will see some of the fonts that are commony used such as "Arial" and "Times New Roman".

proc gtestit

You can use "proc gtestit" to test out different goptions to see how they affect the look of graphics display. Here is a bit of code you can play around with. Look in the log for the message about where it wrote the html page to. Also, if SAS had a problem with the font as it will use "simplex" in these cases. Note that these TrueType fonts must be specified in single quotes, unlike the sas fonts which do not need quotes. When using a modified font such as "bold" then use a slash before the modifier in this way - 'Arial / Bold'.
 
goptions reset=all dev=html vpos=25 hpos=40 ftext='Arial';

proc gtestit picture=1;
run;

For this particular setting, it created the following html page.

Conclusion

Getting your SAS/GRAPH output to look right requires choosing your goptions carefully and using the best fonts available. Some experimentation is needed.
 


 
 

Go back to the home page.

E-mail the macro and web site author.