SAS Institute. The Power to Know

SAS/GRAPH(R) 9.2 Reference

Previous Page | Next Page

Controlling The Appearance of Your Graphs

Graphical Style Element Reference


The GraphColors Style Element

The GraphColors style element specifies the default colors that are used for different categories of graphical elements. GraphColors Attributes For Device-Based Output lists the style attributes that are defined in the GraphColors style element and the graphical elements that they affect by default.

GraphColors Attributes For Device-Based Output
GraphColors Attribute1 Portion of Graph Affected
gaxis axis lines and tick marks
gborderlines border around the graph wall, legend border, and borders to complete axis frame
gconnectLine line for connecting boxes
gfloor graph floor
ggrid grid lines
glabel axis labels and legend titles
glegend background of the legend
goutline outlines for data primitives such as bars, pie slices, and boxes
gshadow drop shadows used with text
gtext2 graph titles, tick mark values, and legend value descriptions
gwalls frame area in two-dimensional graphs and vertical walls in three-dimensional graphs
gdata1-gdata12

gcdata1-gcdata12

data items; gdata1-gdata12 apply to filled areas; gcdata1-gcdata12 apply to markers and lines
gramp2cstart

gramp2cend

gradient contours, surfaces, continuous choropleth maps, and continuous block maps when areas are not used
gconramp2cstart

gconramp2cend

continuous block maps when areas are used
1 Elements in the GraphColors style element that are not included in this table are used with ODS Graphics output only.

2 The gtext attribute does not affect text that is not rendered as part of the graph. See also "Controlling Titles and Footnotes with Java and ActiveX Devices in HTML Output" in Chapter 9, "Managing Your Graphics With ODS".


The GraphFonts Style Element

The GraphFonts style element specifies the default fonts that are used for different categories of graphical elements. GraphFonts Attributes For Device-Based Output lists the style attributes that are defined in the GraphFonts style element and the graphical elements that they affect by default.

GraphFonts Attributes For Device-Based Output
GraphFonts Attributes* Portion of Graph Affected
GraphDataFont contour labels
GraphValueFont axis tick mark labels, legend value description labels, data values in statistics tables, pie labels, regression equations, data point labels, bar labels
GraphLabelFont axis labels, legend labels, column headings in statistics tables
GraphFootnoteFont footnotes
GraphTitleFont titles
* The GraphUnicode and GraphAnnoFont attributes are used with ODS graphics only.


Font Specifications In The GraphFonts Style Element

Font definitions in the GraphFonts style element can refer to registry entries, they can specify a specific font, or they can specify only a font family. For example:

 'GraphLabelFont' = ("<MTsans-serif>, Arial, sans-serif",10pt,bold) 
      

<MTsans-serif>

specifies the font identified by the MTsans-serif subkey in the SAS registry. The less than and greater than signs tell SAS that this is the name of a subkey in the SAS registry. Because it is the first font listed, SAS uses this font if it can find the font file. To view the font settings in the SAS registry, select ODS [arrow] FONTS in the SAS registry. See "Changing SAS Registry Settings for ODS" in SAS Output Delivery System: User's Guide for more information.

Arial

specifies the Arial font. If SAS cannot find the first font listed, it tries to find the second font listed.

sans-serif

specifies the san-serif font family. If SAS cannot find the specific fonts listed, then it looks for a font in the san-serif font family.

10pt,bold

specifies the weight and type style that should be used.

Note:   SAS might not be able to find a specific font unless it is registered with the FONTREG procedure. The fonts shipped with SAS are already registered. If you want to add additional fonts, see SAS Language Reference: Concepts for information on registering TrueType fonts. See Base SAS Procedures Guide for information on the FONTREG procedure.  [cautionend]


Style Elements that Affect SAS/GRAPH Output

The style elements listed in the following tables affect SAS/GRAPH output and can be used in styles. These tables list each style element, the portion of the graph it affects or was created to use with, and the default attribute values. Attribute values can be changed with PROC TEMPLATE, as described in Using the TEMPLATE Procedure and Example: Modifying a Style Element. For complete documentation on the style attributes that can be specified in each style element, see Style Attributes and Their Values in the section TEMPLATE Procedure: Creating a Style Definition in SAS Output Delivery System: User's Guide.

Device-Based Graph Style Elements: General Graph Appearance
Style Element Portion of Graph Affected Recognized Attributes Attribute Values in DEFAULT Style
Graph graph size and outer border appearance
OutputWidth
OutputHeight
BorderColor
BorderWidth
CellPadding
CellSpacing

not set
not set
inherited
inherited
0
inherited
GraphCharts all charts within the graph
Transparency
BackgroundColor
Gradient_Direction
StartColor
EndColor
BackgroundImage
Image
VerticalAlign
TextAlign

not set
not set
not set
not set
not set
not set
not set
not set
not set
GraphBackground background of the graph
Transparency
BackgroundColor
Gradient_Direction
StartColor
EndColor
BackgroundImage
Image
VerticalAlign
TextAlign

not set
Colors("docbg")
not set
not set
not set
not set
not set
not set
not set
GraphWalls vertical wall(s) bounded by axes
Transparency
BackgroundColor
Gradient_Direction
StartColor
EndColor
BackgroundImage
Image

not set
GraphColors("gwalls")
not set
not set
not set
not set
not set
GraphFloor 2.5D and 3D floor
BackgroundColor
Transparency
Gradient_Direction
StartColor
EndColor
BackgroundImage
Image
VerticalAlign
TextAlign

GraphColors("gfloor")
not set
not set
not set
not set
not set
not set
not set
not set
GraphHeaderBackground background color of the legend title
Color
Transparency

Colors("glegend")
not set
GraphLegendBackground background color of the legend
Color
Transparency

Colors("glegend")
not set
GraphTitleText text font and color for title(s)
Font
or font-attributes*
Color

GraphFonts("GraphTitleFont")
not set
GraphColors("gtext")
GraphFootnoteText text font and color for footnote(s)
Font
or font-attributes*
Color

GraphFonts("GraphFootnoteFont")
not set
GraphColors("gtext")
GraphLabelText text font and color for axis labels and legend titles
Font
or font-attributes*
Color

GraphFonts("GraphLabelFont")
not set
GraphColors(" glabel")
GraphValueText text font and color for axis tick values and legend values
Font
or font-attributes*
Color

GraphFonts("GraphValueFont")
not set
GraphColors("gtext")
GraphDataText text font and color for point and line labels
Font
or font-attributes*
Color

GraphFonts("GraphDataFont")
not set
GraphColors("gtext")
GraphBorderLines border around graph wall, legend border, borders to complete axis frame
Color
LineThickness
LineStyle
GraphColors("gborderlines")
1px
1
GraphOutlines outline properties for fill areas such as bars, pie slices, boxplots, ellipses, and histograms.
Color
LineStyle
LineThickness

GraphColors("outlines")
1
1px
GraphAxisLines X, Y and Z axis lines
Color
LineStyle
LineThickness

GraphColors("gaxis")
1
1px
GraphGridLines horizontal and vertical grid lines drawn at major tick marks
Color
LineStyle
LineThickness
Transparency
displayopts

GraphColors("ggrid")
1
1px
.5
"auto"
DropShadowStyle used with text types
Color

GraphColors("gshadow")
* Font-attributes can be one of the following: FONTFAMILY=, FONTSIZE=, FONTSTYLE=, FONTWEIGHT=.

Style Elements Affecting Device-Based Non-Grouped Graphical Data Representation
Style Element Portion of Graph Affected Default Attributes Attribute Values in DEFAULT Style
GraphConnectLine line for connecting boxes or bars
ContrastColor
LineStyle
LineThickness

GraphColors("connectLine")
1
2px
TwoColorRamp gradient contours, surfaces, markers, and data labels with continuous color response
StartColor
EndColor

GraphColors("gramp2cstart")
GraphColors("gramp2cend")
TwoColorAltRamp line contours, markers, and data labels with segmented range color response
StartColor
EndColor

GraphColors("gconramp2cstart")
GraphColors("gconramp2cend")

Style Elements Affecting Device-Based Grouped Graphical Data Representation
Style Element Portion of Graph Affected Default Attributes Attribute Values in DEFAULT Style
GraphData1 primitives related to 1st grouped data items; Color applies to filled areas; ContrastColor applies to markers and lines.
Color
ContrastColor
MarkerSymbol
LineStyle
MarkerSize
LineThickness
Gradient_Direction
StartColor
EndColor
BackGroundImage
Image

GraphColors("gdata1")
GraphColors("gcdata1")
"circle"
1
not set
not set
not set
not set
not set
not set
not set
GraphData2 primitives related to 2nd grouped data items
Color
ContrastColor
MarkerSymbol
LineStyle
MarkerSize
LineThickness
Gradient_Direction
StartColor
EndColor
BackGroundImage
Image

GraphColors("gdata2")
GraphColors("gcdata2")
"plus"
4
not set
not set
not set
not set
not set
not set
not set
GraphData3 primitives related to 3rd grouped data items
Color
ContrastColor
MarkerSymbol
LineStyle
MarkerSize
LineThickness
Gradient_Direction
StartColor
EndColor
BackGroundImage
Image

GraphColors("gdata3")
GraphColors("gcdata3")
"x"
8
not set
not set
not set
not set
not set
not set
not set
GraphData4 primitives related to 4th grouped data items
Color
ContrastColor
MarkerSymbol
LineStyle
MarkerSize
LineThickness
Gradient_Direction
StartColor
EndColor
BackGroundImage
Image

GraphColors("gdata4")
GraphColors("gcdata4")
"triangle"
5
not set
not set
not set
not set
not set
not set
not set
GraphData5 primitives related to 5th grouped data items
Color
ContrastColor
MarkerSymbol
LineStyle
MarkerSize
LineThickness
Gradient_Direction
StartColor
EndColor
BackGroundImage
Image

GraphColors("gdata5")
GraphColors("gcdata5")
"square"
14
not set
not set
not set
not set
not set
not set
not set
GraphData6 primitives related to 6th grouped data items
Color
ContrastColor
MarkerSymbol
LineStyle
MarkerSize
LineThickness
Gradient_Direction
StartColor
EndColor
BackGroundImage
Image

GraphColors("gdata6")
GraphColors("gcdata6")
"asterisk"
26
not set
not set
not set
not set
not set
not set
not set
GraphData7 primitives related to 7th grouped data items
Color
ContrastColor
MarkerSymbol
LineStyle
MarkerSize
LineThickness
Gradient_Direction
StartColor
EndColor
BackGroundImage
Image

GraphColors("gdata7")
GraphColors("gcdata7")
"diamond"
15
not set
not set
not set
not set
not set
not set
not set
GraphData8 primitives related to 8th grouped data items
Color
ContrastColor
MarkerSymbol
LineStyle
MarkerSize
LineThickness
Gradient_Direction
StartColor
EndColor
BackGroundImage
Image

GraphColors("gdata8")
GraphColors("gcdata8")
not set
20
not set
not set
not set
not set
not set
not set
not set
GraphData9 primitives related to 9th grouped data items
Color
ContrastColor
MarkerSymbol
LineStyle
MarkerSize
LineThickness
Gradient_Direction
StartColor
EndColor
BackGroundImage
Image

GraphColors("gdata9")
GraphColors("gcdata9")
not set
41
not set
not set
not set
not set
not set
not set
not set
GraphData10 primitives related to 10th grouped data items
Color
ContrastColor
MarkerSymbol
LineStyle
MarkerSize
LineThickness
Gradient_Direction
StartColor
EndColor
BackGroundImage
Image

GraphColors("gdata10")
GraphColors("gcdata10")
not set
42
not set
not set
not set
not set
not set
not set
not set
GraphData11 primitives related to 11th grouped data items
Color
ContrastColor
MarkerSymbol
LineStyle
MarkerSize
LineThickness
Gradient_Direction
StartColor
EndColor
BackGroundImage
Image

GraphColors("gdata11")
GraphColors("gcdata11")
not set
2
not set
not set
not set
not set
not set
not set
not set

GraphData12
primitives related to 12th grouped data items
Color
ContrastColor
MarkerSymbol
LineStyle
MarkerSize
LineThickness
Gradient_Direction
StartColor
EndColor
BackGroundImage
Image

GraphColors("gdata12")
GraphColors("gcdata12")
not set
not set
not set
not set
not set
not set
not set
not set
not set

Previous Page | Next Page | Top of Page