Skip to content

Commit 083a17d

Browse files
authored
Fix typos in the vignette (#6198)
* Fix typos in the vignette. * Fix two other typos.
1 parent f468053 commit 083a17d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

vignettes/articles/faq-annotation.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ mpg %>%
206206

207207
### How can I display proportions (relative frequencies) instead of counts on a bar plot?
208208

209-
Either calculate the proportions ahead of time and place them on bars using `geom_text()` or let `ggplot()` calculate them for you and then add them to the plot using `stat_coun()` with `geom = "text"`.
209+
Either calculate the proportions ahead of time and place them on bars using `geom_text()` or let `ggplot()` calculate them for you and then add them to the plot using `stat_count()` with `geom = "text"`.
210210

211211
<details>
212212

vignettes/articles/faq-axes.Rmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ ggplot(msleep, aes(y = order, x = sleep_total)) +
6969
geom_boxplot()
7070
```
7171

72-
- Dodge axis labels: Add a `scale_*()` layer, e.g. `scale_x_continuous()`, `scale_y_discrete()`, etc., and customise the `guide` argument with the `guide_axis()` function. In this case we want to customise the x-axis, and the variable on the x-axis is discrete, so we'll use `scale_x_continuous()`. In the `guide` argument we use the `guide_axis()` and specify how many rows to dodge the labels into with `n.dodge`. This is likely a trial-and-error exercise, depending on the lengths of your labels and the width of your plot. In this case we've settled on 3 rows to render the labels.
72+
- Dodge axis labels: Add a `scale_*()` layer, e.g. `scale_x_continuous()`, `scale_y_discrete()`, etc., and customise the `guide` argument with the `guide_axis()` function. In this case we want to customise the x-axis, and the variable on the x-axis is discrete, so we'll use `scale_x_discrete()`. In the `guide` argument we use the `guide_axis()` and specify how many rows to dodge the labels into with `n.dodge`. This is likely a trial-and-error exercise, depending on the lengths of your labels and the width of your plot. In this case we've settled on 3 rows to render the labels.
7373

7474
```{r}
7575
#| label: msleep-order-sleep-total-dodge
@@ -115,9 +115,9 @@ Suppose we want to remove the axis labels entirely.
115115
- Remove x or y axis labels: If you want to modify just one of the axes, you can do so by modifying the components of the `theme()`, setting the elements you want to remove to `element_blank()`. You would replace `x` with `y` for applying the same update to the y-axis. Note the distinction between `axis.title` and `axis.ticks` -- `axis.title` is the name of the variable and `axis.text` is the text accompanying each of the ticks.
116116

117117
```{r}
118-
#| fig.alt: "A boxplot showing the total amount of sleep on the y-axis for 19
118+
#| fig.alt: "A boxplot showing the total amount of sleep on the y-axis for 19
119119
#| taxonomical orders of mammals on the x-axis. The annotation on the x-axis
120-
#| is abent."
120+
#| is absent."
121121
ggplot(msleep, aes(x = order, y = sleep_total)) +
122122
geom_boxplot() +
123123
theme(

vignettes/articles/faq-reordering.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ df <- tibble::tribble(
211211
)
212212
```
213213

214-
By default, this is how a scatterplot of these looks.
214+
By default, this is how a scatter plot of these looks.
215215
Note that the blue circle is partially covered by the yellow triangle since that observation comes later in the dataset.
216216
Similarly the black asterisk appears on top of the red square.
217217

0 commit comments

Comments
 (0)