If you’re looking for a tutorial on breaking an axis scale, you won’t find it here. Instead you’ll read why breaking an axis is a bad idea, and you’ll get a tutorial in Panel Charts, which are a more effective (and easier) means to show your data.
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.
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.
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 you’ve 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 it’s cumbersome to create and nearly impossible to maintain charts like this.
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 (It’s 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, I’ve 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.
The Final Word
I know everybody’s case is special, and everybody knows better than I do about why using improper techniques is correct in their particular situation. Your boss needs it this way, or it’s a specialized scientific chart, or you don’t see how anybody could be confused, or it’s really really important. However, I am under no obligation to share something that I do not want to share. I do not even have the old tutorial, so I cannot send it to you, nor will I recreate a new version of the tutorial.