Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRAN RC: 0.8.3 #332

Merged
merged 17 commits into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions DESCRIPTION
IndrajeetPatil marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: see
Title: Model Visualisation Toolbox for 'easystats' and 'ggplot2'
Version: 0.8.2.7
Version: 0.8.3
Authors@R:
c(person(given = "Daniel",
family = "Lüdecke",
Expand Down Expand Up @@ -67,11 +67,11 @@ Imports:
correlation (>= 0.8.4),
datawizard (>= 0.9.1),
effectsize (>= 0.8.6),
ggplot2 (>= 3.4.0),
insight (>= 0.19.8),
ggplot2 (>= 3.5.0),
insight (>= 0.19.10),
modelbased (>= 0.8.7),
parameters (>= 0.21.5),
performance (>= 0.10.9)
parameters (>= 0.21.6),
performance (>= 0.11.0)
Suggests:
brms,
curl,
Expand Down Expand Up @@ -119,4 +119,3 @@ Config/Needs/website:
r-lib/pkgdown,
easystats/easystatstemplate
Config/rcmdcheck/ignore-inconsequential-notes: true
Remotes: easystats/performance
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# see (development version)
# see 0.8.3

## Major changes

Expand Down
6 changes: 4 additions & 2 deletions R/coord_radar.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
#' @inheritParams ggplot2::coord_polar
#' @param ... Other arguments to be passed to `ggproto`.
#'
#' @examplesIf require("datawizard") && require("ggplot2")
#' @examples
#' library(ggplot2)
#'
#' # Create a radar/spider chart with ggplot:
#' data(iris)
#' data <- aggregate(iris[-5], list(Species = iris$Species), mean)
#' data <- data_to_long(
#' data <- datawizard::data_to_long(
#' data,
#' c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width")
#' )
Expand Down
4 changes: 2 additions & 2 deletions R/data_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ data_plot <- function(x, ...) {
#' model <- suppressWarnings(stan_glm(
#' Sepal.Length ~ Petal.Width + Species + Sepal.Width,
#' data = iris,
#' chains = 2, iter = 200
#' chains = 2, iter = 200, refresh = 0
#' ))
#'
#' result <- hdi(model, ci = c(0.5, 0.75, 0.9, 0.95))
#' result <- bayestestR::hdi(model, ci = c(0.5, 0.75, 0.9, 0.95))
#' data <- data_plot(result, data = model)
#'
#' p <- ggplot(
Expand Down
4 changes: 2 additions & 2 deletions R/plot.check_heteroscedasticity.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#'
#' @return A ggplot2-object.
#'
#' @seealso See also the vignette about [`check_model()`](https://easystats.github.io/performance/articles/check_model.html).

Check warning on line 10 in R/plot.check_heteroscedasticity.R

View workflow job for this annotation

GitHub Actions / lint / lint

file=R/plot.check_heteroscedasticity.R,line=10,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 125 characters.

Check warning on line 10 in R/plot.check_heteroscedasticity.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/plot.check_heteroscedasticity.R,line=10,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 125 characters.
#'
#' @examplesIf require("performance")
#' @examples
#' m <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars)
#' result <- check_heteroscedasticity(m)
#' result <- performance::check_heteroscedasticity(m)
#' result
#' plot(result, data = m) # data required for pkgdown
#' @export
Expand Down
4 changes: 3 additions & 1 deletion R/plot.check_homogeneity.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
#'
#' @return A ggplot2-object.
#'
#' @examplesIf require("performance")
#' @examples
#' library(performance)
#'
#' model <<- lm(len ~ supp + dose, data = ToothGrowth)
#' result <- check_homogeneity(model)
#' result
Expand Down
5 changes: 3 additions & 2 deletions R/plot.check_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@
#'
#' @return A ggplot2-object.
#'
#' @seealso See also the vignette about [`check_model()`](https://easystats.github.io/performance/articles/check_model.html).

Check warning on line 12 in R/plot.check_model.R

View workflow job for this annotation

GitHub Actions / lint / lint

file=R/plot.check_model.R,line=12,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 125 characters.

Check warning on line 12 in R/plot.check_model.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/plot.check_model.R,line=12,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 125 characters.
#'
#' @examplesIf require("performance") && require("patchwork")
#' @examplesIf require("patchwork")
#' library(performance)
#'
#' model <- lm(qsec ~ drat + wt, data = mtcars)
#' plot(check_model(model))
#'
#' @export
plot.see_check_model <- function(x,

Check warning on line 21 in R/plot.check_model.R

View workflow job for this annotation

GitHub Actions / lint / lint

file=R/plot.check_model.R,line=21,col=1,[cyclocomp_linter] Reduce the cyclomatic complexity of this function from 79 to at most 40.

Check warning on line 21 in R/plot.check_model.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/plot.check_model.R,line=21,col=1,[cyclocomp_linter] Reduce the cyclomatic complexity of this function from 79 to at most 40.
style = theme_lucid,
colors = NULL,
type = c("density", "discrete_dots", "discrete_interval", "discrete_both"),
Expand All @@ -41,7 +43,7 @@
plot_type <- attr(x, "type")
model_class <- attr(x, "model_class")

if (missing(type) && !is.null(plot_type) && plot_type %in% c("density", "discrete_dots", "discrete_interval", "discrete_both")) {

Check warning on line 46 in R/plot.check_model.R

View workflow job for this annotation

GitHub Actions / lint / lint

file=R/plot.check_model.R,line=46,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 131 characters.

Check warning on line 46 in R/plot.check_model.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/plot.check_model.R,line=46,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 131 characters.
type <- plot_type
} else {
type <- match.arg(type)
Expand Down Expand Up @@ -177,7 +179,6 @@
colors = colors,
detrend = detrend,
style = style

)
} else {
p$QQ <- .plot_diag_qq(
Expand Down
8 changes: 5 additions & 3 deletions R/plot.check_normality.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,24 @@
#'
#' @return A ggplot2-object.
#'
#' @seealso See also the vignette about [`check_model()`](https://easystats.github.io/performance/articles/check_model.html).

Check warning on line 27 in R/plot.check_normality.R

View workflow job for this annotation

GitHub Actions / lint / lint

file=R/plot.check_normality.R,line=27,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 125 characters.

Check warning on line 27 in R/plot.check_normality.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/plot.check_normality.R,line=27,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 125 characters.
#'
#' @examplesIf require("performance")
#' @examples
#' library(performance)
#'
#' m <<- lm(mpg ~ wt + cyl + gear + disp, data = mtcars)
#' result <- check_normality(m)
#' plot(result)
#'
#' @examplesIf require("performance") && require("qqplotr")
#' @examplesIf require("qqplotr")
#' plot(result, type = "qq", detrend = TRUE)
#'
#' @export
plot.see_check_normality <- function(x,
type = c("qq", "pp", "density"),
data = NULL,
size_line = 0.8,
size_point = 1.5,
size_point = 2,
alpha = 0.2,
dot_alpha = 0.8,
colors = c("#3aaf85", "#1b6ca8"),
Expand Down Expand Up @@ -262,7 +264,7 @@
)
},
ggplot2::geom_qq(
mapping = if (detrend) ggplot2::aes(y = ggplot2::after_stat(.data$sample) - ggplot2::after_stat(.data$theoretical)),

Check warning on line 267 in R/plot.check_normality.R

View workflow job for this annotation

GitHub Actions / lint / lint

file=R/plot.check_normality.R,line=267,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 124 characters.

Check warning on line 267 in R/plot.check_normality.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/plot.check_normality.R,line=267,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 124 characters.
shape = 16,
na.rm = TRUE,
stroke = 0,
Expand Down
4 changes: 3 additions & 1 deletion R/plot.check_predictions.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@
#'
#' @return A ggplot2-object.
#'
#' @seealso See also the vignette about [`check_model()`](https://easystats.github.io/performance/articles/check_model.html).

Check warning on line 56 in R/plot.check_predictions.R

View workflow job for this annotation

GitHub Actions / lint / lint

file=R/plot.check_predictions.R,line=56,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 125 characters.

Check warning on line 56 in R/plot.check_predictions.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/plot.check_predictions.R,line=56,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 125 characters.
#'
#' @examplesIf require("performance")
#' @examples
#' library(performance)
#'
#' model <- lm(Sepal.Length ~ Species * Petal.Width + Petal.Length, data = iris)
#' check_predictions(model)
#'
Expand Down Expand Up @@ -84,7 +86,7 @@
check_range <- isTRUE(attributes(x)$check_range)
plot_type <- attributes(x)$type

if (missing(type) && !is.null(plot_type) && plot_type %in% c("density", "discrete_dots", "discrete_interval", "discrete_both")) {

Check warning on line 89 in R/plot.check_predictions.R

View workflow job for this annotation

GitHub Actions / lint / lint

file=R/plot.check_predictions.R,line=89,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 131 characters.

Check warning on line 89 in R/plot.check_predictions.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/plot.check_predictions.R,line=89,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 131 characters.
type <- plot_type
} else {
type <- match.arg(type)
Expand Down
4 changes: 2 additions & 2 deletions R/plot.compare_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
#'
#' @return A ggplot2-object.
#'
#' @examplesIf require("insight") && require("parameters")
#' @examples
#' data(iris)
#' lm1 <- lm(Sepal.Length ~ Species, data = iris)
#' lm2 <- lm(Sepal.Length ~ Species + Petal.Length, data = iris)
#' lm3 <- lm(Sepal.Length ~ Species * Petal.Length, data = iris)
#' result <- compare_parameters(lm1, lm2, lm3)
#' result <- parameters::compare_parameters(lm1, lm2, lm3)
#' plot(result)
#' @export
plot.see_compare_parameters <- function(x,

Check warning on line 25 in R/plot.compare_parameters.R

View workflow job for this annotation

GitHub Actions / lint / lint

file=R/plot.compare_parameters.R,line=25,col=1,[cyclocomp_linter] Reduce the cyclomatic complexity of this function from 43 to at most 40.

Check warning on line 25 in R/plot.compare_parameters.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/plot.compare_parameters.R,line=25,col=1,[cyclocomp_linter] Reduce the cyclomatic complexity of this function from 43 to at most 40.
show_intercept = FALSE,
size_point = 0.8,
size_text = NA,
Expand Down Expand Up @@ -123,7 +123,7 @@
# largest data points that are within this range. Thereby we have the pretty
# values we can use as breaks and labels for the scale...
if (exponentiated_coefs) {
range <- 2^(-24:16)

Check warning on line 126 in R/plot.compare_parameters.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/plot.compare_parameters.R,line=126,col=5,[object_overwrite_linter] 'range' is an exported object from package 'base'. Avoid re-using such symbols.
x_low <- which.min(min(x$CI_low) > range) - 1L
x_high <- which.max(max(x$CI_high) < range)
if (add_values) {
Expand Down
4 changes: 3 additions & 1 deletion R/plot.estimate_contrasts.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ data_plot.estimate_contrasts <- function(x, data = NULL, ...) {
#'
#' @return A ggplot2-object.
#'
#' @examplesIf require("modelbased") && require("emmeans")
#' @examplesIf require("emmeans")
#' \donttest{
#' library(modelbased)
#'
#' model <- lm(Sepal.Width ~ Species, data = iris)
#' contrasts <- estimate_contrasts(model)
#' means <- estimate_means(model)
Expand Down
4 changes: 2 additions & 2 deletions R/plot.n_factors.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ data_plot.n_clusters <- data_plot.n_factors
#'
#' @return A ggplot2-object.
#'
#' @examplesIf require("parameters") && require("nFactors")
#' @examplesIf require("nFactors")
#' data(mtcars)
#' result <- n_factors(mtcars, type = "PCA")
#' result <- parameters::n_factors(mtcars, type = "PCA")
#' result
#'
#' plot(result) # type = "bar" by default
Expand Down
2 changes: 1 addition & 1 deletion R/plot.parameters_brms_meta.R
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ data_plot.parameters_brms_meta <- function(x, data = NULL, normalize_height = TR
#' prior(cauchy(0, 0.5), class = sd)
#' )
#' model <- suppressWarnings(
#' brm(yi | se(vi) ~ 1 + (1 | author), data = dat)
#' brm(yi | se(vi) ~ 1 + (1 | author), data = dat, refresh = 0, silent = 2)
#' )
#'
#' # result
Expand Down
2 changes: 1 addition & 1 deletion R/plot.performance_simres.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#' @export
plot.see_performance_simres <- function(x,
size_line = 0.8,
size_point = 1.5,
size_point = 2,
alpha = 0.2,
dot_alpha = 0.8,
colors = c("#3aaf85", "#1b6ca8"),
Expand Down
11 changes: 2 additions & 9 deletions R/scale_color_bluebrown.R
IndrajeetPatil marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
pal <- palette_bluebrown(palette = palette, reverse = reverse)

if (discrete) {
discrete_scale(aesthetics = aesthetics, paste0("bluebrown_", palette), palette = pal, ...)
discrete_scale(aesthetics = aesthetics, palette = pal, ...)

Check warning on line 23 in R/scale_color_bluebrown.R

View check run for this annotation

Codecov / codecov/patch

R/scale_color_bluebrown.R#L23

Added line #L23 was not covered by tests
} else {
scale_color_gradientn(colours = pal(256), aesthetics = aesthetics, ...)
}
Expand Down Expand Up @@ -93,12 +93,7 @@
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 @@
# 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 @@
pal <- palette_metro(palette = palette, reverse = reverse)

if (discrete) {
discrete_scale(aesthetics = aesthetics, paste0("metro_", palette), palette = pal, ...)
discrete_scale(aesthetics = aesthetics, palette = pal, ...)

Check warning on line 38 in R/scale_color_metro.R

View check run for this annotation

Codecov / codecov/patch

R/scale_color_metro.R#L38

Added line #L38 was not covered by tests
} else {
scale_color_gradientn(colours = pal(256), aesthetics = aesthetics, ...)
}
Expand Down Expand Up @@ -108,7 +108,7 @@
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 @@
pal <- palette_pizza(palette = palette, reverse = reverse)

if (discrete) {
discrete_scale(aesthetics = aesthetics, paste0("pizza_", palette), palette = pal, ...)
discrete_scale(aesthetics = aesthetics, palette = pal, ...)

Check warning on line 34 in R/scale_color_pizza.R

View check run for this annotation

Codecov / codecov/patch

R/scale_color_pizza.R#L34

Added line #L34 was not covered by tests
} else {
scale_color_gradientn(colours = pal(256), aesthetics = aesthetics, ...)
}
Expand Down Expand Up @@ -100,7 +100,7 @@
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 @@
pal <- palette_social(palette = palette, reverse = reverse)

if (discrete) {
discrete_scale(aesthetics = aesthetics, paste0("social_", palette), palette = pal, ...)
discrete_scale(aesthetics = aesthetics, palette = pal, ...)

Check warning on line 33 in R/scale_color_social.R

View check run for this annotation

Codecov / codecov/patch

R/scale_color_social.R#L33

Added line #L33 was not covered by tests
} else {
scale_color_gradientn(colours = pal(256), aesthetics = aesthetics, ...)
}
Expand Down Expand Up @@ -79,7 +79,7 @@
pal <- palette_social(palette = palette, reverse = reverse)

if (discrete) {
discrete_scale(aesthetics = aesthetics, paste0("social_", palette), palette = pal, ...)
discrete_scale(aesthetics = aesthetics, palette = pal, ...)

Check warning on line 82 in R/scale_color_social.R

View check run for this annotation

Codecov / codecov/patch

R/scale_color_social.R#L82

Added line #L82 was not covered by tests
} else {
scale_fill_gradientn(colours = pal(256), aesthetics = aesthetics, ...)
}
Expand Down
4 changes: 2 additions & 2 deletions man/add_plot_attributes.Rd

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

Loading
Loading