You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: viz.Rmd
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -724,7 +724,7 @@ However, that will not work well for this particular visualization
724
724
because the legend labels are quite long
725
725
and would run off the page if displayed this way.
726
726
727
-
```{r 03-scatter-color-by-category-legend-edit, warning=FALSE, fig.height=5, fig.width = 6, fig.align = "center", fig.cap = "Scatter plot of percentage of Canadians reporting a language as their mother tongue vs the primary language at home colored by language category with the legend edited."}
727
+
```{r 03-scatter-color-by-category-legend-edit, warning=FALSE, fig.height=5, fig.width = 5.5, fig.align = "center", fig.cap = "Scatter plot of percentage of Canadians reporting a language as their mother tongue vs the primary language at home colored by language category with the legend edited."}
728
728
ggplot(can_lang, aes(x = most_at_home_percent,
729
729
y = mother_tongue_percent,
730
730
color = category)) +
@@ -770,7 +770,7 @@ this makes the scatter point shapes different for each category. This kind of
770
770
visual redundancy—i.e., conveying the same information with both scatter point color and shape—can
771
771
further improve the clarity and accessibility of your visualization.
772
772
773
-
```{r scatter-color-by-category-palette, fig.height=5, fig.width = 6, fig.align = "center", warning=FALSE, fig.cap = "Scatter plot of percentage of Canadians reporting a language as their mother tongue vs the primary language at home colored by language category with color-blind friendly colors."}
773
+
```{r scatter-color-by-category-palette, fig.height=5, fig.width = 5.5, fig.align = "center", warning=FALSE, fig.cap = "Scatter plot of percentage of Canadians reporting a language as their mother tongue vs the primary language at home colored by language category with color-blind friendly colors."}
774
774
ggplot(can_lang, aes(x = most_at_home_percent,
775
775
y = mother_tongue_percent,
776
776
color = category,
@@ -895,7 +895,7 @@ the landmass sizes. So we have to pass the `stat = "identity"` argument to `geom
895
895
shown in Figure \@ref(fig:03-data-islands-bar).
896
896
\index{ggplot!geom\_bar}
897
897
898
-
```{r 03-data-islands-bar, warning=FALSE, message=FALSE, fig.cap = "Bar plot of all Earth's landmasses' size with squished labels."}
898
+
```{r 03-data-islands-bar, warning=FALSE, message=FALSE, fig.width=5, fig.height=4, fig.align = "center", fig.cap = "Bar plot of all Earth's landmasses' size with squished labels."}
899
899
islands_bar <- ggplot(islands_df, aes(x = landmass, y = size)) +
900
900
geom_bar(stat = "identity")
901
901
@@ -914,7 +914,7 @@ space, we'll use horizontal bars instead of vertical ones. We do this by
914
914
swapping the `x` and `y` variables:
915
915
\index{slice\_max}
916
916
917
-
```{r 03-data-islands-bar-2, warning=FALSE, message=FALSE, fig.cap = "Bar plot of size for Earth's largest 12 landmasses."}
917
+
```{r 03-data-islands-bar-2, warning=FALSE, message=FALSE, fig.width=5, fig.height=3, fig.align = "center", fig.cap = "Bar plot of size for Earth's largest 12 landmasses."}
918
918
islands_top12 <- slice_max(islands_df, order_by = size, n = 12)
919
919
islands_bar <- ggplot(islands_top12, aes(x = size, y = landmass)) +
920
920
geom_bar(stat = "identity")
@@ -957,7 +957,7 @@ Thus we use the `fill` argument inside `labs` to change that to "Type."
957
957
Finally, we again \index{ggplot!reorder} use the `theme` function
958
958
to change the font size.
959
959
960
-
```{r 03-data-islands-bar-4, warning = FALSE, message = FALSE, fig.width = 8, fig.cap = "Bar plot of size for Earth's largest 12 landmasses colored by whether its a continent with clearer axes and labels."}
960
+
```{r 03-data-islands-bar-4, warning = FALSE, message = FALSE, fig.width=8, fig.align="center", fig.cap = "Bar plot of size for Earth's largest 12 landmasses colored by whether its a continent with clearer axes and labels."}
0 commit comments