1. Dot plots
Let's look at dot plots, a close relative of bar plots.
2. When should you use a dot plot?
Dot plots work in the same situations as bar plots, but have two advantages. You can use a logarithmic scale with them, and you can plot multiple metrics with them.
3. Nearby stars and brown dwarfs
Here is a dataset on the stars nearest to Earth. The distance from Earth is measured in light years, and the mass is measured in solar masses, that is, multiples of the mass of The Sun.
4. Bar plot vs. dot plot
Here's a bar plot of the star masses, ordered from nearest star at the top to furthest star at the bottom. There is a huge range in bar lengths, and some of the bars are barely visible. This would look better on a logarithmic scale.
Unfortunately, the logarithm of zero is minus infinity, and bars in a bar plot must always begin at zero. This means that a logarithmic scale isn't possible for a bar plot.
The workaround is to display a point instead. This is called a dot plot. Here, the scale is linear, so you can see that each point lies where the top of the bar would have been.
5. Log scales
Using a logarithmic scale helps to answer question about how many times heavier one star is compared to another.
6. Sorting rows
As with bar plots, the order of the rows matters. By sorting rows from heaviest star to lightest, it's easier to answer questions about which is the heaviest or lightest star nearest to Earth.
7. Let's practice!
Let's get dotty!