Show Sidebar Hide Sidebar

Box Plots in Plotly 2.0

A convenient way of graphically depicting groups of numerical data through their quartiles.

Step 1

Try an Example

Box plots may have lines extending vertically from the boxes, or whiskers, indicating variability outside the upper and lower quartiles. This type of plot is also known as a box-and-whisker plot or box-and-whisker diagram.

After selecting 'Box plot' 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 chart, 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, go to GRAPH on the left-hand side, then 'Create'. Choose 'Box plot' under 'Chart type'. Note that this chart is only available with a PRO subscription. Click here to upgrade.

Choose chart main

Click on GRAPH on the left-hand side to add your values to your boxed plot. After selecting ‘Box plot', you should then fill out the 'Values' and 'X-Data' dropdown to create the plot.

Values

This will create a raw plot, as seen below. Don't worry, it still needs more work to get it the way you want!

Raw plot

For charts that have many values such as this one, we need to add more data in 'Values'. We do this by clicking on the '+Trace' button at the top rigth-hand side of that pane.

Trace open

You can add as many traces as you need, until your plot is complete!

Finished traces

Step 4

Style a Chart

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

To change the colors of your boxes, select ‘Traces’ under the same STYLE tab, then click on FILL and a color pop-up will appear. As you scroll down that pane, each box will have its own FILL color that you can change. Note that certain colors and typeface are only available with a PRO subscription. Click here to upgrade!

Colour fill

To add a title to your plot, you can type it directly on the title by double-clicking it. The same can be done for the axis labels, and legend.

Type directly

Another option is to visit the 'Layout' section under STYLE, click on 'Text' and enter your title in the box, as shown below.

Type in layout panel

Step 5

Save and Share

Your chart is now done! Click SAVE on the left-hand side, and give your file a name.

Save main

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 pop-up

Still need help?
Contact Us

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