

A grouped bar chart plots numeric values of two categorical variables instead of one. Create a Grouped Bar ChartĪ second common type of bar chart is the grouped bar chart (or clustered bar chart, or multi-series bar chart).

If you need to change this order, for example, from highest frequency to lowest frequency, you need to specify the CATEGORYORDER=-option. Instead, if you want to show the percentage that each category represents, you can use the STAT=-option.Īlso, by default, SAS orders the categories on the X-axis in alphabetical order. For example, the make, model, and type.Īs the image above demonstrates, a default bar chart in SAS shows the frequency of each category. It contains characteristics of 428 different cars from 2004. The CARS dataset is a freely available dataset from the SASHELP library.

#Proc sgplot rename x axis how to#
In this section, we use the CARS dataset to demonstrate how to create a: If your data has subgroups, then you need grouped or stacked bar charts. The height (vertical bar chart) or width (horizontal bar chart) is proportional to the value each group represents.
