Show Sidebar Hide Sidebar

Contour Plots in Chart Studio

Create a plot that represents a 3-dimensional surface by plotting on a 2-dimensional grid.

Step 1

Try an Example

Contour plots portray data for three variables in two dimensions and contains a number of contour lines.

After selecting 'Contour' under 'Chart Type', you can check out an example before adding your own data. Clicking the 'try an example' button will show what a sample chart looks like after adding data and playing with the style. You'll also see what values and style attributes were selected for this specific contour plot, as well as the end result.

Example after

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.

Import data main

Step 3

Create a Chart

After adding your own data, choose your 'Chart Type' in the GRAPH section on the left-hand side and select 'Contour'.

Choose chart main

Click on GRAPH on the left-hand side to add your axes to your contour. After selecting 'Contour', you should then fill out the Z, X, and Y dropdown to create the plot. For our plot, we'll add all columns of our data set in the 'Z' matrix.

Adding axes

This will create a raw contour plot, as seen below.

Raw contour

Step 4

Style a Chart

You can choose your colorscale, text position, or typeface. Click on STYLE on the left-hand side to play around with the style of your chart.

To change the color gradients of your contour plot, select ‘Traces’ under the same STYLE tab, and choose the colorscale you want.


You can also change the thickness and color of your contour lines in the THICKNESS bar. We've also played around with the number of contours of our plot.

Contour lines

To add a title to your plot, you can type it directly on the title by double-clicking it.

Type directly title

The same can be done for the axis labels and legend.

Type directly axis

Another option is to visit the 'Layout' section under STYLE, click on 'Text' and enter your title in the box, as shown below. Note that certain typeface are only available with a PRO subscription. Click here to upgrade!

Type in layout panel

Step 5

Save and Share

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

Save main

Give your file a name, then 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 pop-up

Still need help?
Contact Us

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