Data visualization with SAS programming

CGM font for SAS 9.2

Frequent Contributor
Posts: 128

CGM font for SAS 9.2

When I used SAS 9.1.3, I can use the CGM font "hwcgm001" in gplot.
but in SAS 9.2 I can't, no such font in SAS system. So what kind of CGM font we can use? I tried 'arial' but it is not good choice. Any help?

Super Contributor
Posts: 273

Re: CGM font for SAS 9.2

Plenty of question are around your question.
- ods which on? or not

-options gstyle or nogstyle

-your code extract

Now about the use of cgm in 9.2
the first thing i would try is one of the new truetype font of SAS

What about your system option
as fontrendering=host_pixels ?

Are you aware of the existence of device zgif in a ods html context?

I watch the sas answer too after some precisions from your part

Andre Message was edited by: Andre
Frequent Contributor
Posts: 128

Re: CGM font for SAS 9.2


a. no ods.
b. no gstyle
c. just to use gplot with 'cgm' driver for output. and then insert cgm files back to microsoft word.

I am not so sure I am right, but the problem fix.
All fonts work OK now. (note: works OK in word 2003 , but not very nice for 2007)

1. use goption ftext=hwcgm001;
2. use "font=none" in the whole gplot procedure;
3. use "cgm" driver for output, this will "print" an cgm format file to an existed driver address (for example, c:\)

Any suggestion? Thanks!

Posts: 9,040

Re: CGM font for SAS 9.2

My recommendation would be to use ODS RTF, which, I believe creates an EMF or WMF format image that is embedded in the RTF file. Since both Word 2003 and Word 2007 can open and render RTF files, you might like the look better than using the CGM driver without GSTYLE. AND, if you did use GSTYLE, then your ARIAL font (or Albany AMT Freetype font -- installed with SAS 9.2) might look much nicer.

For example:
goptions reset=all ftext="Albany AMT";
options gstyle nodate nonumber center;
ods listing close;

ods rtf file='c:\temp\open_with_Word.rtf';

proc gplot;
plot sales * inventory=region / name='reg';
where region in
('Canada', 'Asia', 'Pacific','Western Europe')
and sales lt 500000;
title f="Albany AMT" 'Selected Regions';

ods _all_ close;

If you do have SAS 9.2, there are lots of improvements to font rendering and style usage that make your output SO much nicer when you do use SAS/GRAPH. Once you get your RTF file opened in Microsoft Word, you should be able to right click on the image and do some minor formatting and resizing of the object in Word.

Ask a Question
Discussion stats
  • 3 replies
  • 3 in conversation