From fd906645d80dec6efb32aeeb0ed6b622712b7887 Mon Sep 17 00:00:00 2001 From: davidhodge931 Date: Tue, 19 Sep 2023 15:34:34 +1200 Subject: [PATCH] Update subtitle margins --- R/dark_mode.R | 2 +- R/light_mode.R | 2 +- man/dark_mode.Rd | 2 +- man/light_mode.Rd | 2 +- vignettes/ggblanket.Rmd | 16 ++++++++-------- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/R/dark_mode.R b/R/dark_mode.R index 2f451ffdb..623fa210f 100644 --- a/R/dark_mode.R +++ b/R/dark_mode.R @@ -70,7 +70,7 @@ dark_mode <- function ( subtitle_pal = NULL, subtitle_size = NULL, subtitle_vjust = 1, - subtitle_margin = ggplot2::margin(t = base_size * -1, b = base_size * 2), + subtitle_margin = ggplot2::margin(t = base_size * -1, b = base_size + 10), caption_family = NULL, caption_face = NULL, caption_alpha = 0.33, diff --git a/R/light_mode.R b/R/light_mode.R index 2eb58304b..e6383c70c 100644 --- a/R/light_mode.R +++ b/R/light_mode.R @@ -70,7 +70,7 @@ light_mode <- function ( subtitle_pal = NULL, subtitle_size = NULL, subtitle_vjust = 1, - subtitle_margin = ggplot2::margin(t = base_size * -1, b = base_size * 2), + subtitle_margin = ggplot2::margin(t = base_size * -1, b = base_size + 10), caption_family = NULL, caption_face = NULL, caption_alpha = 0.33, diff --git a/man/dark_mode.Rd b/man/dark_mode.Rd index 8213a61d4..9435e85ae 100644 --- a/man/dark_mode.Rd +++ b/man/dark_mode.Rd @@ -20,7 +20,7 @@ dark_mode( subtitle_pal = NULL, subtitle_size = NULL, subtitle_vjust = 1, - subtitle_margin = ggplot2::margin(t = base_size * -1, b = base_size * 2), + subtitle_margin = ggplot2::margin(t = base_size * -1, b = base_size + 10), caption_family = NULL, caption_face = NULL, caption_alpha = 0.33, diff --git a/man/light_mode.Rd b/man/light_mode.Rd index d1f7fdcf0..90f2063ba 100644 --- a/man/light_mode.Rd +++ b/man/light_mode.Rd @@ -20,7 +20,7 @@ light_mode( subtitle_pal = NULL, subtitle_size = NULL, subtitle_vjust = 1, - subtitle_margin = ggplot2::margin(t = base_size * -1, b = base_size * 2), + subtitle_margin = ggplot2::margin(t = base_size * -1, b = base_size + 10), caption_family = NULL, caption_face = NULL, caption_alpha = 0.33, diff --git a/vignettes/ggblanket.Rmd b/vignettes/ggblanket.Rmd index 1fcfbedb5..f37ce74d8 100644 --- a/vignettes/ggblanket.Rmd +++ b/vignettes/ggblanket.Rmd @@ -90,7 +90,7 @@ p2 <- penguins2 |> p1 / p2 ``` -```{r, fig.asp=1} +```{r, fig.asp=1.05} # ggblanket p1 <- penguins2 |> gg_point( @@ -110,7 +110,7 @@ p1 / p2 The `pal` argument is used to customise the colours of the geom. A user can provide a vector of colours to this argument. It can be named or not. It works in a consistent way - regardless of whether a `col` argument is added or not. A named palette can be used to make individual colours stick to particular values. -```{r, fig.asp=0.8} +```{r, fig.asp=0.85} # ggplot2 p1 <- penguins2 |> ggplot() + @@ -127,7 +127,7 @@ p2 <- penguins2 |> p1 / p2 ``` -```{r, fig.asp=0.9} +```{r, fig.asp=0.95} # ggblanket p1 <- penguins2 |> gg_histogram( @@ -196,7 +196,7 @@ Prefixed arguments are available to customise titles, scales, guides, and faceti knitr::include_graphics("screenshot_autotab_y.png", dpi = 300) ``` -```{r, fig.asp=0.55} +```{r, fig.asp=0.6} # ggplot2 penguins2 |> ggplot() + @@ -238,7 +238,7 @@ penguins2 |> Unspecified x/y/col titles are converted to sentence case with snakecase::to_sentence. All titles can be manually changed using the `*_title` arguments. The default conversion is intended to make titles sometimes able to be left as is. -```{r, fig.asp=0.5} +```{r, fig.asp=0.525} # ggplot2 penguins2 |> ggplot() + @@ -269,7 +269,7 @@ Note that the `gg_*` function will control what gridlines are present and the pl Note that `theme_set(theme_grey())` resets the set theme for ggplot2 code to theme_grey and for ggblanket `gg_*` functions to `light_mode()`. If you want ggblanket `gg_*` functions to default to using `theme_grey()`, then you must modify the base_size slightly (e.g. `theme_set(theme_grey(11.01))`). -```{r, fig.asp=0.7} +```{r, fig.asp=0.66} # ggblanket theme_set(dark_mode()) @@ -286,7 +286,7 @@ penguins2 |> ```{r, fig.asp=0.8} # ggblanket -theme_set(light_mode(base_size = 12)) +theme_set(light_mode(base_size = 14)) penguins2 |> gg_point( @@ -316,7 +316,7 @@ Note this symmetry approach does _not_ apply: * if a transformation other than identity or reverse is applied to x or y scales. * for `gg_raster`, `gg_contour_filled` or `gg_density_2d_filled` -```{r, fig.asp=0.6} +```{r, fig.asp=0.55} # ggplot2 penguins2 |> group_by(species, sex) |>