Plotly Tutorial

Plotly is a web-based tool for creating charts. While it has a powerful suite of possibilities that are available for a fee, the free version is excellent for getting started. Charts created and saved with the free version must be public.

  • Navigate to Plotly
  • Create an account by clicking the “Sign In” button
  • Once you’ve created an account, you will land on your Plotly homepage, were you can begin by either clicking the “New” button in the left navigation column or clicking the “Create” button in the header. Rolling over each button will offer you a menu of outputs. Select “Chart.”
  • This will bring you to your creation interface, where you will add your data and customize the look and feel of your chart:
    Plotly Creation Dashboard
  • Import a data set by clicking on the “Import” button in the header. You can download this selection of census data from 1820 in Maryland, either by downloading the file to your computer and then uploading it to Plotly or by giving Plotly the following URL: You’ll notice that this is fairly tidy data.
  • You’ll notice that this tool has a three column interface. The far left menu controls the editing interface that is in the middle column, and the data and the resultant chart are shown in the main column which takes up the bulk of the page.

Create a Bar Chart

  • First, we need select a chart type. We’ve got lots of options, but those listed under the Business categories are the easiest to start. Select Bar Chart. Chart Types
  • The drop down menus for the X and Y axis will allow you to select columns to plot in your chart. Since this data is all from one year, we won’t have a time axis, but if we did we would probably want to anchor that along the X axis. In this case, we should use Area Name, which is the Maryland county for the data. The Y axis is up to you. Select one of the other columns.
  • Label your axes by clicking on the “Style” option in the far left navigation column. There are many choices here that we’ll come back to as the chart becomes more complex. But for now, label X & Y.
  • Now that we’ve got a solid bar chart that shows some factor of population in 1820 by Maryland county, try adding a comparative element. In the far left menu, click “Graph” and then “Create” to return the building menu. Then, click the blue “Trace” button in the creation interface to add a new layer. Select a new column for the Y axis to add a new set of bars to your chart.
  • Returning to the “Style” menu, if you click “Traces” you can adjust the colors for your bars, and decide where you would like them grouped, or stacked.
  • Don’t forget to click in the Title field on your chart to give it a descriptive title.
  • Finally, in the bottom left menu, Save your chart and your data.

Create a scatter plot

  • From the drop down menu attached to your username in the upper right hand corner, select “New Chart.”
  • Again, import your data.
  • The default chart selection is Scatter Plot, so we can leave that.
  • Set your X axis to Area Name and Y axis column.
  • Add traces until you’ve built up the comparative data that you find useful.
  • Label your X and Y axis.
  • Under Styling, Traces, consider your options: Lines? Symbols? Size? Hover text?
  • Save.

You can share your work using a link or an embed code.

Explore the Plotly Tutorials for more help.