Create a Stacked Graph With Multiple Y Axes in Grapher

You can add plots and multiple Y axes to your existing plot to create stacked graphs in Grapher. You can also link axes so that they remain in the same relative position. To stack two graphs in Grapher (using 1 horizontal X axis and 2 stacked Y axes), follow these steps.

1. Create the bottom plot and axes.

  1. Create the appropriate bottom graph. For instance, if the bottom graph should be a bar chart, click the Home | New Graph | Bar | Vertical Bar Chart command (Bar Chart Button).
  2. Select the data file and click Open. The bottom graph is created.
  3. Click to select Y Axis 1 in the Object Manager.
  4. In the Property Manager, click the Axis tab.
  5. Change the Length to a smaller value. (For a normal portrait page layout, you may want to make this 3-4 inches in length.)
  6. Make any other changes to the Bar Chart 1, Y Axis 1, or X Axis 1, as desired. 

Vertical Bar Chart in Grapher
The original graph contains 1 X axis, 1 Y axis, and 1 plot.

 

2. Add a new plot with a new Y axis:

  1. Click anywhere on the graph to select it.
  2. Click the Home | Add to Graph | Plot command ().
  3. In the Select Plot Type dialog, click your desired plot type and then click OK
  4. In the Choose Axes dialog, change Y Axis 1 to Create new axis.
  5. Click the Position button.
  6. In the Position New Axis dialog, click X Axis 1 and select Y Axis 1.
  7. Adjust the length of the new Y axis to 3-4 inches.
  8. Ensure that At the top of is toggled and click OK.
  9. Click OK in the Choose Axes dialog.
  10. Select the data file and click Open. The new plot is added to the original X axis. A new Y axis is now positioned above the first one.
  11. Click Y Axis 2 in the Object Manager to select it.
  12. In the Property Manager, click the Axis tab.
  13. Change the Length to a smaller value, if desired.
  14. To add a space between the two Y axes, change the Y position value to a slightly greater number. 

Stacked graph with multiple Y axes in Grapher
A stacked graph is created with 2 Y axes and 1 X axis. Both plots share the bottom X axis.

 

3. Link the two Y Axes from both graphs (optional):

  1. To keep the new Y axis in the same relative location, click on the Link Axis tab.
  2. Change the Link axis option to Y Axis 1.
  3. Check the boxes next to Link X position and Link Y position. Now, when the bottom Y axis moves, the top Y axis will, as well.
  4. If the axes should always be the same length, check the Link length box. When the bottom Y axis length changes, the top one will, as well.

 

Updated May 2023

Was this article helpful?
7 out of 21 found this helpful

Comments

0 comments

Please sign in to leave a comment.