Vous êtes sur la page 1sur 9

Broken Y Axis in an Excel Chart

by Jon Peltier
Friday, November 18th, 2011
Peltier Technical Services, Inc., Copyright 2012.
Licensed under a Creative Commons Attribution-Noncommercial-Share Alike
3.0 Unported License.
If youre looking for a tutorial on breaking an axis scale, you wont find it here.
Instead youll read why breaking an axis is a bad idea, and youll get a tutorial in
Panel Charts, which are a more effective (and easier) means to show your data.

The Problem
People frequently ask how to show vastly different values in a single chart. Usually
they ask because a few very large values (for instance, Paris in June or Madrid in
May in the chart below) overwhelm the other, relatively much smaller, values.

Logarithmic Scale
One suggestion is to use a logarithmic scale. For scientific data presented to
scientific audiences, this is often an excellent suggestion. For the general public,
and for general data, this may not be so useful. Especially in a bar chart, where the
length of bars is important to comprehension, not some mathematical abstraction of
length.

Broken Axis
Another suggestion is to break the axis, so that part of the axis shows the small
values, then another part of the axis shows the large values, with a section of the
axis scale removed. Sounds good, but youve lost any correlation between the large
and small values. Also our eyes are likely to see the two broken bars in the chart
below as only about twice the value of the tallest of the unbroken values (despite
our conscious brains knowing that the axis has been cut).

Another problem with this approach is that its cumbersome to create and nearly
impossible to maintain charts like this.

Panel Chart
A better suggestion than either a log scale or a broken axis is to plot the data in a
panel chart. This chart has two panels, one with an axis that shows all the data, the
other with an axis that focuses on the small values. I generally advise strongly
against using any kind of gradient in a chart, because the gradients are pretty much
meaningless. In this chart, the gradient at the tops of the (truncated) large values
are not meaningless, but are intended to show the large values extending high up
into the clouds.

Making the Panel Chart (Its Easy!)


If you want to play along at home, the data is located in BrokenYData.csv.
The panel chart is really not too complicated. It consists of one set of data plotted
on the primary axis and another set on the secondary axis. The primary axis data
shows all the data using the full Y axis scale.

The secondary axis is scaled to show the smaller values. Note that the two very
large values (>30M) have been truncated at a suitably small value (7.5M).

When seen as part of a panel chart, the primary axis (left of chart) has been scaled
so that its data occupies the top half of the chart.

The secondary axis (right) has been scaled to keep its data within the bottom half of
the chart.

It only takes a little experience, imagination, and knowledge of algebra to choose


suitable scales. Fortunately readers of my blog are gifted in these characteristics.
The first step in creating this panel chart is to plot all six series (primary and
secondary versions of the original three series).

One by one, format the last three series to move them to the secondary axis. Then
rescale the two axes as shown above, to allocate the primary and secondary to
separate panels.

Format the secondary series so they have the same fill colors as the corresponding
primary series.

Clean up the axis labels using custom number formats: [>=0]0,,"M";;; for the
primary axis and [<8000000]0,,"M";;; for the secondary axis. Remove the
redundant legend entries: click once on the legend, then again on the duplicate
label, and press Delete.

As I mentioned, use of gradient fills is usually useless or even harmful formatting.


However, Ive formatted the truncated bars in the bottom panel of this chart to (try
to) indicate that they extend higher than their neighbors, into the clouds. Here are

the settings I used. First I selected just the one data point (bar) by single clicking on
it twice. The first click selects the whole series, the second selects just the one
point. I chose a gradient direction that puts the light end of the bar at the top. I
moved the middle gradient stop to 80%, so the gradient is confined to the very top
of the bar. I set the bottom and middle gradient colors to the fill color of the series,
and I set the top gradient color to white.

Here is the finished panel chart, repeated here for your viewing pleasure.

Read more: Broken Y Axis in an Excel Chart | Peltier Tech Blog | Excel Charts
http://peltiertech.com/WordPress/broken-y-axis-in-excelchart/#ixzz1s5L4HbT4

Vous aimerez peut-être aussi