Show Sidebar Hide Sidebar

How to Make a Graph with Multiple Axes with Excel

A Step by Step Guide to Making a Graph with Multiple Y Axes with Plotly

Step 1

Upload your Excel data to Plotly's grid

Open the data file for this tutorial in Excel. You can download the file here in CSV format

Excel view

Step 2

Head to Plotly

Head to Plotly's Workspace and sign into your free Plotly account. Go to 'Import,' click 'Upload a file,' then choose your Excel file to upload. Your Excel file will now open in Plotly's grid. For more about Plotly's grid, see this tutorial

Import data

Step 3

Creating Your Chart

Label your columns like we did below. You'll have three y-axis columns (male number, female number, male:female ratio) and one x-axis column (age). Select 'Line plots' from the MAKE A PLOT menu and then click line plot in the bottom left.

Labeling

Your plot would initially look something like this.

Original

Head to the TRACES popover and access Col1 and Col3 from the dropdown menu. For 'Type' you'll want these traces to be bar. For 'Mode' you'll want these traces to be stack. These two traces apply to the first y-axis (the one on the left).

Editing

Now, access your third trace (Col4) and prepare to add the second y-axis. Click 'New Axis/Subplot…'

New Axis

You'll want to apply your new y-axis to the right side of the graph.

Right

Your graph should now look something like this:

Progress

Step 4

Finalizing Your Graph

You might notice that the y-axis is busy with grid lines. Open the AXES popover in the toolbar to clean this up. Select the y-axis and turn grid lines 'off.'

Grid lines

You can adjust the coloring of the traces to your liking or roll with Plotly's defaults. Within the legend on the right side of the graph, you can label your 'line' trace 'Ratio male/female,' Col3 'female,' and Col1 'male.'

We’ve titled our chart. And we’ve linked to our source data in the x-axis label area.

Final

You can download your finished Plotly graph to embed in your Excel workbook. We also recommend including the Plotly link to the graph inside your Excel workbook for easy access to the interactive Plotly version. Get the link to your graph by clicking the 'Share' button. Download an image of your Plotly graph by clicking EXPORT on the toolbar.

To add the Excel file to your workbook, click where you want to insert the picture inside Excel. On the INSERT tab inside Excel, in the ILLUSTRATIONS group, click PICTURE. Locate the Plotly graph image that you downloaded and then double-click it. Notice that we also copy-pasted the Plotly graph link in a cell for easy access to the interactive Plotly version.

Excel

Still need help?
Contact Us

For guaranteed 24 hour response turnarounds, upgrade to our Premium or Enterprise plans.