From 90be1b5e7e2634199b0b362e32b986a85570cb6a Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Mon, 29 Apr 2024 06:52:52 +0200 Subject: [PATCH] CRAN submission: see 0.8.4 (#341) * Update plot.n_factors.R * delete unnecessary file * effectsize vdiffr test * add another vdiffr test * Update NEWS.md * also add merDeriv * bump version * get rid of ggrepel warnings * size -> linewidth * cran submission --- DESCRIPTION | 4 +- NEWS.md | 4 +- R/global_vars.R | 4 +- R/plot.check_homogeneity.R | 6 +- R/plot.n_factors.R | 18 +- .../aov-eta-squared-dot-plot.svg | 59 +++ .../_snaps/plot.n_factors/area-graph.svg | 80 ++++ tests/testthat/test-check_model.R | 1 + tests/testthat/test-plot.effectsize_table.R | 16 +- tests/testthat/test-plot.n_factors.R | 6 + tests/vdiffr.Rout.fail | 370 ------------------ vignettes/performance.Rmd | 2 +- vignettes/seecolorscales.Rmd | 48 +-- vignettes/seecolorscales_dark.Rmd | 36 +- 14 files changed, 217 insertions(+), 437 deletions(-) create mode 100644 tests/testthat/_snaps/plot.effectsize_table/aov-eta-squared-dot-plot.svg create mode 100644 tests/testthat/_snaps/plot.n_factors/area-graph.svg delete mode 100644 tests/vdiffr.Rout.fail diff --git a/DESCRIPTION b/DESCRIPTION index 6edffb3f0..2edfe3d3b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: see Title: Model Visualisation Toolbox for 'easystats' and 'ggplot2' -Version: 0.8.3.7 +Version: 0.8.4 Authors@R: c(person(given = "Daniel", family = "Lüdecke", @@ -91,6 +91,7 @@ Suggests: logspline, MASS, mclust, + merDeriv, mgcv, metafor, NbClust, @@ -119,4 +120,3 @@ Config/Needs/website: r-lib/pkgdown, easystats/easystatstemplate Config/rcmdcheck/ignore-inconsequential-notes: true -Remotes: easystats/performance diff --git a/NEWS.md b/NEWS.md index e6b1fa880..0aa08dc6a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,7 +1,9 @@ -# see 0.8.3.1 +# see 0.8.4 ## Minor Changes +* Fixes warnings generated from the `{ggplot2}` 3.5.0 release. + * Small adjustment to size of point geoms for `check_model()` plots. * More arguments to change base font sizes and geom sizes are now passed to diff --git a/R/global_vars.R b/R/global_vars.R index 16dfac4fb..f31ec1439 100644 --- a/R/global_vars.R +++ b/R/global_vars.R @@ -10,6 +10,8 @@ utils::globalVariables( "grp", "Parameter", "predictor", - "ROPE_Equivalence" + "ROPE_Equivalence", + "x_intercept", + "y_max" ) ) diff --git a/R/plot.check_homogeneity.R b/R/plot.check_homogeneity.R index d5bfe9df2..209e6f1b8 100644 --- a/R/plot.check_homogeneity.R +++ b/R/plot.check_homogeneity.R @@ -66,7 +66,8 @@ plot.see_check_homogeneity <- function(x, data = NULL, ...) { stringsAsFactors = FALSE ), direction = "y", - segment.colour = NA + segment.colour = NA, + max.overlaps = Inf ) } else { geom_label( @@ -96,7 +97,8 @@ plot.see_check_homogeneity <- function(x, data = NULL, ...) { stringsAsFactors = FALSE ), direction = "y", - segment.colour = NA + segment.colour = NA, + max.overlaps = Inf ) } else { geom_label( diff --git a/R/plot.n_factors.R b/R/plot.n_factors.R index 31a265d05..bb2b63843 100644 --- a/R/plot.n_factors.R +++ b/R/plot.n_factors.R @@ -25,7 +25,6 @@ data_plot.n_factors <- function(x, data = NULL, type = "bar", ...) { dataplot <- rbind(s1, s2[!s2[[variable]] %in% s1[[variable]], ]) - # Add Variance explained if ("Variance_Explained" %in% names(attributes(x))) { dataplot$Variance_Cumulative <- NULL # Remove column and re add dataplot <- merge( @@ -52,6 +51,7 @@ data_plot.n_factors <- function(x, data = NULL, type = "bar", ...) { rownames(dataplot) <- NULL # Labels and titles ----------------------------------------------------- + n_max <- sum(dataplot$n_Methods) axis_lab <- paste0("% of methods (out of ", n_max, ")") @@ -67,7 +67,6 @@ data_plot.n_factors <- function(x, data = NULL, type = "bar", ...) { ylab = axis_lab ) } - # Title attr(dataplot, "info")$title <- paste("How many", lab, "to retain") attr(dataplot, "info")$subtitle <- paste0("Number of ", lab, " considered optimal by various algorithm") @@ -137,21 +136,25 @@ plot.see_n_factors <- function(x, # Base plot if (type == "area") { + segment_data <- data.frame(x_intercept = x$x[which.max(x$y)], y_max = max(x$y, na.rm = TRUE)) p <- ggplot(x, aes(x = .data$x, y = .data$y)) + geom_area(fill = flat_colors("grey")) + geom_segment( + data = segment_data, aes( - x = .data$x[which.max(.data$y)], - xend = .data$x[which.max(.data$y)], + x = x_intercept, + xend = x_intercept, y = 0, - yend = max(.data$y) + yend = y_max ), color = flat_colors("red") ) + - geom_point(aes(x = .data$x[which.max(.data$y)], y = max(.data$y)), + geom_point( + data = segment_data, + aes(x = x_intercept, y = y_max), color = flat_colors("red") ) + - scale_x_continuous(breaks = 1:max(x$x)) + + scale_x_continuous(breaks = 1:max(x$x, na.rm = TRUE)) + add_plot_attributes(x) } else if (type == "line") { p <- ggplot(x, aes(y = .data$x, x = .data$y, colour = .data$group)) + @@ -172,7 +175,6 @@ plot.see_n_factors <- function(x, scale_fill_manual(values = unname(flat_colors(c("grey", "red")))) } - # Add variance explained if ("Variance_Cumulative" %in% names(x)) { x$Varex_scaled <- x$Variance_Cumulative * max(x$y) p <- p + diff --git a/tests/testthat/_snaps/plot.effectsize_table/aov-eta-squared-dot-plot.svg b/tests/testthat/_snaps/plot.effectsize_table/aov-eta-squared-dot-plot.svg new file mode 100644 index 000000000..ac4676a79 --- /dev/null +++ b/tests/testthat/_snaps/plot.effectsize_table/aov-eta-squared-dot-plot.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +factor(am):factor(cyl) +factor(cyl) +factor(am) + +0.00 +0.25 +0.50 +0.75 +1.00 +Eta2 (partial) +Parameter +aov - eta_squared - dot plot + + diff --git a/tests/testthat/_snaps/plot.n_factors/area-graph.svg b/tests/testthat/_snaps/plot.n_factors/area-graph.svg new file mode 100644 index 000000000..a4b69402d --- /dev/null +++ b/tests/testthat/_snaps/plot.n_factors/area-graph.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0% +10% +20% +30% + + + + + + + + + +0% +25% +50% +75% +100% + + + + + + + + + +1 +2 +3 +4 +5 +6 +7 +8 +9 +Number of factors +% of methods (out of 17) +% of variance explained +Number of factors considered optimal by various algorithm. The dashed line represent the cumulative percentage of variance explained +How many factors to retain + + diff --git a/tests/testthat/test-check_model.R b/tests/testthat/test-check_model.R index 88729b64d..667ddff68 100644 --- a/tests/testthat/test-check_model.R +++ b/tests/testthat/test-check_model.R @@ -117,6 +117,7 @@ test_that("`check_model()` works if convergence issues", { test_that("`check_model()` works if convergence issues", { skip_on_cran() skip_if_not_installed("performance") + skip_if_not_installed("merDeriv") data(mtcars) m <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars) set.seed(123) diff --git a/tests/testthat/test-plot.effectsize_table.R b/tests/testthat/test-plot.effectsize_table.R index b7fea2f1d..bbb6b490c 100644 --- a/tests/testthat/test-plot.effectsize_table.R +++ b/tests/testthat/test-plot.effectsize_table.R @@ -1,13 +1,9 @@ test_that("`plot.see_effectsize_table()` works", { - library(effectsize) m <- aov(mpg ~ factor(am) * factor(cyl), data = mtcars) - result <- eta_squared(m) - expect_s3_class(plot(result), "gg") -}) - -test_that("`plot.see_equivalence_test()` works", { - library(effectsize) - m <- aov(mpg ~ factor(am) * factor(cyl), data = mtcars) - result <- eta_squared(m) - expect_s3_class(plot(result), "gg") + result <- effectsize::eta_squared(m) + set.seed(123) + vdiffr::expect_doppelganger( + title = "aov - eta_squared - dot plot", + fig = plot(result) + ) }) diff --git a/tests/testthat/test-plot.n_factors.R b/tests/testthat/test-plot.n_factors.R index a3a275e6d..529ed0c11 100644 --- a/tests/testthat/test-plot.n_factors.R +++ b/tests/testthat/test-plot.n_factors.R @@ -14,4 +14,10 @@ test_that("`plot.see_n_factors()` works", { title = "line graph", fig = plot(result, type = "line") ) + + set.seed(123) + vdiffr::expect_doppelganger( + title = "area graph", + fig = plot(result, type = "area") + ) }) diff --git a/tests/vdiffr.Rout.fail b/tests/vdiffr.Rout.fail deleted file mode 100644 index 406c78ae1..000000000 --- a/tests/vdiffr.Rout.fail +++ /dev/null @@ -1,370 +0,0 @@ -Environment: -- vdiffr-svg-engine: 2.0 -- vdiffr: 1.0.7 - - -Failed doppelganger: check-model-works-for-lm (C:\Users\mail\Documents\R\easystats\see\tests\testthat\_snaps/check_model/check-model-works-for-lm.svg) - -< before -> after -@@ 22,80 / 22,80 @@ - - -< -> -< -> - - -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> -< -> - - -< -> -< -2 -> -2 -< -1 -> -1 -< 0 -> 0 -< 1 -> 1 -< 2 -> 2 -< -> -< -2 -> -2 -< -1 -> -1 -< 0 -> 0 -< 1 -> 1 -< 2 -> 2 -< Standard Normal Distribution Quantiles -> Standard Normal Distribution Quantiles -< Sample Quantile Deviations -> Sample Quantile Deviations - Dots should fall along the lin - e - Normality of Residuals - diff --git a/vignettes/performance.Rmd b/vignettes/performance.Rmd index 0a3ae1fe9..36b8ac2bb 100644 --- a/vignettes/performance.Rmd +++ b/vignettes/performance.Rmd @@ -208,7 +208,7 @@ _([related function documentation](https://easystats.github.io/performance/refer ```{r} model <- lm(len ~ supp + dose, data = ToothGrowth) result <- check_homogeneity(model) -suppressWarnings(plot(result)) +plot(result) ``` ## Posterior Predictive Checks diff --git a/vignettes/seecolorscales.Rmd b/vignettes/seecolorscales.Rmd index 7c54103c5..816b713fa 100644 --- a/vignettes/seecolorscales.Rmd +++ b/vignettes/seecolorscales.Rmd @@ -90,7 +90,7 @@ to give an impression how these scales work with different type of data. ```{r} p1 <- ggplot(d1, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_social() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = Species)) + @@ -104,7 +104,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d2, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_social() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group4)) + @@ -118,7 +118,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d3, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_social() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group5)) + @@ -134,7 +134,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d1, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_material() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = Species)) + @@ -148,7 +148,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d2, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_material() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group4)) + @@ -162,7 +162,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d3, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_material() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group5)) + @@ -178,7 +178,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d1, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_flat() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = Species)) + @@ -192,7 +192,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d2, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_flat() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group4)) + @@ -206,7 +206,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d3, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_flat() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group5)) + @@ -222,7 +222,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d1, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_metro() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = Species)) + @@ -236,7 +236,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d2, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_metro() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group4)) + @@ -250,7 +250,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d3, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_metro() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group5)) + @@ -266,7 +266,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d1, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_see() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = Species)) + @@ -280,7 +280,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d2, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_see() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group4)) + @@ -294,7 +294,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d3, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_see() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group5)) + @@ -310,7 +310,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d1, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_pizza() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = Species)) + @@ -324,7 +324,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d2, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_pizza() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group4)) + @@ -338,7 +338,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d3, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_pizza() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group5)) + @@ -354,7 +354,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d1, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_bluebrown() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = Species)) + @@ -368,7 +368,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d2, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_bluebrown() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group4)) + @@ -382,7 +382,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d3, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_bluebrown() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group5)) + @@ -398,7 +398,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d1, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_okabeito() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = Species)) + @@ -412,7 +412,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d2, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_okabeito() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group4)) + @@ -426,7 +426,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d3, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_okabeito() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group5)) + diff --git a/vignettes/seecolorscales_dark.Rmd b/vignettes/seecolorscales_dark.Rmd index 722f3caf5..6f219b799 100644 --- a/vignettes/seecolorscales_dark.Rmd +++ b/vignettes/seecolorscales_dark.Rmd @@ -91,7 +91,7 @@ especially for *dark themes*. ```{r} p1 <- ggplot(d1, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_social(palette = "light") p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = Species)) + @@ -105,7 +105,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d2, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_social(palette = "light") p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group4)) + @@ -119,7 +119,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d3, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_social(palette = "light") p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group5)) + @@ -135,7 +135,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d1, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_material(palette = "light") p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = Species)) + @@ -149,7 +149,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d2, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_material(palette = "light") p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group4)) + @@ -163,7 +163,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d3, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_material(palette = "light") p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group5)) + @@ -179,7 +179,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d1, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_flat(palette = "light") p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = Species)) + @@ -193,7 +193,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d2, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_flat(palette = "light") p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group4)) + @@ -207,7 +207,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d3, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_flat(palette = "light") p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group5)) + @@ -223,7 +223,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d1, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_metro(palette = "light") p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = Species)) + @@ -237,7 +237,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d2, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_metro(palette = "light") p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group4)) + @@ -251,7 +251,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d3, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_metro(palette = "light") p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group5)) + @@ -267,7 +267,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d1, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_see(palette = "light") p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = Species)) + @@ -281,7 +281,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d2, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_see(palette = "light") p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group4)) + @@ -295,7 +295,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d3, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_see(palette = "light") p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group5)) + @@ -311,7 +311,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d1, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_pizza() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = Species)) + @@ -325,7 +325,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d2, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_pizza() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group4)) + @@ -339,7 +339,7 @@ plots(p1, p2, n_rows = 1) ```{r} p1 <- ggplot(d3, aes(x, y, colour = group)) + - geom_line(size = 1) + + geom_line(linewidth = 1) + scale_color_pizza() p2 <- ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = group5)) +