Shared and Aligned Axes for Multi-Plot Data in Grapher

Generate multiple plots with at least one shared axis in Grapher. This technique is invaluable for highlighting relationships, trends, and correlations across different datasets or aspects of your data while maintaining clear alignment. Crucially, you're not limited to a single plot type; you can combine various visualizations like line plots, bar charts, scatter plots, and more, all while ensuring consistent axis scaling. Whether you're comparing distributions, tracking changes over time, or presenting multi-faceted insights, understanding shared axes will elevate your data storytelling and make your visualizations more impactful and easier to interpret.

ClassScatter-Stack.png
Vertical bar chart overlaid with a line plot in Grapher.png
COvsUSincome_FinalResult.png

 

>>> This page is under active maintenance <<<

 

Topics covered in this article:

Multiple plot types with two shared axes

Multiple plot types with a shared X axes

Shared axes options

Link two Axes from multiple graphs 

Turn on grid line sharing

 

Multiple plot types with two shared axes

Effectively comparing multiple datasets becomes simple when you use shared axes in Grapher. You can display various plot types—like bar charts and line graphs—on the same X and Y axis for perfect alignment. This approach streamlines your data insights and improves readability.

Vertical bar chart overlaid with a line plot in Grapher.png

A graph is created with 1 Y axis and 1 X axis and multiple plots. Both the line plot and bar chart use the same axes.

  1. Create your first plot using any of the Home | New Graph commands.
  2. In the Open Worksheet dialog, select the data file and click Open.
  3. Make any changes to the Bar Chart 1, Y Axis 1, or X Axis 1, as desired. 
    Vertical Bar Chart.PNG
  4. Click anywhere on the graph to select it.
  5. Click the Home| Add to Graph | Plot command ().
  6. In the Select Plot Type dialog, click your desired plot type and then click OK. For this example, we've selected a Line Plot.
  7. In the Choose Axes dialog, be sure to select X Axis 1 and Y Axis 1 and click OK.
    38 - Grapher Plot Constant Value Line Choose Axes.png
  8. Select the data file and click Open. The new plot is added to the original X axis and Y axis.

 

Multiple plots with a shared Y axes  [TOP]

Often, you'll want to compare different aspects of your data that share a common Y-axis, such as depth, categories, or experimental conditions, using similar or different plot types to best represent each measurement. In Grapher, you can easily combine plots like line graphs, bar charts, and scatter plots on the same Y-axis. This technique is incredibly powerful for illustrating relationships and trends across diverse datasets, all while maintaining perfect alignment and easy comparison.

  1. Create the appropriate first graph.
  2. Click to select X Axis 1 in the Object Manager.
  3. In the Property Manager, click the Axis tab.
  4. Change the Length to a smaller value. (For a normal portrait page layout, you may want to make this 3-4 inches in length.)
  5. 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.

  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 to add and then click OK.
  4. In the Choose Axes dialog, change Y Axis 1 to Create new axis.
    New-Y-Axis.png
  5. Click the Position button.
    New-Y-Axis-position.png
  6. In the Position New Axis dialog, click X Axis 1 and select Y Axis 1.
    New-Y-Axis-position-yaxis.png
  7. Ensure that At the top of is toggled and click OK.
    New-Y-Axis-topend.png
  8. Adjust the length of the new Y axis to 3-4 inches.
    New-Y-Axis-length.png
  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.

 

Multiple plot types with a shared X axes  [TOP]

Often, you'll want to compare different aspects of your data that share a common X-axis, such as time, categories, or experimental conditions, while using different plot types to best represent each measurement. In Grapher, you can easily combine plots like line graphs, bar charts, and scatter plots on the same X-axis. This technique is incredibly powerful for illustrating relationships and trends across diverse datasets, all while maintaining perfect alignment and easy comparison.

  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.
  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.

  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 to add and then click OK.
  4. In the Choose Axes dialog, change Y Axis 1 to Create new axis.
    New-Y-Axis.png
  5. Click the Position button.
    New-Y-Axis-position.png
  6. In the Position New Axis dialog, click X Axis 1 and select Y Axis 1.
    New-Y-Axis-position-yaxis.png
  7. Ensure that At the top of is toggled and click OK.
    New-Y-Axis-topend.png
  8. Adjust the length of the new Y axis to 3-4 inches.
    New-Y-Axis-length.png
  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.

 

Shared axes options  [TOP]

Looking to enhance your graph's presentation and analysis? These optional features offer powerful ways to create cohesive and insightful visualizations.

 

Link two Axes from multiple graphs

To effectively display multiple plot types that share one axis but utilize different scales, Grapher offers the ability to Link axes. This feature connects axes, ensuring consistent updates and coordinated changes across your diverse plots. Linking allows control over various aspects, including scaling, tick position, tick mark spacing, limits, and axis length. Any any edits to the controlling axis automatically update all linked axes.

  • Link Axis: Choose which axis acts as the master controller.
  • Scale: Automatically match the scale type (e.g., Linear, Log) of the dependent axis to the controlling axis.
  • Tick Spacing: Keep major tick mark spacing consistent across linked axes.
  • Limits: Synchronize the minimum and maximum display values. You can even set up an equation to transform limits (e.g., converting units).
  • Tick Position: Align the actual tick mark locations between linked axes.
  • Length: Make linked axes the same length as the controlling axis, or apply a scale factor to adjust their length proportionally.
  • X Position: Move linked axes horizontally in sync with the controlling axis.

 

Linking Axes for Unit Conversion

Grapher's linked axis functionality extends to unit conversion, letting you represent the same data in different measurement systems on a single graph. By employing a simple equation, the dependent axis can dynamically transform values from the controlling axis, offering immediate clarity for diverse unit representations like temperature or distance.

MultiAxis-link-units.png
  1. Open your graph with your starting unit, for example Fahrenheit for Y Axis 1.
    MultiAxis-link-units-step1.png
  2. Click anywhere on the graph to select it.
  3. Click Graph Tools | Axis | Y Axis to add a second Y axis.
  4. In the Position Y Axis window select At the right end of, and check the Flip tick marks and labels checkbox.
    MultiAxis-link-units-step4.png
  5. Click OK.
  6. In the Property Manager select the Ticks tab and adjust the major and minor ticks to display as you desire.
  7. In the Property Manager select the Line tab, in the Grid Line Properties section, make sure the checkbox in the Major tick grid line field is unchecked.
  8. In the Property Manager select the Link Axis tab.
  9. In the Axes section, in the Link axis field select Y Axis 1 from the drop down.
  10. In the Length/Position section, in the Y position field click the dropdown and select None.
  11. In the Limits/Spacing section, check the Link limits field.
  12. In the new Limits  Y = F(X) = field input the conversion equation.
    1. For example "(X-32)*(5/9)" to convert from Fahrenheit to Celsius.
  13. Set the axis format and other link axis options as desired.
    1. Make sure your axis titles have the appropriate units displayed.

 

Turn on grid line sharing  [TOP]    [Shared axis options]

To enhance visual comparison and identify relationships across your graphs, you can share grid lines between multiple plots. This feature extends grid lines from one plot to others, providing a consistent visual reference point across all of your plots.

  1. In the Object Manager, click to select the axis whose grid lines you'd like to share.
  2. In the Property Manager, click the Line tab.
  3. In the Grid Line Properties section, in the Parallel axis field, click the drop down and select All parallel axes.
  4. Check the checkboxes in the Major tick grid line and Minor tick grid line as desired.
    • If you'd like the grid lines to appear over the gap between the axes, check the box next to Lines between axes. 

Turn on grid line sharing in Grapher 15 and Older

Grapher 15 and earlier versions did not support this feature. There are two ways to display grid lines across multiple axes in these versions:
  • Method 1: Best for fewer plots or plots that are spaced apart
  • Method 2: Best for many adjacent plots, or for plots in which you want grid lines to appear within the spacing

Method 1: If your plots are spaced out and you don't want grid lines to appear within the spacing, this method will add grid lines to each Y axis.

  1. Click on the X axis to select it.
  2. In the Property Manager, click on the Line tab.
  3. In the Grid Line Properties section, set the Parallel axis to the first Y axis.
  4. Check the box next to Major tick grid line option.
  5. Click the Home | Add to Graph | Axis | X Axis command.
  6. In the Position X Axis dialog, toggle At the top of or At the bottom of and select the second Y axis from the list.
  7. Check the Disable tick marks and Disable labels boxes to turn off the display of tick marks and labels.
  8. Click OK.
  9. Click on the new X axis in either the Object Manager or plot window to select it.
  10. In the Property Manager, click the Link Axis tab.
  11. Click None in the Link axis field and select the first X Axis.
  12. Check the box in the Link axis scale and Link limits fields.
  13. Click on the Line tab.
  14. In the Grid Line Properties sectionchange the Parallel axis to the second Y axis.
  15. Check the box next to the Major tick grid line option.
  16. In the Axis Line Properties section, expand the Axis line properties and change the line Style to Invisible to turn off the axis line display. Only the grid lines remain.
  17. Repeat steps 5-16 for each additional Y axis.

 

Method 2: If you have several plots or want grid lines to appear within your spacing, follow these steps.

  1. Select the graph or an item within the graph.
  2. Click Home | Add to Graph | Axis | Y Axis.
  3. In the Position Y Axis dialog, toggle At the left of, and select the X axis from the list.
  4. Check the Disable tick marks and Disable labels boxes and click OK.
  5. Select the new Y Axis.
  6. Click on the Axis tab in the Property Manager.
  7. Increase the Length until this new axis is the length of all of the other y axes combined.
  8. Click on the Line tab.
  9. In the Axis Line Properties section, expand the Axis line properties and change the line Style to Invisible to turn off the axis line display.
  10. Select the X Axis.
  11. On the Line page in the Property Manager, in the Grid Line Properties section, change the Parallel axis to the new Y axis.
  12. Check the box in the Major ticket grid line field, if needed.


 

 

 

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.