Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhodge931 committed Dec 9, 2024
1 parent 6150b35 commit 140a0a6
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 30 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

* Added R 4.2.0 dependency.
* Removed `aes_colour_darken`, `aes_colour_lighten`, `aes_fill_darken` and `aes_colour_lighten`.
* Removed `gg_ribbon` alpha default, and changed `gg_smooth` to NA.
* Removed `gg_ribbon`, `gg_boxplot`, `gg_crossbar` and `gg_smooth` alpha default to `NA`.
* Added colour blending (e.g. `blend = "multiply`).
* Added `gg_lineribbon`.
* Updated `*_mode_*` themes to default to `axis_line_linewidth = 0.25`.
Expand Down
1 change: 1 addition & 0 deletions R/gg_boxplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#' x = flipper_length_mm,
#' y = species,
#' col = sex,
#' blend = "multiply",
#' )
#'
gg_boxplot <- function(data = NULL,
Expand Down
25 changes: 13 additions & 12 deletions R/gg_crossbar.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#' width = 0.5,
#' x_label = "Treatment",
#' y_label = "Response",
#' blend = "multiply",
#' )
#'
gg_crossbar <- function(data = NULL,
Expand All @@ -55,23 +56,23 @@ gg_crossbar <- function(data = NULL,
text = NULL,
sample = NULL,
mapping = NULL,
x_breaks = NULL, x_breaks_n = NULL,
x_breaks = NULL, x_breaks_n = NULL,
x_expand = NULL,
x_expand_limits = NULL,
x_label = NULL, x_labels = NULL,
x_position = "bottom",
x_label = NULL, x_labels = NULL,


x_position = "bottom",

x_sec_axis = ggplot2::waiver(), x_symmetric = NULL, x_transform = NULL,
y_breaks = NULL, y_breaks_n = NULL,
y_expand = NULL,
y_expand_limits = NULL,
y_label = NULL, y_labels = NULL,
y_position = "left",
y_sec_axis = ggplot2::waiver(),
y_symmetric = NULL,
y_symmetric = NULL,

y_transform = NULL,
col_breaks = NULL, col_breaks_n = 5,
col_drop = FALSE,
Expand All @@ -80,13 +81,13 @@ gg_crossbar <- function(data = NULL,
col_legend_ncol = NULL,
col_legend_nrow = NULL,
col_legend_rev = FALSE,


col_palette = NULL,
col_palette_na = NULL,
col_rescale = scales::rescale(),
col_steps = FALSE,

col_transform = NULL,
facet_axes = NULL,
facet_axis_labels = "margins",
Expand Down Expand Up @@ -152,7 +153,7 @@ gg_crossbar <- function(data = NULL,
col_legend_nrow = col_legend_nrow,
col_legend_rev = col_legend_rev,
col_breaks_n = col_breaks_n,

col_palette = col_palette,
col_palette_na = col_palette_na,
col_rescale = col_rescale,
Expand Down
4 changes: 2 additions & 2 deletions R/weave.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ weave_geom_defaults <- function(
#polygons
ggplot2::update_geom_defaults("area", ggplot2::aes(colour = !!colour, fill = !!fill, linewidth = 0))
ggplot2::update_geom_defaults("bar", ggplot2::aes(colour = !!colour, fill = !!fill, linewidth = 0))
ggplot2::update_geom_defaults("boxplot", ggplot2::aes(colour = !!colour, fill = !!fill, alpha = 0, linewidth = 0.66))
ggplot2::update_geom_defaults("boxplot", ggplot2::aes(colour = !!colour, fill = !!fill, linewidth = 0.66))
ggplot2::update_geom_defaults("col", ggplot2::aes(colour = !!colour, fill = !!fill, linewidth = 0))
ggplot2::update_geom_defaults("contour_filled", ggplot2::aes(colour = !!colour, fill = !!fill, linewidth = 0))
ggplot2::update_geom_defaults("crossbar", ggplot2::aes(colour = !!colour, fill = !!fill, alpha = 0, linewidth = 0.66))
ggplot2::update_geom_defaults("crossbar", ggplot2::aes(colour = !!colour, fill = !!fill, linewidth = 0.66))
ggplot2::update_geom_defaults("density", ggplot2::aes(colour = !!colour, fill = !!fill, linewidth = 0))
ggplot2::update_geom_defaults("density_2d_filled", ggplot2::aes(colour = !!colour, fill = !!fill, linewidth = 0))
ggplot2::update_geom_defaults("polygon", ggplot2::aes(colour = !!colour, fill = !!fill, linewidth = 0))
Expand Down
1 change: 1 addition & 0 deletions man/gg_boxplot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/gg_crossbar.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions tests/testthat/_snaps/article-demo-light/gg-boxplot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions tests/testthat/_snaps/article-demo-light/gg-crossbar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions vignettes/articles/1_demo_light.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ penguins2 |>
x = flipper_length_mm,
y = sex,
col = species,
blend = "multiply",
)
```

Expand Down Expand Up @@ -146,6 +147,7 @@ experiment |>
col = group,
width = 0.5,
y_expand_limits = 0,
blend = "multiply",
)
```

Expand Down
2 changes: 2 additions & 0 deletions vignettes/articles/2_demo_dark.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ penguins2 |>
x = flipper_length_mm,
y = sex,
col = species,
blend = "multiply",
)
```

Expand Down Expand Up @@ -153,6 +154,7 @@ experiment |>
col = group,
width = 0.5,
y_expand_limits = 0,
blend = "multiply",
)
```

Expand Down

0 comments on commit 140a0a6

Please sign in to comment.