Infinite opportunities?  Endless problems?  Limited resources?  Talk to us!
Operations
Consulting
Software
Consulting
Publishing and
Training
Applied
Solutions
Excel add-ins
and tutorials
Charts Excel and VBA
Case Studies
VBA
tutorials
PowerPoint
Add-Ins
Miscellenia
You are on the Home/Excel/Tutorials/Shaded Band page
Keywords: TQM, track deviation, shaded area (or zone) on x-y chart, colored zone, color zone, colour zone, coloured zone, unstacked area
index.11.gif (4901 bytes)
Figure 1
This suggestion for using unstacked area chart series to create the bands shown in Figure 1 comes from Jon Peltier.  He is a regular contributor to the Excel newsgroups and you can reach him at peltier@home.com    The basic idea is to use a combination chart, with unstacked area chart series for the +/- sigma bands on the primary axes, and XY Scatter for the data on the secondary axes.
index.12.gif (4349 bytes)
Figure 2
The data points for plotting are in A2:A101, and the sigma band data are in C2:K3 as in Figure 2.  In this example, the data are randomly created using the =NORMSINV(RAND()) function.  Of course, in a real application, the data would come from an external source.  Similarly, in this case, the limits for the sigma bands are known to have the value -3, -2, ..., +3.  Alternatively, one could always calculate the limits from the mean and the standard deviation of the sample.
index.13.gif (3686 bytes)
Chart 1
Step 1 (Chart 1): Create a XY Scatter chart of the random data in A2:A101. 
index.14.gif (4470 bytes)
Chart 2
Step 2 (Chart 2): Add the sigma data in C2:K3. This is with the copy/paste special method, adding new series, as columns, with the category values in the first column.
index.15.gif (4782 bytes)
Chart 3
Step 3 (Chart 3):  Assign Series 1 (the random data) to the secondary axes.
index.16.gif (5006 bytes)
Chart 4
Step 4 (Chart 4): Some intermediate housekeeping. Format the Secondary Y axis so that the Value X axis crosses at -5000 (an arbitrarily large number that assures the axis labels and ticks stay at the bottom). The primary X axis crosses the primary Y axis at zero. In Chart Options, add the secondary X axis.  While it is possible to remove the Secondary Y axis, leave it for clarity, and remove it later.
index.17.gif (5446 bytes)
Chart 5
Step 5 (Chart 5): Convert Series 2 to an Unstacked Area type series, the first of the area chart options.
index.18.gif (6634 bytes)
Chart 6
Step 6 (Chart 6): Repeat the Unstacked Area conversion for Series 3 through 9. Luckily, the F4 key works to repeat chart type selection.
index.19.gif (5925 bytes)
Chart 7
Step 7 (Chart 7): Format the area series to indicate deviation from the mean. Series 2 and 6 are filled red for >3 sigma; series 3 and 7 are yellow for >2 sigma; series 4 and 8 are green for >1 sigma; and series 5 and 9 are blue for <1 sigma. In this example, the series have no border, but that's a user preference.
index.20.gif (4901 bytes)
Chart 8
Step 8 (Chart 8): Complete remaining housekeeping:

Delete the legend

In Chart Options finally remove that secondary Y axis; if it's left on the chart, the user must ensure that its scaling matches that of the primary Y axis.*

Format the primary category (X) axis to have no major or minor ticks and no labels.

In the example, the axis line is set to red to show the mean, but that's another user preference.

* There are advantages to splitting the data and the sigma bands to primary and secondary axes. The major one is that as points are added, you do not need to expand the range of dummy points. A major disadvantage of having both Y axes is the need to ensure that both are identically scaled.
 

For custom technology solutions, operations consulting, or training contact web-underscore-contact@tushar-hyphen-mehta-dot-cee-oh-em.
By accessing any page or link on this web site other than this page, you agree to the terms and conditions.

Ads from amazon.com

[Optional] Survey (current rating of site: 3.7 out of 4)  If you will take a moment to provide your comments, it will help improve the site both for you, and for other visitors.

On a scale of 4 (just what I need)
to zero (totally useless)

How do you rate the information

on this page?

  on this site?

[Optional]

Your name
Your email address
Other comments
 
Monitor page
for changes

it's private
by ChangeDetection
A comment selected at random:
Copyright © 2000-2008 Tushar Mehta.
Send comments and suggestions about the web site to webmaster@tushar-hyphen-mehta-dot-cee-oh-em
Last edited September 05, 2009