Skip to content

Commit

Permalink
Remove scale_name from discrete_scale() calls due to deprecation …
Browse files Browse the repository at this point in the history
…in ggplot2 3.5.0
  • Loading branch information
nanxstats committed Mar 17, 2024
1 parent 6f45079 commit 2945fae
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 38 deletions.
4 changes: 2 additions & 2 deletions R/discrete-aaas.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pal_aaas <- function(palette = c("default"), alpha = 1) {
#' scale_fill_aaas()
scale_color_aaas <- function(palette = c("default"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("colour", "aaas", pal_aaas(palette, alpha), ...)
discrete_scale("colour", palette = pal_aaas(palette, alpha), ...)
}

#' @export scale_colour_aaas
Expand All @@ -88,5 +88,5 @@ scale_colour_aaas <- scale_color_aaas
#' @rdname scale_aaas
scale_fill_aaas <- function(palette = c("default"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("fill", "aaas", pal_aaas(palette, alpha), ...)
discrete_scale("fill", palette = pal_aaas(palette, alpha), ...)
}
4 changes: 2 additions & 2 deletions R/discrete-cosmic.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ scale_color_cosmic <- function(
palette = c("hallmarks_light", "hallmarks_dark", "signature_substitutions"),
alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("colour", "cosmic", pal_cosmic(palette, alpha), ...)
discrete_scale("colour", palette = pal_cosmic(palette, alpha), ...)
}

#' @export scale_colour_cosmic
Expand All @@ -101,5 +101,5 @@ scale_fill_cosmic <- function(
palette = c("hallmarks_light", "hallmarks_dark", "signature_substitutions"),
alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("fill", "cosmic", pal_cosmic(palette, alpha), ...)
discrete_scale("fill", palette = pal_cosmic(palette, alpha), ...)
}
4 changes: 2 additions & 2 deletions R/discrete-d3.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pal_d3 <- function(palette = c("category10", "category20", "category20b", "categ
#' p2 + scale_fill_d3(palette = "category20c")
scale_color_d3 <- function(palette = c("category10", "category20", "category20b", "category20c"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("colour", "d3", pal_d3(palette, alpha), ...)
discrete_scale("colour", palette = pal_d3(palette, alpha), ...)
}

#' @export scale_colour_d3
Expand All @@ -105,5 +105,5 @@ scale_colour_d3 <- scale_color_d3
#' @rdname scale_d3
scale_fill_d3 <- function(palette = c("category10", "category20", "category20b", "category20c"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("fill", "d3", pal_d3(palette, alpha), ...)
discrete_scale("fill", palette = pal_d3(palette, alpha), ...)
}
4 changes: 2 additions & 2 deletions R/discrete-flatui.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pal_flatui <- function(palette = c("default", "flattastic", "aussie"), alpha = 1
#' p2 + scale_fill_flatui(palette = "aussie")
scale_color_flatui <- function(palette = c("default", "flattastic", "aussie"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("colour", "flatui", pal_flatui(palette, alpha), ...)
discrete_scale("colour", palette = pal_flatui(palette, alpha), ...)
}

#' @export scale_colour_flatui
Expand All @@ -98,5 +98,5 @@ scale_colour_flatui <- scale_color_flatui
#' @rdname scale_flatui
scale_fill_flatui <- function(palette = c("default", "flattastic", "aussie"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("fill", "flatui", pal_flatui(palette, alpha), ...)
discrete_scale("fill", palette = pal_flatui(palette, alpha), ...)
}
4 changes: 2 additions & 2 deletions R/discrete-frontiers.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pal_frontiers <- function(palette = c("default"), alpha = 1) {
#' scale_fill_frontiers()
scale_color_frontiers <- function(palette = c("default"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("colour", "frontiers", pal_frontiers(palette, alpha), ...)
discrete_scale("colour", palette = pal_frontiers(palette, alpha), ...)
}

#' @export scale_colour_frontiers
Expand All @@ -91,5 +91,5 @@ scale_colour_frontiers <- scale_color_frontiers
#' @rdname scale_frontiers
scale_fill_frontiers <- function(palette = c("default"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("fill", "frontiers", pal_frontiers(palette, alpha), ...)
discrete_scale("fill", palette = pal_frontiers(palette, alpha), ...)
}
4 changes: 2 additions & 2 deletions R/discrete-futurama.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pal_futurama <- function(palette = c("planetexpress"), alpha = 1) {
#' scale_fill_futurama()
scale_color_futurama <- function(palette = c("planetexpress"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("colour", "futurama", pal_futurama(palette, alpha), ...)
discrete_scale("colour", palette = pal_futurama(palette, alpha), ...)
}

#' @export scale_colour_futurama
Expand All @@ -86,5 +86,5 @@ scale_colour_futurama <- scale_color_futurama
#' @rdname scale_futurama
scale_fill_futurama <- function(palette = c("planetexpress"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("fill", "futurama", pal_futurama(palette, alpha), ...)
discrete_scale("fill", palette = pal_futurama(palette, alpha), ...)
}
4 changes: 2 additions & 2 deletions R/discrete-igv.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pal_igv <- function(palette = c("default", "alternating"), alpha = 1) {
#' )
scale_color_igv <- function(palette = c("default", "alternating"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("colour", "igv", pal_igv(palette, alpha), ...)
discrete_scale("colour", palette = pal_igv(palette, alpha), ...)
}

#' @export scale_colour_igv
Expand All @@ -101,5 +101,5 @@ scale_colour_igv <- scale_color_igv
#' @rdname scale_igv
scale_fill_igv <- function(palette = c("default", "alternating"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("fill", "igv", pal_igv(palette, alpha), ...)
discrete_scale("fill", palette = pal_igv(palette, alpha), ...)
}
4 changes: 2 additions & 2 deletions R/discrete-jama.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pal_jama <- function(palette = c("default"), alpha = 1) {
#' scale_fill_jama()
scale_color_jama <- function(palette = c("default"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("colour", "jama", pal_jama(palette, alpha), ...)
discrete_scale("colour", palette = pal_jama(palette, alpha), ...)
}

#' @export scale_colour_jama
Expand All @@ -87,5 +87,5 @@ scale_colour_jama <- scale_color_jama
#' @rdname scale_jama
scale_fill_jama <- function(palette = c("default"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("fill", "jama", pal_jama(palette, alpha), ...)
discrete_scale("fill", palette = pal_jama(palette, alpha), ...)
}
4 changes: 2 additions & 2 deletions R/discrete-jco.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pal_jco <- function(palette = c("default"), alpha = 1) {
#' scale_fill_jco()
scale_color_jco <- function(palette = c("default"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("colour", "jco", pal_jco(palette, alpha), ...)
discrete_scale("colour", palette = pal_jco(palette, alpha), ...)
}

#' @export scale_colour_jco
Expand All @@ -86,5 +86,5 @@ scale_colour_jco <- scale_color_jco
#' @rdname scale_jco
scale_fill_jco <- function(palette = c("default"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("fill", "jco", pal_jco(palette, alpha), ...)
discrete_scale("fill", palette = pal_jco(palette, alpha), ...)
}
4 changes: 2 additions & 2 deletions R/discrete-lancet.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pal_lancet <- function(palette = c("lanonc"), alpha = 1) {
#' scale_fill_lancet()
scale_color_lancet <- function(palette = c("lanonc"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("colour", "lancet", pal_lancet(palette, alpha), ...)
discrete_scale("colour", palette = pal_lancet(palette, alpha), ...)
}

#' @export scale_colour_lancet
Expand All @@ -87,5 +87,5 @@ scale_colour_lancet <- scale_color_lancet
#' @rdname scale_lancet
scale_fill_lancet <- function(palette = c("lanonc"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("fill", "lancet", pal_lancet(palette, alpha), ...)
discrete_scale("fill", palette = pal_lancet(palette, alpha), ...)
}
4 changes: 2 additions & 2 deletions R/discrete-locuszoom.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pal_locuszoom <- function(palette = c("default"), alpha = 1) {
#' scale_fill_locuszoom()
scale_color_locuszoom <- function(palette = c("default"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("colour", "locuszoom", pal_locuszoom(palette, alpha), ...)
discrete_scale("colour", palette = pal_locuszoom(palette, alpha), ...)
}

#' @export scale_colour_locuszoom
Expand All @@ -91,5 +91,5 @@ scale_colour_locuszoom <- scale_color_locuszoom
#' @rdname scale_locuszoom
scale_fill_locuszoom <- function(palette = c("default"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("fill", "locuszoom", pal_locuszoom(palette, alpha), ...)
discrete_scale("fill", palette = pal_locuszoom(palette, alpha), ...)
}
4 changes: 2 additions & 2 deletions R/discrete-nejm.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pal_nejm <- function(palette = c("default"), alpha = 1) {
#' scale_fill_nejm()
scale_color_nejm <- function(palette = c("default"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("colour", "nejm", pal_nejm(palette, alpha), ...)
discrete_scale("colour", palette = pal_nejm(palette, alpha), ...)
}

#' @export scale_colour_nejm
Expand All @@ -87,5 +87,5 @@ scale_colour_nejm <- scale_color_nejm
#' @rdname scale_nejm
scale_fill_nejm <- function(palette = c("default"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("fill", "nejm", pal_nejm(palette, alpha), ...)
discrete_scale("fill", palette = pal_nejm(palette, alpha), ...)
}
4 changes: 2 additions & 2 deletions R/discrete-npg.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pal_npg <- function(palette = c("nrc"), alpha = 1) {
#' scale_fill_npg()
scale_color_npg <- function(palette = c("nrc"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("colour", "npg", pal_npg(palette, alpha), ...)
discrete_scale("colour", palette = pal_npg(palette, alpha), ...)
}

#' @export scale_colour_npg
Expand All @@ -87,5 +87,5 @@ scale_colour_npg <- scale_color_npg
#' @rdname scale_npg
scale_fill_npg <- function(palette = c("nrc"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("fill", "npg", pal_npg(palette, alpha), ...)
discrete_scale("fill", palette = pal_npg(palette, alpha), ...)
}
4 changes: 2 additions & 2 deletions R/discrete-rickandmorty.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pal_rickandmorty <- function(palette = c("schwifty"), alpha = 1) {
#' scale_fill_rickandmorty()
scale_color_rickandmorty <- function(palette = c("schwifty"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("colour", "rickandmorty", pal_rickandmorty(palette, alpha), ...)
discrete_scale("colour", palette = pal_rickandmorty(palette, alpha), ...)
}

#' @export scale_colour_rickandmorty
Expand All @@ -86,5 +86,5 @@ scale_colour_rickandmorty <- scale_color_rickandmorty
#' @rdname scale_rickandmorty
scale_fill_rickandmorty <- function(palette = c("schwifty"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("fill", "rickandmorty", pal_rickandmorty(palette, alpha), ...)
discrete_scale("fill", palette = pal_rickandmorty(palette, alpha), ...)
}
4 changes: 2 additions & 2 deletions R/discrete-simpsons.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pal_simpsons <- function(palette = c("springfield"), alpha = 1) {
#' scale_fill_simpsons()
scale_color_simpsons <- function(palette = c("springfield"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("colour", "simpsons", pal_simpsons(palette, alpha), ...)
discrete_scale("colour", palette = pal_simpsons(palette, alpha), ...)
}

#' @export scale_colour_simpsons
Expand All @@ -86,5 +86,5 @@ scale_colour_simpsons <- scale_color_simpsons
#' @rdname scale_simpsons
scale_fill_simpsons <- function(palette = c("springfield"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("fill", "simpsons", pal_simpsons(palette, alpha), ...)
discrete_scale("fill", palette = pal_simpsons(palette, alpha), ...)
}
4 changes: 2 additions & 2 deletions R/discrete-startrek.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pal_startrek <- function(palette = c("uniform"), alpha = 1) {
#' scale_fill_startrek()
scale_color_startrek <- function(palette = c("uniform"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("colour", "startrek", pal_startrek(palette, alpha), ...)
discrete_scale("colour", palette = pal_startrek(palette, alpha), ...)
}

#' @export scale_colour_startrek
Expand All @@ -86,5 +86,5 @@ scale_colour_startrek <- scale_color_startrek
#' @rdname scale_startrek
scale_fill_startrek <- function(palette = c("uniform"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("fill", "startrek", pal_startrek(palette, alpha), ...)
discrete_scale("fill", palette = pal_startrek(palette, alpha), ...)
}
4 changes: 2 additions & 2 deletions R/discrete-tron.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pal_tron <- function(palette = c("legacy"), alpha = 1) {
#' scale_fill_tron()
scale_color_tron <- function(palette = c("legacy"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("colour", "tron", pal_tron(palette, alpha), ...)
discrete_scale("colour", palette = pal_tron(palette, alpha), ...)
}

#' @export scale_colour_tron
Expand All @@ -93,5 +93,5 @@ scale_colour_tron <- scale_color_tron
#' @rdname scale_tron
scale_fill_tron <- function(palette = c("legacy"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("fill", "tron", pal_tron(palette, alpha), ...)
discrete_scale("fill", palette = pal_tron(palette, alpha), ...)
}
4 changes: 2 additions & 2 deletions R/discrete-uchicago.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pal_uchicago <- function(palette = c("default", "light", "dark"), alpha = 1) {
#' p2 + scale_fill_uchicago(palette = "dark")
scale_color_uchicago <- function(palette = c("default", "light", "dark"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("colour", "uchicago", pal_uchicago(palette, alpha), ...)
discrete_scale("colour", palette = pal_uchicago(palette, alpha), ...)
}

#' @export scale_colour_uchicago
Expand All @@ -100,5 +100,5 @@ scale_colour_uchicago <- scale_color_uchicago
#' @rdname scale_uchicago
scale_fill_uchicago <- function(palette = c("default", "light", "dark"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("fill", "uchicago", pal_uchicago(palette, alpha), ...)
discrete_scale("fill", palette = pal_uchicago(palette, alpha), ...)
}
4 changes: 2 additions & 2 deletions R/discrete-ucscgb.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pal_ucscgb <- function(palette = c("default"), alpha = 1) {
#' scale_fill_ucscgb()
scale_color_ucscgb <- function(palette = c("default"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("colour", "ucscgb", pal_ucscgb(palette, alpha), ...)
discrete_scale("colour", palette = pal_ucscgb(palette, alpha), ...)
}

#' @export scale_colour_ucscgb
Expand All @@ -86,5 +86,5 @@ scale_colour_ucscgb <- scale_color_ucscgb
#' @rdname scale_ucscgb
scale_fill_ucscgb <- function(palette = c("default"), alpha = 1, ...) {
palette <- match.arg(palette)
discrete_scale("fill", "ucscgb", pal_ucscgb(palette, alpha), ...)
discrete_scale("fill", palette = pal_ucscgb(palette, alpha), ...)
}

0 comments on commit 2945fae

Please sign in to comment.