Skip to content

Commit f44d2a0

Browse files
authored
Update README.md
Added section on broken axis
1 parent 02b0609 commit f44d2a0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,22 @@ The 3rd graph is not 0-based, which makes the bar length at time point 2 about 3
163163
In fact, the true difference in means is closer to 1.6x.
164164
I hope you can see how confusing length and position based visualizations can lead to misleading graphs.
165165

166+
## Watch out for bar plots with broken axis
167+
168+
Broken axis may be useful for depicting data across a wide range of numeric values.
169+
(Alternatively, log scaled axis can be used instead.)
170+
Broken axis are fine for position based graphics, because the data is represented by positions along the axis.
171+
However, we must be very careful with bar plots that have broken axis. Here is an example.
172+
173+
![Broken axis](https://github.com/cxli233/FriendsDontLetFriends/blob/main/Results/Broken_axis.svg)
174+
175+
In this example, two graphs (left vs. right) are showing the same data.
176+
However, by changing where the axis is broken, one can make certain bars looks longer or shorter.
177+
In this example, the length of bar "d" can look *really* different.
178+
The illusion of bar "d" being very short on the right graph boils down to bar plot being a length based graphics, not a position based graphics.
179+
180+
Example R code for broken axis can be found [here](https://github.com/cxli233/FriendsDontLetFriends/blob/main/Scripts/Broken_axis.R).
181+
166182
# 10. Friends Don't Let Friends Make Pie Chart
167183

168184
Pie chart is a common type of visualization for fractional data, where fractions add up to 100%.

0 commit comments

Comments
 (0)