Show Sidebar Hide Sidebar

# Create a Shaded Region on a Chart with Chart Studio and Excel

A Step-by-Step Guide to Create a Shaded Region on a Chart

Step 1

Open the data file for this tutorial in Excel. You can download the file here in CSV format

Step 2

Step 3

Once you've loaded the data in Chart Studio, label your columns like we did below. You'll have Z scores and probability density as one x-y combination. You'll also have a second x-y combination; this is critical for shading purposes! Then, select 'Line plots' from the CHOOSE PLOT TYPE menu. When you're finished, click on the blue 'LINE PLOT' button in the sidebar.

Your plot would initially look something like this.

In order recreate a typical Standard Normal Probability Density Function graph, we'll smooth out the traces. Head to the 'Traces' menu and select 'All traces' within the drop down menu. Click the 'Style' menu and select the smooth 'Shape' as we highlight in the image below.

Take a moment to resize your plot to something less wide. A width of 800 and a height of 600 seems reasonable. Head to the layout menu to do this.

With our particular data, a normal score range is -1 to 1, so we'll shade that region. Head to the 'Traces' menu and select 'Col4' from the drop down menu. Then, within the 'Fill To' area, select 'Y=0.' Your plot should then look similar to the one below.

For clarification, we'll revist our grid. Since we wanted the region between -1.0 and 1.0 shaded, our second x-y combination contained values up to -1 and 1. If we wanted the region between -1.5 and 1.5 shaded, for instances, we would have included those values in our second x-y combination. We've highlighted the extra steps to illustrate this difference; it all depends on your indivdual shading needs!

Step 4