Chapter Contents

Previous

Next
SAS/AF Software: Class Dictionary

Controlling Markers in Scatter Plots

Scatter plots display data points with two- or three-dimensional markers. You can control the marker shape, size, and color with the markerShape, markerSize, and markerColor attributes. For example, for a Scatter control named scatter1, the following code sets the marker shape to a triangle:

scatter1.markerShape = 'triangle';

In addition to using the shape, size, and color attributes to control the markers, you can specify a categorical variable whose values control these marker characteristics. To do so, use the attributes shapeVariable, sizeVariable, and colorVariable. For example, the following code specifies variable Month from the data as the variable to control marker shape, so that each month value will be represented by a different marker shape:

scatter1.shapeVariable = 'month';

The attributes that affect the plot markers are used or ignored, depending on whether variables are associated with the marker shape, size, or color. For example, the markerShape attribute determines the shape of plot markers if there is no variable associated with marker shapes. However, if the shapeVariable attribute is used to associate a variable with the marker shapes, then the markerShape attribute is ignored, and the attributes that affect marker shapes are shapeVariable, markerShapeOrder, shapeVariableType, and shapeVariableStatistic.

The following table shows the attributes that control marker shape, size, and color.

Controlling attribute if no variable associated with marker Controlling attributes if variable associated with marker
markerShape shapeVariable, markerShapeOrder, shapeVariableType, and shapeVariableStatistic
markerSize sizeVariable, markerSizeMode, minimumMarkerSize, maximumMarkerSize, sizeVariableType, and sizeVariableStatistic
markerColor colorVariable, colorRange, colorRangeObject, colorVariableType, and colorVariableStatistic

For information on using marker colors to represent the values of a response variable, see Using Color in a Scatter Control.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.