Show Sidebar Hide Sidebar

3D Line Charts in Plotly 2.0

How to create a 3D Line Chart.

Step 1

Try an Example

To try an example, select 'Chart Type' and a panel will appear with chart type options. Once you locate the 3D line icon under the '3d'column, you can check out an example before adding your own data by clicking the little graph icon that will show what a sample chart looks like after adding data and playing with the style. You'll also see what labels and style attributes were selected for this specific chart, as well as the end result.

Try an Example

You can also use the data featured in this tutorial by clicking on 'Open This Data in Plotly' on the left-hand side. It'll open in your workspace.

Open data

Step 2

Add Your Data to Plotly

Head to Plotly’s new online workspace and add your data. You have the option of typing directly in the grid, uploading your file, or entering a URL of an online dataset. Plotly accepts .xls, .xlsx, or .csv files. For more information on how to enter your data, see this tutorial.

In this tutorial, we will use a bsic dataset that is available via Plotly's dataset repo. Simply copy the URL and then navigate back to the Plotly workspace. Now, click 'IMPORT', select the 'By URL' tab, and paste in the the URL.

Add Data

Step 3

Create Your Chart

After adding your own data, go to GRAPH on the left-hand side, then 'Create'. Choose '3D Line' in the '3d' column.

Chart Type

Now in the trace panel, you can enter the X, Y, and Z values via the dropdowns to create the plot.

Add XYZ values

Optionally, if you have an additional column such as color you can add it in the same trace panel, again via the dropdown.

Add color

Step 4

Style a Chart

After creating your chart and you can see the data, go to STYLE on the left-hand-side. Here, you have multiple options for styling your plot. In this tutorial, we will just select two basic stylings. Namely, add a chart title and axis titles.

Style options

Following the instructions above, select the STYLE tab and then 'Layout'. In the panel to the right select 'Titles and Fonts'. Now enter '3D Line Chart' in the available text box. Optionally, you can make this bold, italic, and change fonts. In addition, you can use latex or edit the text in HTML.

Add plot title

Alternatively, you can simply click and enter text immediately on the plot where the title would be located.

Click and add title

Staying in the STYLE tab, navigate to 'Axes'. On the right-hand side, select 'title', here you can edit each axis label in the same fashion as previously.

Add axis titles

Step 5

Save and Share

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

Save Button

After giving your file a name, select your PLOT and DATA as 'Public' or 'Private'. For more information on how sharing works, including the difference between private, public and secret sharing, visit this page.

Save Modal

Still need help?
Contact Us

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