|
Aspect Ratio and Banking to 45o
Cleveland has shown that we can enhance XY
chart visualization by careful selection of the data rectangle (area
inside axes) height to width (h/w) aspect ratio.
"The aspect ratio is vital because it has a large impact on
our ability to judge rate of change. A number of studies in visual
perception have shown that our ability to judge the relative slopes
of line segments on a graph is maximized when the absolute values of
the orientations of the segments are centered on 45 degrees."
Cleveland
Naomi Robbins, in her book
Creating More
Effective Graphs, points out that 
"... the human eye can judge a 45o
angle with considerable accuracy. Small angle such as 5o
and 10o are much more difficult to judge. Designers
can take advantage of this by changing the aspect ratio of a chart
so that the orientations of line segments are centered at 45o,
[this is] called banking to 45o ".
This page presents Excel workbook examples of Cleveland's aspect
ratio and banking to 45o
techniques.
Sunspot
Trend Example
In The Elements of Graphing Data (page 4), Cleveland uses the 1750-1924 annual sunspot trend to demonstrate
the importance of aspect ratio, showing the same data with plot
aspect ratios (h/w) of 1.0 and 0.055. Cleveland's
charts, reproduced in Excel, are shown on the right.
Sunspots demonstrate a clear cyclical pattern, with cycles averaging 11
years. The lower plot h/w aspect ratio (0.055) shows
that the cycle rise is much faster than the decline, a
pattern not apparent in the upper plot.
In Beautiful Evidence, Tufte (page 60), builds on Cleveland's work
by asking the question "How should a sparkline aspect ratio be
chosen?". Part of Tufte's answer is reproduced
bellow....
".. a graphic's
width/ height [w/h] ratio makes a big difference in displaying data."
...
In general , statistical graphics should be moderately greater in
length than in height. And, as William Cleveland discovered, for
judging slopes and velocities up and down hills in time-series, best
is an aspect ratio that yields hill-slopes averaging 45o,
over all the cycles in the time-series. That is, variations in
slopes are best detected when the slopes are around 45o,
uphill or downhill. ... the aspect ratio should be such that the
time-series graphics tend toward a lumpy profile rather than a
spiky profile .. or a flat profile." Tufte, Beautiful Evidence
CO2 Trend Example
In an excellent article,
Heer and Agrawala
of University of California, Berkeley, further demonstrate the
importance of the aspect ratio to viewer's perception. Basing their
work on Cleveland's earlier work, they present two trend plots for
average monthly CO2 measurements at the Mauna Loa
observatory in Hawaii. The plots show 1959 - 1990 CO2 trends, one with an h/w aspect of 0.85 and the second with an aspect
ratio of 0.127. Their plots have been reproduced in Excel , as shown
on the right.
Review of these two plots of the same CO2
data provide important lessons:
-
There is a noticeable inflection point in the
0.85 h/w aspect ratio plot that is not as apparent in the 0.127
aspect ratio plot.
-
The CO2 data follows a seasonal
cycle, with a gradual rise and sharper decline, the opposite
pattern to what we saw with the sunspot plots.
-
The 0.127 aspect ratio chart shows the different
rise and fall rates of the seasonal cycle better than the 0.85
ratio chart.
Both charts are based on Cleveland's banking to 45o
technique. The upper chart, with the 0.85 h/w aspect
ratio, was developed by fitting a smooth regression curve and using
the banking to 45o of that curve while the 0.127 curve
uses the entire data set to establish the banking to 45o
aspect ratio.
Using Cleveland's Techniques in Excel
Advanced graphical analysis packages like R, S Plus,
SAS include data rectangle aspect ratio control and banking to
45o capabilities. How can Excel Users use Cleveland's
data rectangle aspect ratio and banking to 45o
techniques?
To use Cleveland's techniques in Excel, we need to
be able to do two things:
-
Control Excel Chart Data Rectangle dimensions
-
Calculate banking to 45o aspect ratio
The next two section describe how to implement
Cleveland's technique in Excel. A downloadable copy of my banking_to_45
workbook is available
here.
Controlling Excel Chart Dimensions
Excel's chart object includes
three areas:
- Overall chart area (Title, horizontal & vertical offsets, Plot Area)
- Plot area (Axes marks, labels, area inside axes)
- Data rectangle (actual data area inside axes)
To control the h/w aspect ratio, we must be able to accurately
specify the width and height of the data rectangle. How can we
directly control the dimensions of the data rectangle?
Excel lets Users manually size the chart area and plot area,
Excel
does not let the User directly control the data rectangle aspect
ratio The chart area includes the plot area and titles and offsets,
controlling chart area dimensions does not directly control the data
rectangle dimensions. The
plot area includes the axis tick marks and labels as well as the
data rectangle, so the data rectangle aspect ratio is affected
by both the plot aspect ratio and axis formatting. Differences in X
and Y axis formatting will affect the aspect ratio,.
The data rectangle is the actual graph area inside
the axis lines. By turning off all X and Y axis major and minor tick
formatting, labels and axis titles, we can make the the plot area and data rectangle the same.
We can then use dummy axis series to provide X and Y axis labels and
text boxes to provide axis titles.
To provide data rectangle dimensions based on target h/w
aspect ratio, I have developed a multi step procedure to control the
data rectangle aspect ratio:
- Turn off X and Y axis tick marks and labels and axis titles so that the data
rectangle and plot area are equal.
- Create X and Y dummy axis series
- Run VBA procedure that gets user provided target data
rectangle width, Aspect Ratio and offsets, sets data rectangle
dimensions,
establishes plot area and chart area dimensions based on User input.
The VBA procedure lets me specify the data rectangle width and
desired h/w aspect ratio. The procedure then sizes the data
rectangle - plot area and chart area so that the plot area aspect
ratio meet the required value.
Banking to 45o Calculations
Heer and Agrawala
explain the 12 basic methods for calculating the banking to 45o
aspect ratio. I elected to use the average line segment = 45o
method. I used Excel's Solver to calculate the aspect
ratio that yields an average orientation of 45o.
Here's the link to the
Bank_to_45 Workbook |