Show Sidebar Hide Sidebar

Make a Box Plot in Plotly 1.0

A Step by Step Guide to Making a Box Plot

Make a Box Plot

Points Scored per NBA Game<br>data taken from <i><a href="https://plot.ly/jackp/969">Points Scored by the Top 50 Scoring NBA Players in 2012</a></i>

If you think you want to know more about what box plots are, read this dataliteracy article by Ben Chartoff: Make a Box Plot. Follow along below to make a box plot of your own.

Step 1: Set up the grid

This is one way you could set up Plotly’s grid to make the graph above. Grab the data set here. Data set in grid
Select Box plots from the MAKE A PLOT menu. Box plot in Make a Plot menu
Select Choose as Y for each column and click the blue Plot button in the sidebar to create the chart. (For more help with the grid see Add Data to the Plotly Grid ) Blue plot button

Step 2: Traces

Your plot should look something like this. Open the TRACES popover in the toolbar. Default box plot Traces popover in toolbar
This is what the Mode tab of the TRACES popover should look like for “All Traces (Box)”. We’ve elected to show all points alongside our boxes, not just the outliers. Mode tab show points

Step 3: Style and annotate!

Your plot should look something like this. In order to get the graph at the top of the chart, you’ll need to style it more. Box plot all points Style tab
This is what the Style tab of the TRACES popover should look like for “All Traces (Box)”.We’ve narrowed our boxes, spread them out more, and stroked them with a thinner weight. We’ve also made the accompanying points smaller and more spread-out. Style tab all traces
We’ve also changed the fill color of each trace in the Mode tab of the TRACES popover. This is what the tab looks like for “Carmelo Anthony”. Change fill color
(Alternative: We didn’t, but you can also change the color of the box plot strokes, in the Style tab of the TRACES popover.) How to make a box plot online
Here’s how the LAYOUT popover should look. We’ve nudged the top margin, and we’re giving our chart a grey background. We’ve also changed the font. Layout popover changes Layout margins changes
This is what the Lines tab of the AXES popover looks like for “All Axes”. We’ve made the grid lines white, and the x-axis a little heavier. Lines tab of Axes popover all Axes
This is what the Labels tab of the AXES popover looks like for “X Axis”. We’ve rotated the labels. Lines popover X axis
We’re hiding the legend in the LEGEND popover. Legend popover
We’ve titled our chart and used markup to format our text and source our data, which in this case is another plotly graph: Points Scored by the Top 50 Scoring NBA Players in 2012. New title
Your finished chart should look something like this: Finished chart
Still need help?
Contact Us

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