Show Sidebar Hide Sidebar

Make a Line or Scatter Graph

A Step by Step Guide to Line and Scatter Graphs

Make a Line or Scatter Graph

trace 0, trace 2, trace 1

Step 1: Set up the grid

This is how you would set up Plotly’s grid to make the graph above (data here: https://plot.ly/~cimar/173 . How to make a line graph and scatter plot online
Select “Line plot” from the MAKE A PLOT menu. How to make a line graph and scatter plot online
Click the blue plot button in the sidebar to create the chart. (For more help with the grid see: https://plot.ly/grid How to make a line graph and scatter plot online

Step 2: Setting the traces

Your plot should look something like this. All the traces are line plots with markers. The first step to styling it into the mixed-type graph above is to open the TRACES popover in the toolbar. How to make a line graph and scatter plot online How to make a line graph and scatter plot online
Here’s how the “Mode” tab of the TRACES popover for “trace 0” should look. How to make a line graph and scatter plot online
Here’s how the “Mode” tab of the TRACES popover for “trace 1” should look. Notice that we’ve selected the marker without a line option — this is how you get a scatter plot. How to make a line graph and scatter plot online
Here’s how the “Mode” tab of the TRACES popover for “trace 2” should look. Notice that we’ve selected the line without marker option. How to make a line graph and scatter plot online

Step 3: Style it!

Now your plot should look something like this: a mixed line and scatter plot. We still have some styling to do to get the plot at the top of this tutorial! Open TRACES again. How to make a line graph and scatter plot online
This is how the “Style” tab of the TRACES popover on “trace 0” should look. We’ve smoothed the line, changed the stroke, and made the markers larger. How to make a line graph and scatter plot online
This is how the “Style” tab of the TRACES popover on “trace 1” should look. We’ve changed the stroke and its weight. How to make a line graph and scatter plot online
This is how the “Style” tab of the TRACES popover on “trace 2” should look. We’ve changed the shape of the marker and its outline. How to make a line graph and scatter plot online
This is how the LAYOUT popover should look. We’re giving the plot a grey background. How to make a line graph and scatter plot online
This is how the AXES popover should look. We’re giving the plot white gridlines. How to make a line graph and scatter plot online
We’re hiding our legend in the LEGEND popover. How to make a line graph and scatter plot online
Your finished chart should look something like this. How to make a line graph and scatter plot online
Still need help?
Contact Us

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