Choosing the Aspect Ratio

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

The aspect ratio for a graph is defined as the physical length of the vertical axis divided by the physical length of the horizontal axis. The default aspect ratio in Mathematica is the reciprocal of the golden ratio, about 0.618. This is often adequate but sometimes choosing a suitable aspect ratio can be helpful in obtaining an accurate graphical perception. A modern recommendation (with historical roots going back more than 200 years) is to choose an aspect ratio that makes the average absolute orientation of the line segments composing the graphical elements be visualized close to 45°. This is sometimes called banking to 45° and is built into some statistical software. Using Mathematica, it is usually sufficient to experiment with several choices of the AspectRatio option.

[more]

Explore the choice of aspect ratio for several interesting datasets!

[less]

Contributed by: Ian Mcleod (March 2011)
Open content licensed under CC BY-NC-SA


Snapshots


Details

sunspots:

Wolfer sunspot series, annually 1770–1869. Interesting visual features include cyclic behavior that is unlike a simple sinusoid—the amplitude, phase, and period all vary considerably. The sawtooth asymmetric wave becomes more readily apparent when the aspect ratio is reduced to about 0.25. Banking to 45° would suggest an aspect ratio of about 0.05 but the resolution is not adequate.

lynx:

Lynx trapped annually, MacKenzie River, 1821–1934. Biologists consider the lynx trapped a proxy for the size of the population. Cycles are expected in predator populations. Banking to 45° produces too small an aspect ratio but a relatively low aspect ratio of about 0.2 is suitable.

:

Mauna Loa Atmospheric Concentration, monthly, January 1959 to December 1997. The time plot shows a pronounced upward trend as well as seasonality. The seasonality reflects the seasonality inherent in the vegetation in the Northern Hemisphere. When leaves fall from trees and rot, is released into the atmosphere. Thus, peaks in the winter. Careful examination of this important dataset reveals that the amplitude of the seasonal cycle is slightly increasing and levels rise more slowly than they fall. Banking to 45° would suggest an aspect ratio of about 0.1, which is too small. Using an aspect ratio of about 0.3 is a good compromise between the banking to 45° principle and adequate resolution.

with trend:

The data with a loess linear trend (loess stands for locally weighted scatterplot smoothing). Banking to 45° in this plot produces a much different aspect ratio and reveals that there is an accelerating trend.

ganglion:

Data from 14 cat fetuses. The cp-ratio is the ratio of central ganglion cell density to peripheral, and area is the retinal area. Banking to 45° suggests an aspect ratio of about 1.

The principle of choosing the aspect ratio by banking to 45° is developed in [1] and [2]. The method of computing the average absolute orientation is given in [2, §4.7].

It is pointed out in [3] that Playfair appeared to adopt this principle implicitly more than 200 years ago in [4]. Specifically, [3, p. 29], "One of Playfair's methods for adding impact was the manipulation of the aspect ratio of the plot", and [3, p. 35], "Most of the forty graphs abide by Cleveland's general rule".

The time series were featured in the movie An Inconvenient Truth by Al Gore. Graphical visualization and discussion of this data is given in [1, 3.29] and, more recently, [5].

The ganglion data and its visualization is discussed in [1].

The original source of the lynx data is [6] but it has been discussed by many researchers and mathematical modelers in statistics and applied mathematics. The annual sunspot numbers are available from many sources on the web.

[1] W. S. Cleveland, Visualizing Data, Summit, NJ: Hobart Press, 1993.

[2] W. S. Cleveland, The Elements of Graphing Data, Summit, NJ: Hobart Press, 1994.

[3] H. Wainer, Graphic Discovery: A Trout in the Milk and Other Visual Adventures, Princeton: Princeton University Press, 2005.

[4] W. Playfair, The Commercial and Political Atlas, 3rd ed., London: John Stockdale, 1801.

[5] H. Jeffrey and M. Agrawala, "Multi-Scale Banking to 45 Degrees," IEEE Transactions on Visualization and Computer Graphics (TVCG), 12(5), 2006 pp. 701-708.

[6] C. Elton and M. Nicholson, "The Ten Year Cycle in Numbers of Canadian Lynx," Journal of Animal Ecology, 11, 1942 pp. 215–244.



Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.
Send