Skip to content

Commit

Permalink
get rid of warnings about deprecated arg
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Mar 23, 2024
1 parent 9bf433f commit 5f68111
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 32 deletions.
11 changes: 2 additions & 9 deletions R/scale_color_bluebrown.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ scale_color_bluebrown <- function(palette = "contrast", discrete = TRUE, reverse
pal <- palette_bluebrown(palette = palette, reverse = reverse)

if (discrete) {
discrete_scale(aesthetics = aesthetics, paste0("bluebrown_", palette), palette = pal, ...)
discrete_scale(aesthetics = aesthetics, palette = pal, ...)
} else {
scale_color_gradientn(colours = pal(256), aesthetics = aesthetics, ...)
}
Expand Down Expand Up @@ -93,12 +93,7 @@ scale_fill_bluebrown <- function(palette = "contrast",
pal <- palette_bluebrown(palette = palette, reverse = reverse)

if (discrete) {
discrete_scale(
aesthetics = aesthetics,
paste0("bluebrown_", palette),
palette = pal,
...
)
discrete_scale(aesthetics = aesthetics, palette = pal, ...)
} else {
scale_fill_gradientn(colours = pal(256), aesthetics = aesthetics, ...)
}
Expand Down Expand Up @@ -144,8 +139,6 @@ scale_fill_bluebrown_c <- function(palette = "contrast",
# Palette --------------------------------------------------------------------




bluebrown_colors_list <- c(
`lightblue` = "#6DC0E0",
`blue` = "#5B93AE",
Expand Down
8 changes: 1 addition & 7 deletions R/scale_color_colorhex.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ scale_color_colorhex <- function(palette = 1014416,
if (discrete) {
discrete_scale(
aesthetics = aesthetics,
scale_name = paste0("colorhex_", pal_name),
palette = pal,
...
)
Expand Down Expand Up @@ -126,12 +125,7 @@ scale_fill_colorhex <- function(palette = 1014416,
pal <- palette_colorhex(palette = palette, reverse = reverse)

if (discrete) {
discrete_scale(
aesthetics = aesthetics,
paste0("colorhex_", palette),
palette = pal,
...
)
discrete_scale(aesthetics = aesthetics, palette = pal, ...)
} else {
scale_fill_gradientn(colours = pal(256), aesthetics = aesthetics, ...)
}
Expand Down
4 changes: 2 additions & 2 deletions R/scale_color_flat.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ scale_color_flat <- function(palette = "contrast",
pal <- palette_flat(palette = palette, reverse = reverse)

if (discrete) {
discrete_scale(aesthetics = aesthetics, paste0("flat_", palette), palette = pal, ...)
discrete_scale(aesthetics = aesthetics, palette = pal, ...)
} else {
scale_color_gradientn(colours = pal(256), aesthetics = aesthetics, ...)
}
Expand Down Expand Up @@ -111,7 +111,7 @@ scale_fill_flat <- function(palette = "contrast",
pal <- palette_flat(palette = palette, reverse = reverse)

if (discrete) {
discrete_scale(aesthetics = aesthetics, paste0("flat_", palette), palette = pal, ...)
discrete_scale(aesthetics = aesthetics, palette = pal, ...)
} else {
scale_fill_gradientn(colours = pal(256), aesthetics = aesthetics, ...)
}
Expand Down
4 changes: 2 additions & 2 deletions R/scale_color_material.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ scale_color_material <- function(palette = "contrast",
pal <- palette_material(palette = palette, reverse = reverse)

if (discrete) {
discrete_scale(aesthetics = aesthetics, paste0("material_", palette), palette = pal, ...)
discrete_scale(aesthetics = aesthetics, palette = pal, ...)
} else {
scale_color_gradientn(colours = pal(256), aesthetics = aesthetics, ...)
}
Expand Down Expand Up @@ -108,7 +108,7 @@ scale_fill_material <- function(palette = "contrast",
pal <- palette_material(palette = palette, reverse = reverse)

if (discrete) {
discrete_scale(aesthetics = aesthetics, paste0("material_", palette), palette = pal, ...)
discrete_scale(aesthetics = aesthetics, palette = pal, ...)
} else {
scale_fill_gradientn(colours = pal(256), aesthetics = aesthetics, ...)
}
Expand Down
4 changes: 2 additions & 2 deletions R/scale_color_metro.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ scale_color_metro <- function(palette = "complement",
pal <- palette_metro(palette = palette, reverse = reverse)

if (discrete) {
discrete_scale(aesthetics = aesthetics, paste0("metro_", palette), palette = pal, ...)
discrete_scale(aesthetics = aesthetics, palette = pal, ...)
} else {
scale_color_gradientn(colours = pal(256), aesthetics = aesthetics, ...)
}
Expand Down Expand Up @@ -108,7 +108,7 @@ scale_fill_metro <- function(palette = "complement",
pal <- palette_metro(palette = palette, reverse = reverse)

if (discrete) {
discrete_scale(aesthetics = aesthetics, paste0("metro_", palette), palette = pal, ...)
discrete_scale(aesthetics = aesthetics, palette = pal, ...)
} else {
scale_fill_gradientn(colours = pal(256), aesthetics = aesthetics, ...)
}
Expand Down
2 changes: 0 additions & 2 deletions R/scale_color_okabeito.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
scale_color_okabeito <- function(palette = "full", reverse = FALSE, order = 1:9, aesthetics = "color", ...) {
discrete_scale(
aesthetics = aesthetics,
paste0("okabeito_", palette),
palette = palette_okabeito(palette = palette, reverse = reverse, order = order),
...
)
Expand All @@ -73,7 +72,6 @@ scale_color_okabeito <- function(palette = "full", reverse = FALSE, order = 1:9,
scale_fill_okabeito <- function(palette = "full", reverse = FALSE, order = 1:9, aesthetics = "fill", ...) {
discrete_scale(
aesthetics = aesthetics,
paste0("okabeito_", palette),
palette = palette_okabeito(palette = palette, reverse = reverse, order = order),
...
)
Expand Down
4 changes: 2 additions & 2 deletions R/scale_color_pizza.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ scale_color_pizza <- function(palette = "margherita",
pal <- palette_pizza(palette = palette, reverse = reverse)

if (discrete) {
discrete_scale(aesthetics = aesthetics, paste0("pizza_", palette), palette = pal, ...)
discrete_scale(aesthetics = aesthetics, palette = pal, ...)
} else {
scale_color_gradientn(colours = pal(256), aesthetics = aesthetics, ...)
}
Expand Down Expand Up @@ -100,7 +100,7 @@ scale_fill_pizza <- function(palette = "margherita",
pal <- palette_pizza(palette = palette, reverse = reverse)

if (discrete) {
discrete_scale(aesthetics = aesthetics, paste0("pizza_", palette), palette = pal, ...)
discrete_scale(aesthetics = aesthetics, palette = pal, ...)
} else {
scale_fill_gradientn(colours = pal(256), aesthetics = aesthetics, ...)
}
Expand Down
4 changes: 2 additions & 2 deletions R/scale_color_see.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ scale_color_see <- function(palette = "contrast",
pal <- palette_see(palette = palette, reverse = reverse)

if (discrete) {
discrete_scale(aesthetics = aesthetics, paste0("see_", palette), palette = pal, ...)
discrete_scale(aesthetics = aesthetics, palette = pal, ...)
} else {
scale_color_gradientn(colours = pal(256), aesthetics = aesthetics, ...)
}
Expand Down Expand Up @@ -106,7 +106,7 @@ scale_fill_see <- function(palette = "contrast",
pal <- palette_see(palette = palette, reverse = reverse)

if (discrete) {
discrete_scale(aesthetics = aesthetics, paste0("see_", palette), palette = pal, ...)
discrete_scale(aesthetics = aesthetics, palette = pal, ...)
} else {
scale_fill_gradientn(colours = pal(256), aesthetics = aesthetics, ...)
}
Expand Down
4 changes: 2 additions & 2 deletions R/scale_color_social.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ scale_color_social <- function(palette = "complement", discrete = TRUE, reverse
pal <- palette_social(palette = palette, reverse = reverse)

if (discrete) {
discrete_scale(aesthetics = aesthetics, paste0("social_", palette), palette = pal, ...)
discrete_scale(aesthetics = aesthetics, palette = pal, ...)
} else {
scale_color_gradientn(colours = pal(256), aesthetics = aesthetics, ...)
}
Expand Down Expand Up @@ -79,7 +79,7 @@ scale_fill_social <- function(palette = "complement", discrete = TRUE, reverse =
pal <- palette_social(palette = palette, reverse = reverse)

if (discrete) {
discrete_scale(aesthetics = aesthetics, paste0("social_", palette), palette = pal, ...)
discrete_scale(aesthetics = aesthetics, palette = pal, ...)
} else {
scale_fill_gradientn(colours = pal(256), aesthetics = aesthetics, ...)
}
Expand Down
2 changes: 1 addition & 1 deletion man/plot.see_check_normality.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/plot.see_performance_simres.Rd

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

0 comments on commit 5f68111

Please sign in to comment.