Tutorials › Exam PA - Predictive Analytics › Axis Choices That Distort Visual Comparisons

Exam PA · Visualization and Anomaly Detection · Tutorial 161 of 966

Axis Choices That Distort Visual Comparisons

Learn to check how axes and bins affect a visual comparison, and how to choose settings that make differences interpretable.

Beginner 11 min read

What You'll Learn

  • Identify when a truncated baseline exaggerates differences in a bar chart.
  • Calculate how axis ranges and plot heights determine visual distances on linear axes.
  • Distinguish changes in tick spacing from changes in the scale mapping.
  • Compare histogram distributions when bin widths or sample sizes differ.
  • Choose display settings that retain context without hiding important variation.
  • Recognize when a logarithmic axis changes the meaning of visual distance.

Why Axis Choices Matter

A plot can be drawn accurately and still encourage a misleading comparison. A vertical axis that starts near the observed values can make a small difference look dramatic. Separate panels can make equal differences look unequal if their axis ranges or physical heights differ. Histograms can also be hard to compare when their bins have different widths or when one panel shows counts and another shows proportions.

The remedy is not to make every plot use identical settings regardless of purpose. It is to identify what comparison the reader should make, check how the display maps data to visual space, and make relevant scales and bin definitions explicit. This is especially important when communicating model inputs, outcomes, or subgroup summaries to decision-makers.

Definition: On a linear vertical axis with lower limit \(L\), upper limit \(U\), and plot height \(H\), the vertical screen position of a value \(y\), measured upward from the bottom of the plotting region, is proportional to \((y-L)/(U-L)\). Thus a data difference \(\Delta y\) occupies a visual distance proportional to \(H\Delta y/(U-L)\). The axis limits and physical plot height determine this mapping. Tick marks label the scale; changing only their spacing does not change the mapping on a linear axis.

Truncated Axes and Bar Charts

A truncated axis omits part of the value range, often by starting the displayed scale above zero. This can be appropriate for some displays, such as a line graph where the purpose is to inspect small changes and the scale is clearly marked. It requires particular care for bar charts. Bar length encodes magnitude, and readers ordinarily interpret that length from a zero baseline. If the bars begin at a nonzero value, their visible lengths encode only the amounts above the chosen baseline.

A clear axis break does not automatically resolve the issue: readers may still perceive the visible bar lengths as representing the full values. For comparisons of bar magnitudes, show bars from zero, or use a point-and-interval display if a restricted range is needed to make small differences legible. State the axis range and explain what the display encodes.

Worked Example: A Bar Chart That Starts Above Zero

Suppose a hypothetical portfolio report compares two regions’ average annual claim costs, shown as bars: Region A is $84 per exposure and Region B is $90. The chart’s vertical axis starts at $80. Quantify what a viewer sees and compare it with the full-value comparison. Name the method and the mistake it avoids.

Method. Compare the visible bar lengths above the displayed baseline with the full bar lengths from zero. The common mistake is to treat the clipped portions as if they were full bars.

Visible lengths. From the $80 baseline, Region A’s bar is \(84-80=4\) dollars high, and Region B’s is \(90-80=10\) dollars high. Their visible-length ratio is \(10/4=2.5\). The display therefore makes B’s bar look two and a half times as long as A’s.

Full-value comparison. From zero, the bar lengths would be $84 and $90. Their ratio is \(90/84=1.0714\), so B’s value is about 1.0714 times A’s. The absolute difference is \(90-84=6\) dollars; relative to A, the increase is \(6/84=0.0714\), or 7.14%.

Check. The actual difference is $6, and \(84(1.0714)\) is approximately $90. The 2.5 ratio applies only to the truncated visible segments, not to the values. A zero-baseline bar chart preserves the magnitude comparison; a clearly labeled point plot on a restricted scale could show the $6 difference without implying that the clipped segments are full bars.

Different Ranges, Plot Heights, and Tick Intervals

For linear axes, equal data differences do not necessarily occupy equal distances across panels. The mapping depends on both the axis range \(U-L\) and the physical plot height \(H\). A narrower range makes a fixed data difference take up a larger fraction of the panel, while a taller panel gives that fraction more physical space.

It is important to distinguish axis limits from tick intervals. Two linear axes with the same limits and the same plot height map a given difference to the same visual distance, even if one has ticks every 1 unit and the other every 2. Different tick intervals can make values harder to read or compare, but by themselves they do not alter the mapping. In contrast, different limits or different plot heights can alter the visual distance for the same data difference.

Derivation: The bottom of a linear plotting region represents \(L\), and the top represents \(U\), so the full data range \(U-L\) maps to \(H\) units of screen height. A value \(y\) is the fraction \((y-L)/(U-L)\) of the way through the data range. Its screen height is therefore \(H(y-L)/(U-L)\). For two values separated by \(\Delta y\), subtracting their screen heights gives \(H\Delta y/(U-L)\). Tick marks do not appear in this calculation; changing their spacing alone cannot change the visual distance.

Worked Example: Comparing Differences Across Two Panels

Two hypothetical small-multiple panels show annual claim-cost changes. Both plotting regions are 300 pixels high. Panel A has a vertical range from 0 to 30, and Panel B from 0 to 150. In each panel, compare two values separated by 6 units. Calculate each screen distance and explain the comparison. Name the method and the mistake it avoids.

Method. Use \(H\Delta y/(U-L)\) for each panel. The common mistake is to assume that an equal numerical difference must have equal visual length across panels with different ranges.

Panel A. Its range is \(30-0=30\). The distance for a 6-unit change is \(300(6/30)=60\) pixels.

Panel B. Its range is \(150-0=150\). The distance is \(300(6/150)=12\) pixels.

Comparison and check. The same 6-unit difference occupies \(60/12=5\) times as much vertical space in Panel A. The result follows from the fivefold difference in range, since \(150/30=5\). If both panels instead had the same range and height, their equal data differences would have equal screen distances, regardless of whether ticks were spaced every 1, 2, or 5 units. For directly comparing magnitudes or changes across panels, shared limits and comparable physical heights make the visual comparison more reliable.

When working in R, check the axis limits and panel layout rather than assuming that separate panels are directly comparable. For example, the limits supplied to a plotting function through an argument such as ylim affect the linear mapping. Small multiples can use the same limits when a direct comparison is the goal. If each panel needs its own range to show its internal pattern, label the scales clearly and say that visual distances across panels do not represent equal data differences.

A logarithmic axis is a different case: equal distances represent equal changes in the logarithm of the value, and therefore equal ratios rather than equal absolute differences. Such an axis can be useful when multiplicative changes are the focus, but it should be labeled and explained. It is not a way to make equal absolute differences appear comparable.

Inconsistent Bins in Histograms

Histograms divide a numeric variable into intervals, called bins. If bins have different widths, the count in a bin alone is not a fair measure of how concentrated observations are: a wider interval has more opportunity to contain observations. If samples differ in size, raw counts also reflect the number of observations collected, not just the shape of the distribution.

For comparing distributions, use common bin boundaries where possible and consider proportions rather than raw counts when sample sizes differ. For unequal-width bins, a histogram can use frequency density so that the area of each bar represents the count or proportion in the interval. For a bin of width \(w\) containing \(c\) observations in a sample of size \(n\), the proportion density is \(c/(nw)\). Multiplying this height by the width gives \(c/n\), the proportion in that bin. This is why bar area, rather than bar height alone, carries the information when widths vary.

Worked Example: Aligning Histograms With Different Bin Widths

Two hypothetical groups have positive claim amounts recorded in the range 0 to 20 units. Group A has 50 observations: 20 in [0, 10) and 30 in [10, 20). Group B has 70 observations: 12 in [0, 5), 18 in [5, 10), 20 in [10, 15), and 20 in [15, 20). Compare the proportions in the common intervals [0, 10) and [10, 20), then calculate the proportion densities for the displayed bins. Name the method and the mistake it avoids.

Method. First combine adjacent bins to create common intervals and compare proportions; then calculate each unequal-width bin’s proportion density. The common mistake is to compare raw counts from bins of different widths or from samples of different sizes as though the counts were directly comparable.

Group A proportions. In [0, 10), the proportion is \(20/50=0.40\). In [10, 20), it is \(30/50=0.60\). These bins each have width 10, so the respective proportion densities are \(0.40/10=0.040\) and \(0.60/10=0.060\) per unit.

Group B common-interval proportions. In [0, 10), there are \(12+18=30\) observations, so the proportion is \(30/70=0.4286\). In [10, 20), there are \(20+20=40\), so the proportion is \(40/70=0.5714\). The proportions sum to \(0.4286+0.5714=1.0000\), allowing for rounding.

Group B bin densities. The four bins each have width 5. Their proportion densities are \(12/(70\cdot5)=0.0343\), \(18/(70\cdot5)=0.0514\), \(20/(70\cdot5)=0.0571\), and \(20/(70\cdot5)=0.0571\) per unit, to four decimals. For the first common interval, the bar areas sum to \(5(0.0343)+5(0.0514)\), which is approximately \(0.4285\); using unrounded values gives exactly \(30/70=0.4286\). For the second, the areas sum to approximately \(0.5714\).

Check. Group A places 40% of observations below 10, while Group B places about 42.86% there. Comparing a count of 20 in A’s width-10 bin directly with a count of 12 in B’s width-5 bin would not compare equivalent intervals. Use common boundaries for the subgroup comparison, and use proportions or proportion densities when the sample sizes or bin widths differ.

A Practical Axis-and-Bin Audit

Before presenting a comparison, state what visual feature should be compared: full magnitudes, absolute differences, relative changes, or distributional shape. Then check the display settings against that purpose. A shared scale can make between-group differences interpretable, but it may compress variation in a group whose values are much smaller. If that makes the within-group pattern hard to see, a second, explicitly labeled view can help; it should not be presented as if its visual distances were directly comparable with the shared-scale view.

1
Identify the comparison.
Decide whether the reader needs to compare values, absolute changes, ratios, or distribution shapes.
2
Check the axis mapping.
For linear panels, inspect limits and physical heights. For bar magnitudes, check whether the baseline is zero. Do not mistake tick spacing alone for a changed scale mapping.
3
Check the bins and denominators.
For histograms, compare common intervals when possible. If widths differ, use density so area carries counts or proportions; if sample sizes differ, consider proportions.
4
Label and qualify the display.
Make units, limits, transformations, and bin conventions clear. If panels use different scales for readability, state that their visual distances should not be compared directly.

A useful exam habit is to describe the distortion precisely rather than merely calling a graph “misleading.” State whether a truncated baseline exaggerates bar-length ratios, whether different axis ranges change the screen distance for a fixed difference, or whether different bin widths make raw counts incomparable. Then propose a display change that matches the intended comparison.

Key takeaway: On a linear axis, visual distance depends on the data difference, axis range, and plot height; tick spacing alone does not change that mapping. For bar charts, a zero baseline usually preserves magnitude comparisons. For histograms, align bins and use proportions or density when sample sizes or bin widths differ.

Check Your Understanding

For each problem, identify the display issue and choose a comparison that preserves the intended meaning.

  1. A hypothetical bar chart shows average repair costs of $72 and $78, but its axis starts at $68. Calculate the two visible bar lengths and their ratio. Then calculate the full-value ratio. (Answer: Visible lengths are $4 and $10, with ratio 2.5; the full-value ratio is \(78/72=1.0833\).)
  2. Two linear panels are each 240 pixels high. Their ranges are 0 to 40 and 0 to 80. What screen distances correspond to a 10-unit difference in each panel, and how many times larger is one distance? (Answer: 60 pixels and 30 pixels; the difference appears twice as large in the first panel.)
  3. Two linear panels have the same 0-to-50 range and are each 200 pixels high. One shows ticks every 5 units and the other every 10. How far does a 15-unit difference extend in each? (Answer: 60 pixels in each; tick spacing alone does not change the mapping.)
  4. A sample of 40 has 12 observations in a bin of width 4; a sample of 80 has 16 observations in a bin of width 2. Calculate each bin’s proportion and proportion density. (Answer: The proportions are \(12/40=0.30\) and \(16/80=0.20\); the densities are \(0.30/4=0.075\) and \(0.20/2=0.100\) per unit.)
  5. Group C has 18 of 60 observations in [0, 5) and 24 in [5, 10). Group D has 35 of 100 in [0, 10). Compare the proportions below 10, and explain why comparing 18 with 35 is not a valid direct count comparison. (Answer: Group C has \((18+24)/60=0.70\), and Group D has \(35/100=0.35\). The 18 count covers only [0, 5), whereas 35 covers the wider interval [0, 10), and the sample sizes differ.)
Clinical Biostats