From b1f208662335a17b7d8359be9d7d86285317a78c Mon Sep 17 00:00:00 2001 From: Zeki Akyol <40212849+zekiakyol@users.noreply.github.com> Date: Thu, 26 Jan 2023 01:53:02 +0300 Subject: [PATCH] `size` to `linewidth` in ggplots (#1248) --- communication.qmd | 2 +- index.qmd | 4 ++-- numbers.qmd | 2 +- workflow-style.qmd | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/communication.qmd b/communication.qmd index 1c08837..659528e 100644 --- a/communication.qmd +++ b/communication.qmd @@ -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. diff --git a/index.qmd b/index.qmd index 1523f1e..0b63558 100644 --- a/index.qmd +++ b/index.qmd @@ -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: diff --git a/numbers.qmd b/numbers.qmd index e1fff77..01622df 100644 --- a/numbers.qmd +++ b/numbers.qmd @@ -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() ``` diff --git a/workflow-style.qmd b/workflow-style.qmd index 314cc4f..ecd8827 100644 --- a/workflow-style.qmd +++ b/workflow-style.qmd @@ -235,7 +235,7 @@ flights |> span = 0.5, se = FALSE, color = "white", - size = 4 + linewidth = 4 ) + geom_point() ```