How can I create adjacent bar groups from categories in Grapher?

This article explains how to create adjacent bar chart groups from categories in Grapher.
A common desire is to create data from rows instead of columns. For instance, the data may be arranged like:

Data are arranged in rows instead of
columns, as the classes should be the bars.


When data are arranged like this, the data must first be transformed before creating the graph. To transform the data in Grapher, highlight all of the cells and click the Data Tools | Data | Transpose command. This reverses the data so it displays like:

Data are now arranged in columns, allowing
bar charts to be created directly.


To create the bars with the class names as labels:

  1. Highlight columns A through D in the worksheet.
  2. Click the Home | New Graph | Bar | Vertical Bar Chart (Grapher 12 bar chart) command.
  3. In the Object Manager, click on the Bar Chart 1 to select it.
  4. Hold down the CONTROL key and click on Bar Chart 2 and Bar Chart 3. Bar charts 1, 2, and 3 are all now selected.
  5. In the Property Manager, click on the Plot tab.
  6. Change the X column to Row number.
  7. Expand the Width settings and change the Bar width to a smaller value, such as 60%. This makes each bar in the chart thinner. The smaller the value, the thinner the bars.
  8. Change the Stacking option to Adjacent. This places the class 2 and class 3 bars beside the class 1 bars.
  9. Change the Bar overlap to a negative value, such as -25%. This allows a gap to exist between bar charts in the same class. The smaller the value, the larger the gap between bars.
  10. Click off the bars, deselecting everything.


To change the colors of the bars:

  1. Click on Bar Chart 1 in the Object Manager.
  2. Click on the Fill tab in the Property Manager.
  3. Change the Foreground color to the desired color, such as Spring Green.
    1. Repeat steps 1-3 again for the Bar Chart 2 and Bar Chart 3, selecting the desired colors for each, such as Baby Blue and Light Orange.


The axis now needs to be edited to display the class names. To do this:

  1. In the Object Manager, click on the X Axis 1 to select it.
  2. In the Property Manager, click on the Axis tab.
  3. In the Limits section, change the Minimum value to 1.5, to remove some of the white space from the left side of the graph.
  4. Change the Maximum value to 6.5, to remove some of the white space from the right side of the graph.
  5. Click on the Labels tab.
  6. Change the Label source to From worksheet.
  7. Change the Worksheet from None to the data file.
  8. Change the Data column to Row number.
  9. Change the Label column to Column A.

The bar chart is displayed with the class names on the X axis and the bars grouped by the rows.


Updated December 11, 2017

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.