SUBGROUP Variable
Positions graphics elements within subgrouped bars of a vertical or horizontal bar chart produced by the GCHART procedure.
| Type: | Numeric or character; must match the type of the SUBGROUP variable used in the GCHART procedure. |
|---|---|
| Length: | Should match the length of the SUBGROUP= variable in the GCHART procedure. |
| Default: | none |
| Restriction: | The bar charts must have been produced using the SUBGROUP= option. |
Table of Contents
Syntax
Variable Values
subgroup-value
references value(s) of the SUBGROUP= variable in the GCHART procedure either as a variable name or as an explicit data value. Subgroup-value can have one of the following forms:
subgroup-variable
the name of a .
subgroup-data-value
a specific numeric data value.
subgroup-data-value
a specific character data value.
Generally, specify a variable name if you want to annotate all of the bars in a horizontal or vertical bar chart. To annotate a bar chart for a specific value of the SUBGROUP variable, specify a specific value.
Details
Using the SUBGROUP Variable
The SUBGROUP variable positions the in subgroup segments in vertical and horizontal bar charts. Using the SUBGROUP variable is similar to using the X and Y variables with data system . For example, in a vertical bar chart that produces a bar for each city in a data set, you can easily label the subgroups in each bar by setting subgroup-variable to the GCHART variable by which the bar is being subgrouped. This variable provides the y coordinate of the label. Therefore, you do not specify a competing value for y, but instead specify y=. or y=y.
The MIDPOINT variable works well with the SUBGROUP variable to provide the x coordinate. In this example, if you set the MIDPOINT variable to the GCHART variable that contains the names of the cities, the MIDPOINT variable provides your x coordinate. Rather than providing the X and Y variables, you would use the SUBGROUP and MIDPOINT variables. Using the SUBGROUP Variable to Position a Label in a Bar Chart shows how the SUBGROUP variable works with the MIDPOINT variable to label the bars of a vertical bar chart.
Using the SUBGROUP Variable to Position a Label in a Bar Chart
The label showing the number of printers sold in Atlanta is positioned by the values that are assigned to these Annotate variables:
- MIDPOINT=CITY (where CITY is a variable in the GCHART data set)
- SUBGROUP=ITEM (where ITEM is a variable in the GCHART data set)
Functions
You can use the SUBGROUP variable only with the data 1, 2, 7, or 8, and with these functions:
| BAR | MOVE | POINT |
| DRAW | PIE | SYMBOL |
| LABEL | PIECNTR |