ODS graphics uses style information to control the appearance
of the graph. Style definitions contain information about fonts, color,
lines, and markers, and they also contain settings such as font size
and marker size. When a graph is rendered at a size larger or smaller
than its design size, scaling takes place by default.
ods graphics / width=480px height=360px scale=on ;
If you turn off scaling, the font sizes,
marker sizes, and so on, revert to the sizes that are defined in the
style. To accommodate the larger font sizes for the titles, footnotes,
axis labels, tick values, and data labels, the wall area and contained
graphical components automatically shrink.
ods graphics / width=480px height=360px scale=off ;
In general, having the
fonts scale up or down as the graph size increases or decreases is
desirable. However, in some cases you might want greater control of
the font sizes.
The examples in this
document were created with different styles that varied only in the
font sizes that they used. In some cases, smaller graphs look better
when rendered in a smaller set of fonts. The style examples below
use the LISTING style as a parent, but you could use any style as
the parent. The DOCIMAGE style keeps fonts close to the default sizes
and weights, while the DOCIMAGE_SMALL style reduces the font sizes
by a few points.
See Managing the Graph Appearance with Styles for a discussion
of defining you own styles and what parts of the graph are affected
by various style elements.
proc template;
define style docimage;
parent=styles.listing;
style GraphFonts from GraphFonts
"Fonts used in graph styles" /
'GraphDataFont' = ("<sans-serif>, <MTsans-serif>",8pt)
'GraphUnicodeFont' = ("<MTsans-serif-unicode>",10pt)
'GraphValueFont' = ("<sans-serif>, <MTsans-serif>",10pt)
'GraphLabelFont' = ("<sans-serif>, <MTsans-serif>",12pt,bold)
'GraphFootnoteFont' = ("<sans-serif>, <MTsans-serif>",10pt)
'GraphTitleFont' = ("<sans-serif>, <MTsans-serif>",12pt,bold);
end;
define style docimage_small;
parent=styles.listing;
style GraphFonts from GraphFonts
"Fonts used in graph styles" /
'GraphDataFont' = ("<sans-serif>, <MTsans-serif>",6pt)
'GraphUnicodeFont' = ("<MTsans-serif-unicode>",8pt)
'GraphValueFont' = ("<sans-serif>, <MTsans-serif>",8pt)
'GraphLabelFont' = ("<sans-serif>, <MTsans-serif>",8pt,bold)
'GraphFootnoteFont' = ("<sans-serif>, <MTsans-serif>",8pt)
'GraphTitleFont' = ("<sans-serif>, <MTsans-serif>",10pt,bold);
end;
run;
The previous two graphs
were created the DOCIMAGE style. These next two graphs were created
with the DOCIMAGE_SMALL style.
In both of these graphs
that use the DOCIMAGE_SMALL 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.