`size` to `linewidth` in ggplots (#1248)

This commit is contained in:
Zeki Akyol 2023-01-26 01:53:02 +03:00 committed by GitHub
parent 1e62bae0f8
commit b1f2086623
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -421,7 +421,7 @@ Remember, in addition to `geom_text()`, you have many other geoms in ggplot2 ava
A couple ideas:
- Use `geom_hline()` and `geom_vline()` to add reference lines.
We often make them thick (`size = 2`) and white (`color = white`), and draw them underneath the primary data layer.
We often make them thick (`linewidth = 2`) and white (`color = white`), and draw them underneath the primary data layer.
That makes them easy to see, without drawing attention away from the data.
- Use `geom_rect()` to draw a rectangle around points of interest.

View File

@ -9,8 +9,8 @@ These are the skills that allow data science to happen, and here you will find t
You'll learn how to use the grammar of graphics, literate programming, and reproducible research to save time.
You'll also learn how to manage cognitive resources to facilitate discoveries when wrangling, visualizing, and exploring data.
This website is and will always be free, licensed under the [CC BY-NC-ND 3.0](http://creativecommons.org/licenses/by-nc-nd/3.0/us/) License.
If you'd like a physical copy of the book, you can order the 1st edition on [Amazon](http://amzn.to/2aHLAQ1), or wait until mid-2023 for the 2nd edition.
This website is and will always be free, licensed under the [CC BY-NC-ND 3.0](https://creativecommons.org/licenses/by-nc-nd/3.0/us/) License.
If you'd like a physical copy of the book, you can order the 1st edition on [Amazon](https://amzn.to/2aHLAQ1), or wait until mid-2023 for the 2nd edition.
If appreciate reading the book for free and would like to give back please make a donation to [Kākāpō Recovery](https://www.doc.govt.nz/kakapo-donate): the [kākāpō](https://www.youtube.com/watch?v=9T1vfsHYiKY) (which appears on the cover of R4DS) is a critically endangered native NZ parrot; there are only 252 left.
If you speak, another language, you might be interested in the freely available translations of the 1st edition:

View File

@ -653,7 +653,7 @@ flights |>
.groups = "drop"
) |>
ggplot(aes(x = mean, y = median)) +
geom_abline(slope = 1, intercept = 0, color = "white", size = 2) +
geom_abline(slope = 1, intercept = 0, color = "white", linewidth = 2) +
geom_point()
```

View File

@ -235,7 +235,7 @@ flights |>
span = 0.5,
se = FALSE,
color = "white",
size = 4
linewidth = 4
) +
geom_point()
```