Example: Horizontal Bar Chart of Mileage by Origin and Type

To create this horizontal bar chart:
  1. In the Tasks section, expand the Graphs folder, and then double-click Simple HBar. The user interface for the Simple HBar task opens.
  2. On the Data tab, select the SASHELP.CARS data set.
    Tip
    If the data set is not available from the drop-down list, click Select a table icon. In the Choose a Table window, expand the library that contains the data set that you want to use. Select the data set for the example and click OK. The selected data set should now appear in the drop-down list.
  3. Assign columns to these roles:
    Role
    Column Name
    Category variable
    Origin
    Response variable
    MPG_City
    Group variable
    Type
  4. To run the task, click Submit SAS Code.
Here are the results:
Example of Horizontal Bar Chart