In both of these graphs that use the DOCIMAGE_SMALLFONT style, the text in the
graph is still legible whether scaling is on or off. Also, more space is available to the
graphical elements in the output.
Controlling Image Resolution
All ODS destinations use a default DPI (dots per inch) setting when creating ODS
Graphics output. By default, LISTING and HTML use 96 dpi, and RTF and PDF use
150 dpi. Graphs that are rendered at higher DPI have greater resolution and larger file
size. Although DPI can be set to large values such as 1200, from a practical standpoint,
settings larger than 300 dpi are seldom necessary for most applications. Also, setting an
unrealistically large DPI like 1200 could cause an out-of-memory condition. Note that
the ODS option for setting DPI is not the same for all destinations. For the LISTING and
HTML destinations, use the IMAGE_DPI= option. For the RTF and PDF destinations,
use the DPI= option.
ods graphics / width=440px height=330px scale=off;
ods html image_dpi=100 style=docimage_smallfont;
proc sgrender data=sashelp.heart template=boxplot;
where status="Dead";
dynamic title="DPI=100";
run;
512 Chapter 24 Managing Your Graphics Output
Here is the result.
ods graphics / width=440px height=330px scale=off;
ods html image_dpi=200 style=docimage_smallfont;
proc sgrender data=sashelp.heart template=boxplot;
where status="Dead";
dynamic title="DPI=200";
run;
Here is the result.
Controlling Image Resolution 513

Get SAS 9.4 Graph Template Language, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.