Skip to content

Commit f893478

Browse files
added better barplot discussion
1 parent c684db8 commit f893478

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

source/viz.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,6 +1168,18 @@ In a bar plot, the height of the bar represents the value of a summary statistic
11681168
They are particularly useful for comparing summary statistics between different
11691169
groups of a categorical variable.
11701170

1171+
1172+
Here, we have a data frame of Earth's landmasses,
1173+
and are trying to compare their sizes.
1174+
The right type of visualization to answer this question is a bar plot.
1175+
In a bar plot, the height of each bar represents the value of an *amount*
1176+
(a size, count, proportion, percentage, etc).
1177+
They are particularly useful for comparing counts or proportions across different
1178+
groups of a categorical variable. Note, however, that bar plots should generally not be
1179+
used to display mean or median values, as they hide important information about
1180+
the variation of the data. Instead it's better to show the distribution of
1181+
all the individual data points, e.g., using a histogram, which we will discuss further in {numref}`histogramsviz`.
1182+
11711183
```{index} altair; mark_bar
11721184
```
11731185

@@ -1292,6 +1304,7 @@ visualization for answering our original questions. Landmasses are organized by
12921304
their size, and continents are colored differently than other landmasses,
12931305
making it quite clear that all the seven largest landmasses are continents.
12941306

1307+
(histogramsviz)=
12951308
### Histograms: the Michelson speed of light data set
12961309

12971310
```{index} Michelson speed of light

0 commit comments

Comments
 (0)