Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhodge931 committed Jul 4, 2024
1 parent 32a07c8 commit ae0fad4
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 26 deletions.
12 changes: 6 additions & 6 deletions R/set_blanket.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
#' @param annotation_linewidth A linewidth for `*_hline`/`*_vline`/`*_abline` and `*_curve`. Defaults to 0.33.
#' @param annotation_family A family for `*_text` and `*_label`. Defaults to "".
#' @param annotation_size A size for `*_text` and `*_label`. Defaults to 3.88.
#' @param col_palette_d For a discrete scale, a character vector of hex codes (or names) for the `col_palette`.
#' @param col_palette_c For a continuous scale, a character vector of hex codes (or names) for the `col_palette`.
#' @param col_palette_o For an ordinal scale, a `scales::pal_*()` function for the `col_palette`.
#' @param col_palette_na_d For a discrete scale, a hex code or name for the `col_palette_na`.
#' @param col_palette_na_c For a continuous scale, a hex code or name for the `col_palette_na`.
#' @param col_palette_na_o For an ordinal scale, a hex code or name for the `col_palette_na`.
#' @param col_palette_d For a discrete scale, a character vector of hex codes.
#' @param col_palette_c For a continuous scale, a character vector of hex codes.
#' @param col_palette_o For an ordinal scale, a `scales::pal_*()` function.
#' @param col_palette_na_d For a discrete scale, a hex code.
#' @param col_palette_na_c For a continuous scale, a hex code.
#' @param col_palette_na_o For an ordinal scale, a hex code.
#' @param theme A ggplot2 theme that the `gg_*` function will add without side-effects. Note, `mode` takes precedence, unless `mode = NULL`.
#'
#' @return A globally set style.
Expand Down
2 changes: 2 additions & 0 deletions R/unweave.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#' Unweave geom defaults
#'
#' @description Reset all updated geom defaults back to ggplot2 defaults.
#'
#' @noRd
unweave_geom_defaults <- function() {
ggplot2::update_geom_defaults("area", NULL)
Expand Down
14 changes: 7 additions & 7 deletions R/weave.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ weave_mode <- function(mode = light_mode_r()) {
invisible(old)
}

#' Set a theme
#' Set a theme (without side-effects)
#'
#' @description Set a theme to be `+`-ed on unmodified to `gg_*` functions. Note, `mode` takes precedence unless NULL.
#'
Expand Down Expand Up @@ -98,8 +98,8 @@ weave_geom_defaults <- function(colour = "#357BA2FF",

#' Set a discrete colour palette
#'
#' @param col_palette_d For a discrete scale, a character vector of hex codes (or col_palette_d_names) for the `col_palette_d`.
#' @param col_palette_d_na For a discrete scale, a hex code (or col_palette_d_name) for the `col_palette_d_col_palette_d_na`.
#' @param col_palette_d For a discrete scale, a character vector of hex codes.
#' @param col_palette_d_na For a discrete scale, a hex code.
#'
#' @export
weave_col_palette_d <- function(col_palette_d = jumble, col_palette_d_na = "#CDC5BFFF") {
Expand Down Expand Up @@ -146,8 +146,8 @@ weave_col_palette_d <- function(col_palette_d = jumble, col_palette_d_na = "#CDC

#' Set a continuous colour palette
#'
#' @param col_palette_c For a continuous scale, a character vector of hex codes (or col_palette_c_names)
#' @param col_palette_c_na For a continuous scale, a hex code (or col_palette_c_name) for the `col_palette_col_palette_c_na`.
#' @param col_palette_c For a continuous scale, a character vector of hex codes.
#' @param col_palette_c_na For a continuous scale, a hex code.
#'
#' @export
weave_col_palette_c <- function(col_palette_c = viridisLite::mako(n = 9, direction = -1),
Expand Down Expand Up @@ -185,8 +185,8 @@ weave_col_palette_c <- function(col_palette_c = viridisLite::mako(n = 9, directi

#' Set an ordinal colour palette
#'
#' @param col_palette_o For an ordicol_palette_o_nal scale, a `scales::pal_*()` function for the `col_palette_o`.
#' @param col_palette_o_na For an ordicol_palette_o_nal scale, a hex code (or col_palette_o_name) for the `col_palette_o_col_palette_o_na`.
#' @param col_palette_o For an ordinal scale, a `scales::pal_*()` function.
#' @param col_palette_o_na For an ordinal scale, a hex code.
#'
#' @export
weave_col_palette_o <- function(col_palette_o = scales::pal_viridis(option = "G", direction = -1),
Expand Down
12 changes: 6 additions & 6 deletions man/set_blanket.Rd

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

4 changes: 2 additions & 2 deletions man/weave_col_palette_c.Rd

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

4 changes: 2 additions & 2 deletions man/weave_col_palette_d.Rd

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

4 changes: 2 additions & 2 deletions man/weave_col_palette_o.Rd

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

2 changes: 1 addition & 1 deletion man/weave_theme.Rd

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

0 comments on commit ae0fad4

Please sign in to comment.