SUPPORT / SAMPLES & SAS NOTES
 

Support

Sample 49698: Define a discrete attribute map with the Graph Template Language (GTL)

DetailsCodeResultsAboutRate It
Defining a discrete attribute map gives you the ability to control the style element attributes for each possible value of a variable across graphs.

In the sample code on the Full Code tab, the discrete attribute map assigns the fill color for each possible value of the Student variable. This ensures that the fill color for each student value is the same even if all possible values are not present for each value of the BY variable.

In the discrete attribute map definition, the NAME= option assigns the name of the attribute definition. A VALUE statement is defined for each possible value of the discrete variable. The DISCRETEATTRVAR statement creates a link between the discrete map definition and the discrete variable. The ATTRVAR= option specifies the name to associate between the attribute map and the input column. The VAR= option points to the input column that you are associating with the map. The ATTRMAP= option points to the name of the discrete attribute map to use in the program. Colors can be expressed as color names, RGB values, or HLS values.


These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.