Show Sidebar Hide Sidebar

How to Make Subplots in Plotly 2.0

Create subplots using the Plotly 2.0 data visualization tool

Step 1


The Subplot feature allows you to display multiple plots in a single figure. They can be placed vertically, horizontally, or in a grid.

Step 2

Add Your Data to Plotly

The first step is to head to Plotly’s new online workspace and add your data. It's also a good idea to name your columns beforehand (either by adding your data using Plotly 1.0, or naming them in the CSV or Excel file that you're uploading), and label your axes. This will make selecting specific traces easier.

Import data

Step 3

Create a Plot

After adding your data go to GRAPH on the left-hand side, then 'Create'. Choose your 'Chart type', and add your traces using the X and Y dropdown (this section is different depending on the chart type).

Subplot Trace

Step 4

Select a Subplot

Once you've added your first trace, click the blue '+Trace' button on the right-hand side of the panel to add another. Once that new trace tab opens, click on 'Subplot and Multiple Axes'.

Subplot button

This will open a section where you can select an arrangement for your subplot. As mentioned earlier, you can set them up as stacked or side-by-side.

Subplot arrangement

We want to display four different charts, and we'll start by adding values to our second trace and select the 'Side By Side' arrangement for it, then click CONFIRM. We'll also label the axes right away by clicking and typing directly on them.

Second trace

Before we move on, it's important to mention the 'Undo' button. If you select an arrangement and you change your mind, 'Undo' will cancel the last arrangement selection only.

Undo button

Back to adding another trace! We'll repeat the same step as above by hitting the '+Trace' button, adding our traces, then clicking 'Subplot and Multiple Axes'. For our third trace, we'll select the 'Stacked' arrangement.

Third trace

For our last trace, we'll select the 'Stacked Y-Axis' arrangement. We can select the position by using the 'Current Subplot' dropdown menu. The plot you select from this dropdown will act as the base for the subplot we're adding. Finally, select CONFIRM.

Forth trace

Now each of the four traces has its own plot.


Step 5

Style a Plot

We've styled this plot quite a bit, which includes removing the axes labels (we don't need them anymore), and adding subtitles for each plot with the annotations feature.

Final plot

If you like the way we've styled our plot, see this great tutorial.

Step 6

Save and Share

Your plot is now done! Click SAVE on the left-hand side.

Save main

Give your PLOT and DATA a filename and select the privacy setting. For more information on how sharing works, including the difference between private, public, and secret sharing, visit this page.

Save pop-up

Still need help?
Contact Us

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