diff --git a/R/gg_area.R b/R/gg_area.R
index 8c49ca34a..d7d96b897 100644
--- a/R/gg_area.R
+++ b/R/gg_area.R
@@ -25,7 +25,7 @@ gg_area <- function(data = NULL,
stat = "align",
position = "stack",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_bar.R b/R/gg_bar.R
index 7c12f0376..f952f7c29 100644
--- a/R/gg_bar.R
+++ b/R/gg_bar.R
@@ -25,7 +25,7 @@ gg_bar <- function(data = NULL,
stat = "count",
position = "stack",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_bin_2d.R b/R/gg_bin_2d.R
index 993fd05c6..a003163c3 100644
--- a/R/gg_bin_2d.R
+++ b/R/gg_bin_2d.R
@@ -24,7 +24,7 @@ gg_bin_2d <- function(data = NULL,
stat = "bin2d",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_blanket.R b/R/gg_blanket.R
index f806de293..61b9d87b6 100644
--- a/R/gg_blanket.R
+++ b/R/gg_blanket.R
@@ -66,7 +66,7 @@ gg_blanket <- function(data = NULL,
stat = "identity",
position = "identity",
coord = NULL,
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
@@ -132,7 +132,7 @@ gg_blanket <- function(data = NULL,
caption = NULL,
label_to_case = snakecase::to_sentence_case) {
- suppressMessages(ggblend::blend(blend = blend))
+ options(ggblend.check_blend = FALSE)
##############################################################################
#quote
@@ -210,32 +210,58 @@ gg_blanket <- function(data = NULL,
if (stringr::str_detect(stat_name, "sf")) {
if (rlang::is_null(coord)) coord <- ggplot2::coord_sf(clip = "off")
- plot <- plot +
- ggplot2::layer_sf(
- geom = geom,
- stat = stat,
- position = position,
- mapping = ggplot2::aes(!!!mapping),
- params = rlang::list2(...),
- show.legend = show_legend,
- # ) +
- ) |> ggblend::blend(blend = blend) +
- coord
+ if (rlang::is_null(blend)) {
+ plot <- plot +
+ ggplot2::layer_sf(
+ geom = geom,
+ stat = stat,
+ position = position,
+ mapping = ggplot2::aes(!!!mapping),
+ params = rlang::list2(...),
+ show.legend = show_legend,
+ ) +
+ coord
+ }
+ else {
+ plot <- plot +
+ ggplot2::layer_sf(
+ geom = geom,
+ stat = stat,
+ position = position,
+ mapping = ggplot2::aes(!!!mapping),
+ params = rlang::list2(...),
+ show.legend = show_legend,
+ ) |> ggblend::blend(blend = blend) +
+ coord
+ }
}
else {
if (rlang::is_null(coord)) coord <- ggplot2::coord_cartesian(clip = "off")
- plot <- plot +
- ggplot2::layer(
- geom = geom,
- stat = stat,
- position = position,
- mapping = ggplot2::aes(!!!mapping),
- params = rlang::list2(outlier.alpha = 1, ...),
- show.legend = show_legend,
- # ) +
- ) |> ggblend::blend(blend = blend) +
- coord
+ if (rlang::is_null(blend)) {
+ plot <- plot +
+ ggplot2::layer(
+ geom = geom,
+ stat = stat,
+ position = position,
+ mapping = ggplot2::aes(!!!mapping),
+ params = rlang::list2(outlier.alpha = 1, ...),
+ show.legend = show_legend,
+ ) +
+ coord
+ }
+ else {
+ plot <- plot +
+ ggplot2::layer(
+ geom = geom,
+ stat = stat,
+ position = position,
+ mapping = ggplot2::aes(!!!mapping),
+ params = rlang::list2(outlier.alpha = 1, ...),
+ show.legend = show_legend,
+ ) |> ggblend::blend(blend = blend) +
+ coord
+ }
}
suppressMessages({
@@ -403,32 +429,58 @@ gg_blanket <- function(data = NULL,
if (stringr::str_detect(stat_name, "sf")) {
if (rlang::is_null(coord)) coord <- ggplot2::coord_sf(clip = "off")
- plot <- plot +
- ggplot2::layer_sf(
- geom = geom,
- stat = stat,
- position = position,
- mapping = ggplot2::aes(!!!mapping),
- params = rlang::list2(...),
- show.legend = show_legend,
- # ) +
- ) |> ggblend::blend(blend = blend) +
- coord
+ if (rlang::is_null(blend)) {
+ plot <- plot +
+ ggplot2::layer_sf(
+ geom = geom,
+ stat = stat,
+ position = position,
+ mapping = ggplot2::aes(!!!mapping),
+ params = rlang::list2(...),
+ show.legend = show_legend,
+ ) +
+ coord
+ }
+ else {
+ plot <- plot +
+ ggplot2::layer_sf(
+ geom = geom,
+ stat = stat,
+ position = position,
+ mapping = ggplot2::aes(!!!mapping),
+ params = rlang::list2(...),
+ show.legend = show_legend,
+ ) |> ggblend::blend(blend = blend) +
+ coord
+ }
}
else {
if (rlang::is_null(coord)) coord <- ggplot2::coord_cartesian(clip = "off")
- plot <- plot +
- ggplot2::layer(
- geom = geom,
- stat = stat,
- position = position,
- mapping = ggplot2::aes(!!!mapping),
- params = rlang::list2(outlier.alpha = 1, ...),
- show.legend = show_legend,
- # ) +
- ) |> ggblend::blend(blend = blend) +
- coord
+ if (rlang::is_null(blend)) {
+ plot <- plot +
+ ggplot2::layer(
+ geom = geom,
+ stat = stat,
+ position = position,
+ mapping = ggplot2::aes(!!!mapping),
+ params = rlang::list2(outlier.alpha = 1, ...),
+ show.legend = show_legend,
+ ) +
+ coord
+ }
+ else {
+ plot <- plot +
+ ggplot2::layer(
+ geom = geom,
+ stat = stat,
+ position = position,
+ mapping = ggplot2::aes(!!!mapping),
+ params = rlang::list2(outlier.alpha = 1, ...),
+ show.legend = show_legend,
+ ) |> ggblend::blend(blend = blend) +
+ coord
+ }
}
if (!rlang::is_null(x_expand_limits)) {
diff --git a/R/gg_boxplot.R b/R/gg_boxplot.R
index 4161c1c27..83e41f3b8 100644
--- a/R/gg_boxplot.R
+++ b/R/gg_boxplot.R
@@ -26,7 +26,7 @@ gg_boxplot <- function(data = NULL,
stat = "boxplot",
position = "dodge2",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_col.R b/R/gg_col.R
index 322a39fd3..4dcbc9de4 100644
--- a/R/gg_col.R
+++ b/R/gg_col.R
@@ -31,7 +31,7 @@ gg_col <- function(data = NULL,
stat = "identity",
position = "stack",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_contour.R b/R/gg_contour.R
index 63b7d20d3..156360b72 100644
--- a/R/gg_contour.R
+++ b/R/gg_contour.R
@@ -25,7 +25,7 @@ gg_contour <- function(data = NULL,
stat = "contour",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_contour_filled.R b/R/gg_contour_filled.R
index 63e75f5a4..da6d5bdf9 100644
--- a/R/gg_contour_filled.R
+++ b/R/gg_contour_filled.R
@@ -26,7 +26,7 @@ gg_contour_filled <- function(data = NULL,
stat = "contour_filled",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_crossbar.R b/R/gg_crossbar.R
index 2710741ff..da43bc205 100644
--- a/R/gg_crossbar.R
+++ b/R/gg_crossbar.R
@@ -36,7 +36,7 @@ gg_crossbar <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_density.R b/R/gg_density.R
index f9eb958e5..ce56647eb 100644
--- a/R/gg_density.R
+++ b/R/gg_density.R
@@ -25,7 +25,7 @@ gg_density <- function(data = NULL,
stat = "density",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_density_2d.R b/R/gg_density_2d.R
index 3c5d9c416..71aed6e16 100644
--- a/R/gg_density_2d.R
+++ b/R/gg_density_2d.R
@@ -27,7 +27,7 @@ gg_density_2d <- function(data = NULL,
stat = "density_2d",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_density_2d_filled.R b/R/gg_density_2d_filled.R
index 53e0f134b..d2a3df404 100644
--- a/R/gg_density_2d_filled.R
+++ b/R/gg_density_2d_filled.R
@@ -27,7 +27,7 @@ gg_density_2d_filled <- function(data = NULL,
stat = "density_2d_filled",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_errorbar.R b/R/gg_errorbar.R
index 7441efe08..52645ca68 100644
--- a/R/gg_errorbar.R
+++ b/R/gg_errorbar.R
@@ -36,7 +36,7 @@ gg_errorbar <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_freqpoly.R b/R/gg_freqpoly.R
index 1f550f58e..bcbe6db9f 100644
--- a/R/gg_freqpoly.R
+++ b/R/gg_freqpoly.R
@@ -25,7 +25,7 @@ gg_freqpoly <- function(data = NULL,
stat = "bin",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_function.R b/R/gg_function.R
index 706e72a56..40653d40c 100644
--- a/R/gg_function.R
+++ b/R/gg_function.R
@@ -24,7 +24,7 @@ gg_function <- function(data = NULL,
stat = "function",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_hex.R b/R/gg_hex.R
index 823fdce5b..d7cd52000 100644
--- a/R/gg_hex.R
+++ b/R/gg_hex.R
@@ -25,7 +25,7 @@ gg_hex <- function(data = NULL,
stat = "binhex",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_histogram.R b/R/gg_histogram.R
index 2c31406be..1b0ec133e 100644
--- a/R/gg_histogram.R
+++ b/R/gg_histogram.R
@@ -26,7 +26,7 @@ gg_histogram <- function(data = NULL,
stat = "bin",
position = "stack",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_jitter.R b/R/gg_jitter.R
index ca34f75ee..544a0a520 100644
--- a/R/gg_jitter.R
+++ b/R/gg_jitter.R
@@ -31,7 +31,7 @@ gg_jitter <- function(data = NULL,
stat = "identity",
position = "jitter",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_label.R b/R/gg_label.R
index 21dfe9e1a..2e56e1696 100644
--- a/R/gg_label.R
+++ b/R/gg_label.R
@@ -33,7 +33,7 @@ gg_label <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_line.R b/R/gg_line.R
index c4ada2851..dabecf6f2 100644
--- a/R/gg_line.R
+++ b/R/gg_line.R
@@ -26,7 +26,7 @@ gg_line <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_linerange.R b/R/gg_linerange.R
index bacbf2791..dde564a42 100644
--- a/R/gg_linerange.R
+++ b/R/gg_linerange.R
@@ -35,7 +35,7 @@ gg_linerange <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_path.R b/R/gg_path.R
index cddc5caf3..2fd020d70 100644
--- a/R/gg_path.R
+++ b/R/gg_path.R
@@ -28,7 +28,7 @@ gg_path <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_point.R b/R/gg_point.R
index fb4b8e9ae..b1775deec 100644
--- a/R/gg_point.R
+++ b/R/gg_point.R
@@ -26,7 +26,7 @@ gg_point <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_pointrange.R b/R/gg_pointrange.R
index 32edeb933..399623f6f 100644
--- a/R/gg_pointrange.R
+++ b/R/gg_pointrange.R
@@ -36,7 +36,7 @@ gg_pointrange <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_polygon.R b/R/gg_polygon.R
index d5d66860c..976abffa9 100644
--- a/R/gg_polygon.R
+++ b/R/gg_polygon.R
@@ -47,7 +47,7 @@ gg_polygon <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_qq.R b/R/gg_qq.R
index f90690c02..4839bcc55 100644
--- a/R/gg_qq.R
+++ b/R/gg_qq.R
@@ -27,7 +27,7 @@ gg_qq <- function(data = NULL,
stat = "qq",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_quantile.R b/R/gg_quantile.R
index d90ed4f52..0f0e94514 100644
--- a/R/gg_quantile.R
+++ b/R/gg_quantile.R
@@ -26,7 +26,7 @@ gg_quantile <- function(data = NULL,
stat = "quantile",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_raster.R b/R/gg_raster.R
index c8c29c29c..862d9b3ba 100644
--- a/R/gg_raster.R
+++ b/R/gg_raster.R
@@ -25,7 +25,7 @@ gg_raster <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_rect.R b/R/gg_rect.R
index cc62efe02..d8950a461 100644
--- a/R/gg_rect.R
+++ b/R/gg_rect.R
@@ -38,7 +38,7 @@ gg_rect <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_ribbon.R b/R/gg_ribbon.R
index 7696290ce..05f6ca384 100644
--- a/R/gg_ribbon.R
+++ b/R/gg_ribbon.R
@@ -29,7 +29,7 @@ gg_ribbon <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_rug.R b/R/gg_rug.R
index 80a4dae9c..cff7026b4 100644
--- a/R/gg_rug.R
+++ b/R/gg_rug.R
@@ -26,7 +26,7 @@ gg_rug <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_segment.R b/R/gg_segment.R
index 42e73b1e4..584f8362a 100644
--- a/R/gg_segment.R
+++ b/R/gg_segment.R
@@ -27,7 +27,7 @@ gg_segment <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_sf.R b/R/gg_sf.R
index fc92a9bff..e58987b45 100644
--- a/R/gg_sf.R
+++ b/R/gg_sf.R
@@ -25,7 +25,7 @@ gg_sf <- function(data = NULL,
stat = "sf",
position = "identity",
coord = ggplot2::coord_sf(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_smooth.R b/R/gg_smooth.R
index 7d38d5082..be69dedb5 100644
--- a/R/gg_smooth.R
+++ b/R/gg_smooth.R
@@ -26,7 +26,7 @@ gg_smooth <- function(data = NULL,
stat = "smooth",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_step.R b/R/gg_step.R
index 6056b5ef5..297ff6110 100644
--- a/R/gg_step.R
+++ b/R/gg_step.R
@@ -27,7 +27,7 @@ gg_step <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_text.R b/R/gg_text.R
index fe9959cd1..e8cccb300 100644
--- a/R/gg_text.R
+++ b/R/gg_text.R
@@ -33,7 +33,7 @@ gg_text <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_tile.R b/R/gg_tile.R
index 8f284f1c9..9306fb2f1 100644
--- a/R/gg_tile.R
+++ b/R/gg_tile.R
@@ -28,7 +28,7 @@ gg_tile <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/R/gg_violin.R b/R/gg_violin.R
index 572d7569a..49aef7933 100644
--- a/R/gg_violin.R
+++ b/R/gg_violin.R
@@ -27,7 +27,7 @@ gg_violin <- function(data = NULL,
stat = "ydensity",
position = "dodge",
coord = ggplot2::coord_cartesian(clip = "off"),
- mode = NULL, mode_orientation = NULL, blend = "over",
+ mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_area.Rd b/man/gg_area.Rd
index d97574500..8688df3bd 100644
--- a/man/gg_area.Rd
+++ b/man/gg_area.Rd
@@ -12,7 +12,7 @@ gg_area(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_bar.Rd b/man/gg_bar.Rd
index fb1ac87a7..f3ca40116 100644
--- a/man/gg_bar.Rd
+++ b/man/gg_bar.Rd
@@ -12,7 +12,7 @@ gg_bar(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_bin_2d.Rd b/man/gg_bin_2d.Rd
index 550555079..d88a120b1 100644
--- a/man/gg_bin_2d.Rd
+++ b/man/gg_bin_2d.Rd
@@ -12,7 +12,7 @@ gg_bin_2d(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_blanket.Rd b/man/gg_blanket.Rd
index c6f58ebf8..7969fa079 100644
--- a/man/gg_blanket.Rd
+++ b/man/gg_blanket.Rd
@@ -13,7 +13,7 @@ gg_blanket(
coord = NULL,
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_boxplot.Rd b/man/gg_boxplot.Rd
index 8e5729606..4a5f1f403 100644
--- a/man/gg_boxplot.Rd
+++ b/man/gg_boxplot.Rd
@@ -12,7 +12,7 @@ gg_boxplot(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_col.Rd b/man/gg_col.Rd
index a4ebf03d4..1377291b7 100644
--- a/man/gg_col.Rd
+++ b/man/gg_col.Rd
@@ -12,7 +12,7 @@ gg_col(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_contour.Rd b/man/gg_contour.Rd
index cec70be5e..f6cb6feae 100644
--- a/man/gg_contour.Rd
+++ b/man/gg_contour.Rd
@@ -12,7 +12,7 @@ gg_contour(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_contour_filled.Rd b/man/gg_contour_filled.Rd
index 03c1031f2..08f0e5293 100644
--- a/man/gg_contour_filled.Rd
+++ b/man/gg_contour_filled.Rd
@@ -12,7 +12,7 @@ gg_contour_filled(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_crossbar.Rd b/man/gg_crossbar.Rd
index 1cd300983..817fe0ea9 100644
--- a/man/gg_crossbar.Rd
+++ b/man/gg_crossbar.Rd
@@ -12,7 +12,7 @@ gg_crossbar(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_density.Rd b/man/gg_density.Rd
index cc43ad780..b727b47c5 100644
--- a/man/gg_density.Rd
+++ b/man/gg_density.Rd
@@ -12,7 +12,7 @@ gg_density(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_density_2d.Rd b/man/gg_density_2d.Rd
index 2d0f72426..93bcc2006 100644
--- a/man/gg_density_2d.Rd
+++ b/man/gg_density_2d.Rd
@@ -12,7 +12,7 @@ gg_density_2d(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_density_2d_filled.Rd b/man/gg_density_2d_filled.Rd
index 4a77306b4..e5a101abd 100644
--- a/man/gg_density_2d_filled.Rd
+++ b/man/gg_density_2d_filled.Rd
@@ -12,7 +12,7 @@ gg_density_2d_filled(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_errorbar.Rd b/man/gg_errorbar.Rd
index 339f4d5d5..8a89aa6ae 100644
--- a/man/gg_errorbar.Rd
+++ b/man/gg_errorbar.Rd
@@ -12,7 +12,7 @@ gg_errorbar(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_freqpoly.Rd b/man/gg_freqpoly.Rd
index f6a519e9e..5712537b9 100644
--- a/man/gg_freqpoly.Rd
+++ b/man/gg_freqpoly.Rd
@@ -12,7 +12,7 @@ gg_freqpoly(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_function.Rd b/man/gg_function.Rd
index ccdb0ffae..d0575b580 100644
--- a/man/gg_function.Rd
+++ b/man/gg_function.Rd
@@ -12,7 +12,7 @@ gg_function(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_hex.Rd b/man/gg_hex.Rd
index d1ead8745..1a86a61bd 100644
--- a/man/gg_hex.Rd
+++ b/man/gg_hex.Rd
@@ -12,7 +12,7 @@ gg_hex(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_histogram.Rd b/man/gg_histogram.Rd
index 9905bc807..fc1e5e1a7 100644
--- a/man/gg_histogram.Rd
+++ b/man/gg_histogram.Rd
@@ -12,7 +12,7 @@ gg_histogram(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_jitter.Rd b/man/gg_jitter.Rd
index 32c7c808e..98168bd0c 100644
--- a/man/gg_jitter.Rd
+++ b/man/gg_jitter.Rd
@@ -12,7 +12,7 @@ gg_jitter(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_label.Rd b/man/gg_label.Rd
index 312cb588e..baf7a8a37 100644
--- a/man/gg_label.Rd
+++ b/man/gg_label.Rd
@@ -12,7 +12,7 @@ gg_label(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_line.Rd b/man/gg_line.Rd
index b0de78d2d..89fdf6242 100644
--- a/man/gg_line.Rd
+++ b/man/gg_line.Rd
@@ -12,7 +12,7 @@ gg_line(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_linerange.Rd b/man/gg_linerange.Rd
index e9c4d649e..42ee62d5f 100644
--- a/man/gg_linerange.Rd
+++ b/man/gg_linerange.Rd
@@ -12,7 +12,7 @@ gg_linerange(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_path.Rd b/man/gg_path.Rd
index 70884ce10..3ccfb92e4 100644
--- a/man/gg_path.Rd
+++ b/man/gg_path.Rd
@@ -12,7 +12,7 @@ gg_path(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_point.Rd b/man/gg_point.Rd
index 7bb22901d..662a682da 100644
--- a/man/gg_point.Rd
+++ b/man/gg_point.Rd
@@ -12,7 +12,7 @@ gg_point(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_pointrange.Rd b/man/gg_pointrange.Rd
index bf9033af9..5b692d9e5 100644
--- a/man/gg_pointrange.Rd
+++ b/man/gg_pointrange.Rd
@@ -12,7 +12,7 @@ gg_pointrange(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_polygon.Rd b/man/gg_polygon.Rd
index 94415abef..07055dc50 100644
--- a/man/gg_polygon.Rd
+++ b/man/gg_polygon.Rd
@@ -12,7 +12,7 @@ gg_polygon(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_qq.Rd b/man/gg_qq.Rd
index a23afbdcf..7e42c534c 100644
--- a/man/gg_qq.Rd
+++ b/man/gg_qq.Rd
@@ -12,7 +12,7 @@ gg_qq(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_quantile.Rd b/man/gg_quantile.Rd
index 7ff946c96..6aecf545d 100644
--- a/man/gg_quantile.Rd
+++ b/man/gg_quantile.Rd
@@ -12,7 +12,7 @@ gg_quantile(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_raster.Rd b/man/gg_raster.Rd
index 9f2caf75a..a075e9535 100644
--- a/man/gg_raster.Rd
+++ b/man/gg_raster.Rd
@@ -12,7 +12,7 @@ gg_raster(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_rect.Rd b/man/gg_rect.Rd
index 00cd63925..a3b080f65 100644
--- a/man/gg_rect.Rd
+++ b/man/gg_rect.Rd
@@ -12,7 +12,7 @@ gg_rect(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_ribbon.Rd b/man/gg_ribbon.Rd
index 9321adb48..95a204222 100644
--- a/man/gg_ribbon.Rd
+++ b/man/gg_ribbon.Rd
@@ -12,7 +12,7 @@ gg_ribbon(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_rug.Rd b/man/gg_rug.Rd
index 5e6711838..51f9ecb35 100644
--- a/man/gg_rug.Rd
+++ b/man/gg_rug.Rd
@@ -12,7 +12,7 @@ gg_rug(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_segment.Rd b/man/gg_segment.Rd
index 80e49af00..6277920ec 100644
--- a/man/gg_segment.Rd
+++ b/man/gg_segment.Rd
@@ -12,7 +12,7 @@ gg_segment(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_sf.Rd b/man/gg_sf.Rd
index 3ca06aa1f..187ea2b47 100644
--- a/man/gg_sf.Rd
+++ b/man/gg_sf.Rd
@@ -12,7 +12,7 @@ gg_sf(
coord = ggplot2::coord_sf(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_smooth.Rd b/man/gg_smooth.Rd
index eeb7a95a1..058b807f3 100644
--- a/man/gg_smooth.Rd
+++ b/man/gg_smooth.Rd
@@ -12,7 +12,7 @@ gg_smooth(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_step.Rd b/man/gg_step.Rd
index f17aa1893..8eddadbe9 100644
--- a/man/gg_step.Rd
+++ b/man/gg_step.Rd
@@ -12,7 +12,7 @@ gg_step(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_text.Rd b/man/gg_text.Rd
index 505579de9..824c1bc24 100644
--- a/man/gg_text.Rd
+++ b/man/gg_text.Rd
@@ -12,7 +12,7 @@ gg_text(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_tile.Rd b/man/gg_tile.Rd
index 8cd6b02d2..ccc79f68b 100644
--- a/man/gg_tile.Rd
+++ b/man/gg_tile.Rd
@@ -12,7 +12,7 @@ gg_tile(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/man/gg_violin.Rd b/man/gg_violin.Rd
index 1954cd3c7..c39806832 100644
--- a/man/gg_violin.Rd
+++ b/man/gg_violin.Rd
@@ -12,7 +12,7 @@ gg_violin(
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL,
mode_orientation = NULL,
- blend = "over",
+ blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
diff --git a/tests/spelling.R b/tests/spelling.R
new file mode 100644
index 000000000..6713838fc
--- /dev/null
+++ b/tests/spelling.R
@@ -0,0 +1,3 @@
+if(requireNamespace('spelling', quietly = TRUE))
+ spelling::spell_check_test(vignettes = TRUE, error = FALSE,
+ skip_on_cran = TRUE)
diff --git a/tests/testthat.R b/tests/testthat.R
new file mode 100644
index 000000000..2132e7aa0
--- /dev/null
+++ b/tests/testthat.R
@@ -0,0 +1,12 @@
+# This file is part of the standard setup for testthat.
+# It is recommended that you do not modify it.
+#
+# Where should you do additional test configuration?
+# Learn more about the roles of various files in:
+# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
+# * https://testthat.r-lib.org/articles/special-files.html
+
+library(testthat)
+library(ggblanket)
+
+test_check("ggblanket")
diff --git a/tests/testthat/_snaps/article-demo-light/gg-area.svg b/tests/testthat/_snaps/article-demo-light/gg-area.svg
new file mode 100644
index 000000000..89bdabd0f
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-area.svg
@@ -0,0 +1,66 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-bar.svg b/tests/testthat/_snaps/article-demo-light/gg-bar.svg
new file mode 100644
index 000000000..812dd9111
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-bar.svg
@@ -0,0 +1,71 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-bin-2d.svg b/tests/testthat/_snaps/article-demo-light/gg-bin-2d.svg
new file mode 100644
index 000000000..e9f5a1c9f
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-bin-2d.svg
@@ -0,0 +1,377 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-blanket.svg b/tests/testthat/_snaps/article-demo-light/gg-blanket.svg
new file mode 100644
index 000000000..d2f857eec
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-blanket.svg
@@ -0,0 +1,78 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-boxplot.svg b/tests/testthat/_snaps/article-demo-light/gg-boxplot.svg
new file mode 100644
index 000000000..37b499c1b
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-boxplot.svg
@@ -0,0 +1,106 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-col.svg b/tests/testthat/_snaps/article-demo-light/gg-col.svg
new file mode 100644
index 000000000..5e57ece22
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-col.svg
@@ -0,0 +1,69 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-contour-filled.svg b/tests/testthat/_snaps/article-demo-light/gg-contour-filled.svg
new file mode 100644
index 000000000..75f313cac
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-contour-filled.svg
@@ -0,0 +1,110 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-contour.svg b/tests/testthat/_snaps/article-demo-light/gg-contour.svg
new file mode 100644
index 000000000..a95bc15ab
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-contour.svg
@@ -0,0 +1,89 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-crossbar.svg b/tests/testthat/_snaps/article-demo-light/gg-crossbar.svg
new file mode 100644
index 000000000..b399bc8fb
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-crossbar.svg
@@ -0,0 +1,70 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-density-2d-filled.svg b/tests/testthat/_snaps/article-demo-light/gg-density-2d-filled.svg
new file mode 100644
index 000000000..556ccd181
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-density-2d-filled.svg
@@ -0,0 +1,110 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-density-2d.svg b/tests/testthat/_snaps/article-demo-light/gg-density-2d.svg
new file mode 100644
index 000000000..cf7253f06
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-density-2d.svg
@@ -0,0 +1,88 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-density.svg b/tests/testthat/_snaps/article-demo-light/gg-density.svg
new file mode 100644
index 000000000..095525b39
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-density.svg
@@ -0,0 +1,99 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-errorbar.svg b/tests/testthat/_snaps/article-demo-light/gg-errorbar.svg
new file mode 100644
index 000000000..0c7295eb5
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-errorbar.svg
@@ -0,0 +1,72 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-freqpoly.svg b/tests/testthat/_snaps/article-demo-light/gg-freqpoly.svg
new file mode 100644
index 000000000..ca037382f
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-freqpoly.svg
@@ -0,0 +1,84 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-function.svg b/tests/testthat/_snaps/article-demo-light/gg-function.svg
new file mode 100644
index 000000000..7a4602922
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-function.svg
@@ -0,0 +1,65 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-hex.svg b/tests/testthat/_snaps/article-demo-light/gg-hex.svg
new file mode 100644
index 000000000..3d2a38185
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-hex.svg
@@ -0,0 +1,416 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-histogram.svg b/tests/testthat/_snaps/article-demo-light/gg-histogram.svg
new file mode 100644
index 000000000..fa4a7c06e
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-histogram.svg
@@ -0,0 +1,519 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-label.svg b/tests/testthat/_snaps/article-demo-light/gg-label.svg
new file mode 100644
index 000000000..f184ae1d4
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-label.svg
@@ -0,0 +1,82 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-line.svg b/tests/testthat/_snaps/article-demo-light/gg-line.svg
new file mode 100644
index 000000000..d023d57d9
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-line.svg
@@ -0,0 +1,64 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-linerange.svg b/tests/testthat/_snaps/article-demo-light/gg-linerange.svg
new file mode 100644
index 000000000..2cc1b0473
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-linerange.svg
@@ -0,0 +1,64 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-path.svg b/tests/testthat/_snaps/article-demo-light/gg-path.svg
new file mode 100644
index 000000000..db064fe5e
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-path.svg
@@ -0,0 +1,69 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-point.svg b/tests/testthat/_snaps/article-demo-light/gg-point.svg
new file mode 100644
index 000000000..be86ebca2
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-point.svg
@@ -0,0 +1,435 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-pointrange.svg b/tests/testthat/_snaps/article-demo-light/gg-pointrange.svg
new file mode 100644
index 000000000..a39c9efcf
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-pointrange.svg
@@ -0,0 +1,70 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-polygon.svg b/tests/testthat/_snaps/article-demo-light/gg-polygon.svg
new file mode 100644
index 000000000..14d6f3c91
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-polygon.svg
@@ -0,0 +1,106 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-qq.svg b/tests/testthat/_snaps/article-demo-light/gg-qq.svg
new file mode 100644
index 000000000..60d350986
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-qq.svg
@@ -0,0 +1,527 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-quantile.svg b/tests/testthat/_snaps/article-demo-light/gg-quantile.svg
new file mode 100644
index 000000000..7a5763e33
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-quantile.svg
@@ -0,0 +1,73 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-raster.svg b/tests/testthat/_snaps/article-demo-light/gg-raster.svg
new file mode 100644
index 000000000..d9cf29347
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-raster.svg
@@ -0,0 +1,92 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-rect.svg b/tests/testthat/_snaps/article-demo-light/gg-rect.svg
new file mode 100644
index 000000000..09a3c3db9
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-rect.svg
@@ -0,0 +1,93 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-ribbon.svg b/tests/testthat/_snaps/article-demo-light/gg-ribbon.svg
new file mode 100644
index 000000000..621458d4e
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-ribbon.svg
@@ -0,0 +1,70 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-segment.svg b/tests/testthat/_snaps/article-demo-light/gg-segment.svg
new file mode 100644
index 000000000..72d09f70c
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-segment.svg
@@ -0,0 +1,73 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-smooth.svg b/tests/testthat/_snaps/article-demo-light/gg-smooth.svg
new file mode 100644
index 000000000..12d54971a
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-smooth.svg
@@ -0,0 +1,94 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-step.svg b/tests/testthat/_snaps/article-demo-light/gg-step.svg
new file mode 100644
index 000000000..238cdb652
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-step.svg
@@ -0,0 +1,68 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-text.svg b/tests/testthat/_snaps/article-demo-light/gg-text.svg
new file mode 100644
index 000000000..00efdb289
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-text.svg
@@ -0,0 +1,79 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-tile.svg b/tests/testthat/_snaps/article-demo-light/gg-tile.svg
new file mode 100644
index 000000000..97462703d
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-tile.svg
@@ -0,0 +1,69 @@
+
+
diff --git a/tests/testthat/_snaps/article-demo-light/gg-violin.svg b/tests/testthat/_snaps/article-demo-light/gg-violin.svg
new file mode 100644
index 000000000..d2f857eec
--- /dev/null
+++ b/tests/testthat/_snaps/article-demo-light/gg-violin.svg
@@ -0,0 +1,78 @@
+
+
diff --git a/tests/testthat/_snaps/article-go-further/1.svg b/tests/testthat/_snaps/article-go-further/1.svg
new file mode 100644
index 000000000..7d072cec1
--- /dev/null
+++ b/tests/testthat/_snaps/article-go-further/1.svg
@@ -0,0 +1,165 @@
+
+
diff --git a/tests/testthat/_snaps/article-go-further/10.svg b/tests/testthat/_snaps/article-go-further/10.svg
new file mode 100644
index 000000000..a7057b80c
--- /dev/null
+++ b/tests/testthat/_snaps/article-go-further/10.svg
@@ -0,0 +1,99 @@
+
+
diff --git a/tests/testthat/_snaps/article-go-further/11.svg b/tests/testthat/_snaps/article-go-further/11.svg
new file mode 100644
index 000000000..1560a0177
--- /dev/null
+++ b/tests/testthat/_snaps/article-go-further/11.svg
@@ -0,0 +1,93 @@
+
+
diff --git a/tests/testthat/_snaps/article-go-further/12.svg b/tests/testthat/_snaps/article-go-further/12.svg
new file mode 100644
index 000000000..c02014327
--- /dev/null
+++ b/tests/testthat/_snaps/article-go-further/12.svg
@@ -0,0 +1,223 @@
+
+
diff --git a/tests/testthat/_snaps/article-go-further/13.svg b/tests/testthat/_snaps/article-go-further/13.svg
new file mode 100644
index 000000000..f90e55b3d
--- /dev/null
+++ b/tests/testthat/_snaps/article-go-further/13.svg
@@ -0,0 +1,113 @@
+
+
diff --git a/tests/testthat/_snaps/article-go-further/2.svg b/tests/testthat/_snaps/article-go-further/2.svg
new file mode 100644
index 000000000..75707b917
--- /dev/null
+++ b/tests/testthat/_snaps/article-go-further/2.svg
@@ -0,0 +1,145 @@
+
+
diff --git a/tests/testthat/_snaps/article-go-further/3.svg b/tests/testthat/_snaps/article-go-further/3.svg
new file mode 100644
index 000000000..82b15bb20
--- /dev/null
+++ b/tests/testthat/_snaps/article-go-further/3.svg
@@ -0,0 +1,213 @@
+
+
diff --git a/tests/testthat/_snaps/article-go-further/4.svg b/tests/testthat/_snaps/article-go-further/4.svg
new file mode 100644
index 000000000..3fcfa3322
--- /dev/null
+++ b/tests/testthat/_snaps/article-go-further/4.svg
@@ -0,0 +1,61 @@
+
+
diff --git a/tests/testthat/_snaps/article-go-further/5.svg b/tests/testthat/_snaps/article-go-further/5.svg
new file mode 100644
index 000000000..68ee8a5cf
--- /dev/null
+++ b/tests/testthat/_snaps/article-go-further/5.svg
@@ -0,0 +1,118 @@
+
+
diff --git a/tests/testthat/_snaps/article-go-further/6.svg b/tests/testthat/_snaps/article-go-further/6.svg
new file mode 100644
index 000000000..4d5996622
--- /dev/null
+++ b/tests/testthat/_snaps/article-go-further/6.svg
@@ -0,0 +1,75 @@
+
+
diff --git a/tests/testthat/_snaps/article-go-further/7.svg b/tests/testthat/_snaps/article-go-further/7.svg
new file mode 100644
index 000000000..e8429b059
--- /dev/null
+++ b/tests/testthat/_snaps/article-go-further/7.svg
@@ -0,0 +1,71 @@
+
+
diff --git a/tests/testthat/_snaps/article-go-further/8.svg b/tests/testthat/_snaps/article-go-further/8.svg
new file mode 100644
index 000000000..d552cfb9a
--- /dev/null
+++ b/tests/testthat/_snaps/article-go-further/8.svg
@@ -0,0 +1,71 @@
+
+
diff --git a/tests/testthat/_snaps/article-go-further/9.svg b/tests/testthat/_snaps/article-go-further/9.svg
new file mode 100644
index 000000000..c8920d578
--- /dev/null
+++ b/tests/testthat/_snaps/article-go-further/9.svg
@@ -0,0 +1,547 @@
+
+
diff --git a/tests/testthat/_snaps/col_palette/1.svg b/tests/testthat/_snaps/col_palette/1.svg
new file mode 100644
index 000000000..75f313cac
--- /dev/null
+++ b/tests/testthat/_snaps/col_palette/1.svg
@@ -0,0 +1,110 @@
+
+
diff --git a/tests/testthat/_snaps/col_palette/10.svg b/tests/testthat/_snaps/col_palette/10.svg
new file mode 100644
index 000000000..ab083b7be
--- /dev/null
+++ b/tests/testthat/_snaps/col_palette/10.svg
@@ -0,0 +1,110 @@
+
+
diff --git a/tests/testthat/_snaps/col_palette/11.svg b/tests/testthat/_snaps/col_palette/11.svg
new file mode 100644
index 000000000..2cc1b0473
--- /dev/null
+++ b/tests/testthat/_snaps/col_palette/11.svg
@@ -0,0 +1,64 @@
+
+
diff --git a/tests/testthat/_snaps/col_palette/12.svg b/tests/testthat/_snaps/col_palette/12.svg
new file mode 100644
index 000000000..627e54664
--- /dev/null
+++ b/tests/testthat/_snaps/col_palette/12.svg
@@ -0,0 +1,124 @@
+
+
diff --git a/tests/testthat/_snaps/col_palette/2.svg b/tests/testthat/_snaps/col_palette/2.svg
new file mode 100644
index 000000000..28c81345c
--- /dev/null
+++ b/tests/testthat/_snaps/col_palette/2.svg
@@ -0,0 +1,412 @@
+
+
diff --git a/tests/testthat/_snaps/col_palette/3.svg b/tests/testthat/_snaps/col_palette/3.svg
new file mode 100644
index 000000000..5feae4936
--- /dev/null
+++ b/tests/testthat/_snaps/col_palette/3.svg
@@ -0,0 +1,414 @@
+
+
diff --git a/tests/testthat/_snaps/col_palette/4.svg b/tests/testthat/_snaps/col_palette/4.svg
new file mode 100644
index 000000000..ab083b7be
--- /dev/null
+++ b/tests/testthat/_snaps/col_palette/4.svg
@@ -0,0 +1,110 @@
+
+
diff --git a/tests/testthat/_snaps/col_palette/5.svg b/tests/testthat/_snaps/col_palette/5.svg
new file mode 100644
index 000000000..f0a5a42b7
--- /dev/null
+++ b/tests/testthat/_snaps/col_palette/5.svg
@@ -0,0 +1,412 @@
+
+
diff --git a/tests/testthat/_snaps/col_palette/6.svg b/tests/testthat/_snaps/col_palette/6.svg
new file mode 100644
index 000000000..5e2db2f48
--- /dev/null
+++ b/tests/testthat/_snaps/col_palette/6.svg
@@ -0,0 +1,414 @@
+
+
diff --git a/tests/testthat/_snaps/col_palette/7.svg b/tests/testthat/_snaps/col_palette/7.svg
new file mode 100644
index 000000000..f0a5a42b7
--- /dev/null
+++ b/tests/testthat/_snaps/col_palette/7.svg
@@ -0,0 +1,412 @@
+
+
diff --git a/tests/testthat/_snaps/col_palette/8.svg b/tests/testthat/_snaps/col_palette/8.svg
new file mode 100644
index 000000000..9b056b281
--- /dev/null
+++ b/tests/testthat/_snaps/col_palette/8.svg
@@ -0,0 +1,414 @@
+
+
diff --git a/tests/testthat/_snaps/col_palette/9.svg b/tests/testthat/_snaps/col_palette/9.svg
new file mode 100644
index 000000000..4868a7305
--- /dev/null
+++ b/tests/testthat/_snaps/col_palette/9.svg
@@ -0,0 +1,414 @@
+
+
diff --git a/tests/testthat/_snaps/datetime/date.svg b/tests/testthat/_snaps/datetime/date.svg
new file mode 100644
index 000000000..686ece3d9
--- /dev/null
+++ b/tests/testthat/_snaps/datetime/date.svg
@@ -0,0 +1,78 @@
+
+
diff --git a/tests/testthat/_snaps/datetime/datetime.svg b/tests/testthat/_snaps/datetime/datetime.svg
new file mode 100644
index 000000000..60ac5cd9b
--- /dev/null
+++ b/tests/testthat/_snaps/datetime/datetime.svg
@@ -0,0 +1,78 @@
+
+
diff --git a/tests/testthat/_snaps/datetime/time.svg b/tests/testthat/_snaps/datetime/time.svg
new file mode 100644
index 000000000..54772abb0
--- /dev/null
+++ b/tests/testthat/_snaps/datetime/time.svg
@@ -0,0 +1,82 @@
+
+
diff --git a/tests/testthat/_snaps/ggproto-etc/all-3.svg b/tests/testthat/_snaps/ggproto-etc/all-3.svg
new file mode 100644
index 000000000..d2f857eec
--- /dev/null
+++ b/tests/testthat/_snaps/ggproto-etc/all-3.svg
@@ -0,0 +1,78 @@
+
+
diff --git a/tests/testthat/_snaps/ggproto-etc/default.svg b/tests/testthat/_snaps/ggproto-etc/default.svg
new file mode 100644
index 000000000..d2f857eec
--- /dev/null
+++ b/tests/testthat/_snaps/ggproto-etc/default.svg
@@ -0,0 +1,78 @@
+
+
diff --git a/tests/testthat/_snaps/ggproto-etc/geomviolin.svg b/tests/testthat/_snaps/ggproto-etc/geomviolin.svg
new file mode 100644
index 000000000..d2f857eec
--- /dev/null
+++ b/tests/testthat/_snaps/ggproto-etc/geomviolin.svg
@@ -0,0 +1,78 @@
+
+
diff --git a/tests/testthat/_snaps/ggproto-etc/positiondodge.svg b/tests/testthat/_snaps/ggproto-etc/positiondodge.svg
new file mode 100644
index 000000000..d2f857eec
--- /dev/null
+++ b/tests/testthat/_snaps/ggproto-etc/positiondodge.svg
@@ -0,0 +1,78 @@
+
+
diff --git a/tests/testthat/_snaps/ggproto-etc/statydensity.svg b/tests/testthat/_snaps/ggproto-etc/statydensity.svg
new file mode 100644
index 000000000..d2f857eec
--- /dev/null
+++ b/tests/testthat/_snaps/ggproto-etc/statydensity.svg
@@ -0,0 +1,78 @@
+
+
diff --git a/tests/testthat/_snaps/labelled/labelled.svg b/tests/testthat/_snaps/labelled/labelled.svg
new file mode 100644
index 000000000..068b59ec7
--- /dev/null
+++ b/tests/testthat/_snaps/labelled/labelled.svg
@@ -0,0 +1,74 @@
+
+
diff --git a/tests/testthat/_snaps/modes/dark-mode-r.svg b/tests/testthat/_snaps/modes/dark-mode-r.svg
new file mode 100644
index 000000000..05fb145be
--- /dev/null
+++ b/tests/testthat/_snaps/modes/dark-mode-r.svg
@@ -0,0 +1,675 @@
+
+
diff --git a/tests/testthat/_snaps/modes/light-mode-b.svg b/tests/testthat/_snaps/modes/light-mode-b.svg
new file mode 100644
index 000000000..b53c47832
--- /dev/null
+++ b/tests/testthat/_snaps/modes/light-mode-b.svg
@@ -0,0 +1,675 @@
+
+
diff --git a/tests/testthat/_snaps/modes/light-mode-r.svg b/tests/testthat/_snaps/modes/light-mode-r.svg
new file mode 100644
index 000000000..50572cc37
--- /dev/null
+++ b/tests/testthat/_snaps/modes/light-mode-r.svg
@@ -0,0 +1,675 @@
+
+
diff --git a/tests/testthat/_snaps/modes/light-mode-t.svg b/tests/testthat/_snaps/modes/light-mode-t.svg
new file mode 100644
index 000000000..4b5a72591
--- /dev/null
+++ b/tests/testthat/_snaps/modes/light-mode-t.svg
@@ -0,0 +1,675 @@
+
+
diff --git a/tests/testthat/_snaps/numeric-col/light-mode-b.svg b/tests/testthat/_snaps/numeric-col/light-mode-b.svg
new file mode 100644
index 000000000..61eb94a57
--- /dev/null
+++ b/tests/testthat/_snaps/numeric-col/light-mode-b.svg
@@ -0,0 +1,501 @@
+
+
diff --git a/tests/testthat/_snaps/numeric-col/light-mode-r.svg b/tests/testthat/_snaps/numeric-col/light-mode-r.svg
new file mode 100644
index 000000000..9093441b9
--- /dev/null
+++ b/tests/testthat/_snaps/numeric-col/light-mode-r.svg
@@ -0,0 +1,501 @@
+
+
diff --git a/tests/testthat/_snaps/numeric-col/light-mode-t.svg b/tests/testthat/_snaps/numeric-col/light-mode-t.svg
new file mode 100644
index 000000000..e732038b5
--- /dev/null
+++ b/tests/testthat/_snaps/numeric-col/light-mode-t.svg
@@ -0,0 +1,501 @@
+
+
diff --git a/tests/testthat/_snaps/positional_scales/1.svg b/tests/testthat/_snaps/positional_scales/1.svg
new file mode 100644
index 000000000..d81a6d2ce
--- /dev/null
+++ b/tests/testthat/_snaps/positional_scales/1.svg
@@ -0,0 +1,440 @@
+
+
diff --git a/tests/testthat/_snaps/positional_scales/2.svg b/tests/testthat/_snaps/positional_scales/2.svg
new file mode 100644
index 000000000..e56d55db1
--- /dev/null
+++ b/tests/testthat/_snaps/positional_scales/2.svg
@@ -0,0 +1,415 @@
+
+
diff --git a/tests/testthat/_snaps/positional_scales/3.svg b/tests/testthat/_snaps/positional_scales/3.svg
new file mode 100644
index 000000000..2aaafed59
--- /dev/null
+++ b/tests/testthat/_snaps/positional_scales/3.svg
@@ -0,0 +1,431 @@
+
+
diff --git a/tests/testthat/_snaps/set_blanket/1.svg b/tests/testthat/_snaps/set_blanket/1.svg
new file mode 100644
index 000000000..5acd1dfdd
--- /dev/null
+++ b/tests/testthat/_snaps/set_blanket/1.svg
@@ -0,0 +1,442 @@
+
+
diff --git a/tests/testthat/_snaps/set_blanket/2.svg b/tests/testthat/_snaps/set_blanket/2.svg
new file mode 100644
index 000000000..da16ca919
--- /dev/null
+++ b/tests/testthat/_snaps/set_blanket/2.svg
@@ -0,0 +1,436 @@
+
+
diff --git a/tests/testthat/_snaps/set_blanket/3.svg b/tests/testthat/_snaps/set_blanket/3.svg
new file mode 100644
index 000000000..c9ec67503
--- /dev/null
+++ b/tests/testthat/_snaps/set_blanket/3.svg
@@ -0,0 +1,412 @@
+
+
diff --git a/tests/testthat/_snaps/set_blanket/4.svg b/tests/testthat/_snaps/set_blanket/4.svg
new file mode 100644
index 000000000..efd32788e
--- /dev/null
+++ b/tests/testthat/_snaps/set_blanket/4.svg
@@ -0,0 +1,423 @@
+
+
diff --git a/tests/testthat/_snaps/set_blanket/5.svg b/tests/testthat/_snaps/set_blanket/5.svg
new file mode 100644
index 000000000..518442075
--- /dev/null
+++ b/tests/testthat/_snaps/set_blanket/5.svg
@@ -0,0 +1,427 @@
+
+
diff --git a/tests/testthat/_snaps/set_blanket/6.svg b/tests/testthat/_snaps/set_blanket/6.svg
new file mode 100644
index 000000000..84097675d
--- /dev/null
+++ b/tests/testthat/_snaps/set_blanket/6.svg
@@ -0,0 +1,107 @@
+
+
diff --git a/tests/testthat/_snaps/symmetric/1.svg b/tests/testthat/_snaps/symmetric/1.svg
new file mode 100644
index 000000000..669b3ee2b
--- /dev/null
+++ b/tests/testthat/_snaps/symmetric/1.svg
@@ -0,0 +1,98 @@
+
+
diff --git a/tests/testthat/_snaps/symmetric/2.svg b/tests/testthat/_snaps/symmetric/2.svg
new file mode 100644
index 000000000..5eab15bee
--- /dev/null
+++ b/tests/testthat/_snaps/symmetric/2.svg
@@ -0,0 +1,106 @@
+
+
diff --git a/tests/testthat/_snaps/vignette-ggblanket/1.svg b/tests/testthat/_snaps/vignette-ggblanket/1.svg
new file mode 100644
index 000000000..f235daad0
--- /dev/null
+++ b/tests/testthat/_snaps/vignette-ggblanket/1.svg
@@ -0,0 +1,424 @@
+
+
diff --git a/tests/testthat/_snaps/vignette-ggblanket/10.svg b/tests/testthat/_snaps/vignette-ggblanket/10.svg
new file mode 100644
index 000000000..2ecb51941
--- /dev/null
+++ b/tests/testthat/_snaps/vignette-ggblanket/10.svg
@@ -0,0 +1,139 @@
+
+
diff --git a/tests/testthat/_snaps/vignette-ggblanket/11.svg b/tests/testthat/_snaps/vignette-ggblanket/11.svg
new file mode 100644
index 000000000..704ebc466
--- /dev/null
+++ b/tests/testthat/_snaps/vignette-ggblanket/11.svg
@@ -0,0 +1,180 @@
+
+
diff --git a/tests/testthat/_snaps/vignette-ggblanket/13.svg b/tests/testthat/_snaps/vignette-ggblanket/13.svg
new file mode 100644
index 000000000..98872dfa7
--- /dev/null
+++ b/tests/testthat/_snaps/vignette-ggblanket/13.svg
@@ -0,0 +1,181 @@
+
+
diff --git a/tests/testthat/_snaps/vignette-ggblanket/14.svg b/tests/testthat/_snaps/vignette-ggblanket/14.svg
new file mode 100644
index 000000000..0e4ee006b
--- /dev/null
+++ b/tests/testthat/_snaps/vignette-ggblanket/14.svg
@@ -0,0 +1,187 @@
+
+
diff --git a/tests/testthat/_snaps/vignette-ggblanket/15.svg b/tests/testthat/_snaps/vignette-ggblanket/15.svg
new file mode 100644
index 000000000..8c05225b1
--- /dev/null
+++ b/tests/testthat/_snaps/vignette-ggblanket/15.svg
@@ -0,0 +1,100 @@
+
+
diff --git a/tests/testthat/_snaps/vignette-ggblanket/16.svg b/tests/testthat/_snaps/vignette-ggblanket/16.svg
new file mode 100644
index 000000000..b2157be19
--- /dev/null
+++ b/tests/testthat/_snaps/vignette-ggblanket/16.svg
@@ -0,0 +1,75 @@
+
+
diff --git a/tests/testthat/_snaps/vignette-ggblanket/17.svg b/tests/testthat/_snaps/vignette-ggblanket/17.svg
new file mode 100644
index 000000000..b17f334bc
--- /dev/null
+++ b/tests/testthat/_snaps/vignette-ggblanket/17.svg
@@ -0,0 +1,118 @@
+
+
diff --git a/tests/testthat/_snaps/vignette-ggblanket/18.svg b/tests/testthat/_snaps/vignette-ggblanket/18.svg
new file mode 100644
index 000000000..2f0f34b52
--- /dev/null
+++ b/tests/testthat/_snaps/vignette-ggblanket/18.svg
@@ -0,0 +1,84 @@
+
+
diff --git a/tests/testthat/_snaps/vignette-ggblanket/19.svg b/tests/testthat/_snaps/vignette-ggblanket/19.svg
new file mode 100644
index 000000000..0c53b92de
--- /dev/null
+++ b/tests/testthat/_snaps/vignette-ggblanket/19.svg
@@ -0,0 +1,84 @@
+
+
diff --git a/tests/testthat/_snaps/vignette-ggblanket/2.svg b/tests/testthat/_snaps/vignette-ggblanket/2.svg
new file mode 100644
index 000000000..be86ebca2
--- /dev/null
+++ b/tests/testthat/_snaps/vignette-ggblanket/2.svg
@@ -0,0 +1,435 @@
+
+
diff --git a/tests/testthat/_snaps/vignette-ggblanket/20.svg b/tests/testthat/_snaps/vignette-ggblanket/20.svg
new file mode 100644
index 000000000..51be20139
--- /dev/null
+++ b/tests/testthat/_snaps/vignette-ggblanket/20.svg
@@ -0,0 +1,435 @@
+
+
diff --git a/tests/testthat/_snaps/vignette-ggblanket/21.svg b/tests/testthat/_snaps/vignette-ggblanket/21.svg
new file mode 100644
index 000000000..1938e61b1
--- /dev/null
+++ b/tests/testthat/_snaps/vignette-ggblanket/21.svg
@@ -0,0 +1,178 @@
+
+
diff --git a/tests/testthat/_snaps/vignette-ggblanket/3.svg b/tests/testthat/_snaps/vignette-ggblanket/3.svg
new file mode 100644
index 000000000..9b20f9ed6
--- /dev/null
+++ b/tests/testthat/_snaps/vignette-ggblanket/3.svg
@@ -0,0 +1,66 @@
+
+
diff --git a/tests/testthat/_snaps/vignette-ggblanket/4.svg b/tests/testthat/_snaps/vignette-ggblanket/4.svg
new file mode 100644
index 000000000..8fa037cdc
--- /dev/null
+++ b/tests/testthat/_snaps/vignette-ggblanket/4.svg
@@ -0,0 +1,203 @@
+
+
diff --git a/tests/testthat/_snaps/vignette-ggblanket/5.svg b/tests/testthat/_snaps/vignette-ggblanket/5.svg
new file mode 100644
index 000000000..c8920d578
--- /dev/null
+++ b/tests/testthat/_snaps/vignette-ggblanket/5.svg
@@ -0,0 +1,547 @@
+
+
diff --git a/tests/testthat/_snaps/vignette-ggblanket/6.svg b/tests/testthat/_snaps/vignette-ggblanket/6.svg
new file mode 100644
index 000000000..14b8d8fc1
--- /dev/null
+++ b/tests/testthat/_snaps/vignette-ggblanket/6.svg
@@ -0,0 +1,406 @@
+
+
diff --git a/tests/testthat/_snaps/vignette-ggblanket/8.svg b/tests/testthat/_snaps/vignette-ggblanket/8.svg
new file mode 100644
index 000000000..4b1bbe53f
--- /dev/null
+++ b/tests/testthat/_snaps/vignette-ggblanket/8.svg
@@ -0,0 +1,424 @@
+
+
diff --git a/tests/testthat/_snaps/vignette-ggblanket/9.svg b/tests/testthat/_snaps/vignette-ggblanket/9.svg
new file mode 100644
index 000000000..3d2a38185
--- /dev/null
+++ b/tests/testthat/_snaps/vignette-ggblanket/9.svg
@@ -0,0 +1,416 @@
+
+
diff --git a/tests/testthat/test-article-demo-light.R b/tests/testthat/test-article-demo-light.R
new file mode 100644
index 000000000..1c74c3aa3
--- /dev/null
+++ b/tests/testthat/test-article-demo-light.R
@@ -0,0 +1,680 @@
+testthat::skip_if(getRversion() <= package_version("4.1.0"))
+testthat::skip_on_os(c("mac", "linux"))
+
+library(ggplot2)
+library(dplyr)
+set_blanket()
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_area"
+
+test_that(test_name, {
+ p <- economics |>
+ gg_area(
+ x = date,
+ y = unemploy,
+ y_label = "Unemployment",
+ )
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_bar"
+
+test_that(test_name, {
+ p <- palmerpenguins::penguins |>
+ dplyr::mutate(dplyr::across(sex, \(x) stringr::str_to_sentence(x))) |>
+ gg_bar(
+ y = species,
+ col = sex,
+ position = position_dodge(preserve = "single"),
+ width = 0.75,
+ )
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_bin_2d"
+
+test_that(test_name, {
+ p <- ggplot2::diamonds |>
+ gg_bin_2d(
+ x = carat,
+ y = price,
+ )
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_boxplot"
+
+test_that(test_name, {
+ p <- palmerpenguins::penguins |>
+ tidyr::drop_na(sex) |>
+ dplyr::mutate(dplyr::across(sex, \(x) stringr::str_to_sentence(x))) |>
+ gg_boxplot(
+ x = flipper_length_mm,
+ y = sex,
+ col = species,
+ mode = light_mode_b(),
+ )
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_col"
+
+test_that(test_name, {
+ p <- palmerpenguins::penguins |>
+ tidyr::drop_na(sex) |>
+ dplyr::mutate(dplyr::across(sex, \(x) stringr::str_to_sentence(x))) |>
+ group_by(sex, species) |>
+ summarise(dplyr::across(flipper_length_mm, \(x) mean(x, na.rm = TRUE))) |>
+ gg_col(
+ x = flipper_length_mm,
+ y = species,
+ col = sex,
+ position = position_dodge(preserve = "single"),
+ width = 0.75,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_contour"
+
+test_that(test_name, {
+ p <- ggplot2::faithfuld |>
+ gg_contour(
+ x = waiting,
+ y = eruptions,
+ z = density,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_contour_filled"
+
+test_that(test_name, {
+ p <- ggplot2::faithfuld |>
+ gg_contour_filled(
+ x = waiting,
+ y = eruptions,
+ z = density,
+ bins = 8,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_crossbar"
+
+test_that(test_name, {
+ p <- data.frame(
+ trt = factor(c(1, 1, 2, 2)),
+ resp = c(1, 5, 3, 4),
+ group = factor(c(1, 2, 1, 2)),
+ upper = c(1.1, 5.3, 3.3, 4.2),
+ lower = c(0.8, 4.6, 2.4, 3.6)) |>
+ gg_crossbar(
+ x = trt,
+ y = resp,
+ ymin = lower,
+ ymax = upper,
+ col = group,
+ width = 0.5,
+ x_label = "Treatment",
+ y_label = "Response",
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_density"
+
+test_that(test_name, {
+ p <- palmerpenguins::penguins |>
+ dplyr::mutate(dplyr::across(sex, \(x) stringr::str_to_sentence(x))) |>
+ tidyr::drop_na(sex) |>
+ gg_density(
+ x = flipper_length_mm,
+ col = species,
+ mode = light_mode_t(),
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_density_2d"
+
+test_that(test_name, {
+ set.seed(123)
+
+ p <- faithful |>
+ gg_density_2d(
+ x = waiting,
+ y = eruptions,
+ bins = 8,
+ contour = TRUE,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_density_2d_filled"
+
+test_that(test_name, {
+ set.seed(123)
+
+ p <- faithful |>
+ gg_density_2d_filled(
+ x = waiting,
+ y = eruptions,
+ bins = 8,
+ contour = TRUE,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_errorbar"
+
+test_that(test_name, {
+ p <- data.frame(
+ trt = factor(c(1, 1, 2, 2)),
+ resp = c(1, 5, 3, 4),
+ group = factor(c(1, 2, 1, 2)),
+ upper = c(1.1, 5.3, 3.3, 4.2),
+ lower = c(0.8, 4.6, 2.4, 3.6)
+ ) |>
+ gg_errorbar(
+ x = trt,
+ ymin = lower,
+ ymax = upper,
+ col = group,
+ width = 0.1,
+ x_label = "Treatment",
+ y_label = "Response",
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_freqpoly"
+
+test_that(test_name, {
+ p <- palmerpenguins::penguins |>
+ dplyr::mutate(dplyr::across(sex, \(x) stringr::str_to_sentence(x))) |>
+ gg_freqpoly(
+ x = flipper_length_mm,
+ col = sex,
+ mode = light_mode_t(),
+ ) +
+ theme(legend.title = element_blank())
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_function"
+
+test_that(test_name, {
+ p <- gg_function(
+ fun = \(x) dnorm(x, mean = 0, sd = 5),
+ x_expand_limits = qnorm(p = c(0.005, 0.995), mean = 0, sd = 5),
+ y_expand_limits = 0,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_hex"
+
+test_that(test_name, {
+ p <- ggplot2::diamonds |>
+ gg_hex(
+ x = carat,
+ y = price,
+ coord = coord_cartesian(clip = "on"),
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_histogram"
+
+test_that(test_name, {
+ p <- palmerpenguins::penguins |>
+ dplyr::mutate(dplyr::across(sex, \(x) stringr::str_to_sentence(x))) |>
+ gg_histogram(
+ x = flipper_length_mm,
+ col = sex,
+ facet = species,
+ bins = 50,
+ mode = light_mode_b(),
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+# test_name <- "gg_jitter"
+#
+# test_that(test_name, {
+# set.seed(123)
+#
+# p <- palmerpenguins::penguins |>
+# gg_jitter(
+# x = species,
+# y = body_mass_g,
+# col = flipper_length_mm,
+# position = position_jitter(height = 0),
+# y_expand_limits = 0,
+# col_steps = TRUE,
+# )
+#
+# vdiffr::expect_doppelganger(test_name, p)
+# })
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_label"
+
+test_that(test_name, {
+ p <- bind_rows(
+ mtcars |> slice_min(order_by = mpg),
+ mtcars |> slice_max(order_by = mpg)) |>
+ tibble::rownames_to_column("model") |>
+ gg_label(
+ x = model,
+ y = mpg,
+ col = mpg,
+ label = model,
+ size = 3.53,
+ y_expand_limits = 0,
+ y_label = "Miles per gallon",
+ col_palette = c(orange, "white", teal),
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_line"
+
+test_that(test_name, {
+ p <- economics |>
+ gg_line(
+ x = date,
+ y = unemploy,
+ y_expand_limits = 0,
+ y_label = "Unemployment",
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_linerange"
+
+test_that(test_name, {
+ p <- data.frame(
+ trt = factor(c(1, 1, 2, 2)),
+ resp = c(1, 5, 3, 4),
+ group = factor(c(1, 2, 1, 2)),
+ upper = c(1.1, 5.3, 3.3, 4.2),
+ lower = c(0.8, 4.6, 2.4, 3.6)) |>
+ gg_linerange(
+ x = trt,
+ ymin = lower,
+ ymax = upper,
+ col = group,
+ position = position_dodge(width = 0.2),
+ x_label = "Treatment",
+ y_label = "Response",
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_path"
+
+test_that(test_name, {
+ p <- economics |>
+ dplyr::mutate(unemploy_rate = unemploy / pop) |>
+ gg_path(
+ x = unemploy_rate,
+ y = psavert,
+ x_label = "Unemployment rate",
+ y_expand_limits = 0,
+ y_label = "Personal savings rate",
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_point"
+
+test_that(test_name, {
+ p <- palmerpenguins::penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = body_mass_g,
+ col = species,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_pointrange"
+
+test_that(test_name, {
+ p <- data.frame(
+ trt = factor(c(1, 1, 2, 2)),
+ resp = c(1, 5, 3, 4),
+ group = factor(c(1, 2, 1, 2)),
+ upper = c(1.1, 5.3, 3.3, 4.2),
+ lower = c(0.8, 4.6, 2.4, 3.6)) |>
+ gg_pointrange(
+ x = trt,
+ y = resp,
+ col = group,
+ ymin = lower,
+ ymax = upper,
+ position = position_dodge(width = 0.2),
+ size = 0.2,
+ x_label = "Treatment",
+ y_label = "Response",
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_polygon"
+
+test_that(test_name, {
+ ids <- factor(c("1.1", "2.1", "1.2", "2.2", "1.3", "2.3"))
+
+ values <- data.frame(
+ id = ids,
+ value = c(3, 3.1, 3.1, 3.2, 3.15, 3.5)
+ )
+
+ positions <- data.frame(
+ id = rep(ids, each = 4),
+ x = c(2, 1, 1.1, 2.2, 1, 0, 0.3, 1.1, 2.2, 1.1, 1.2, 2.5, 1.1, 0.3,
+ 0.5, 1.2, 2.5, 1.2, 1.3, 2.7, 1.2, 0.5, 0.6, 1.3),
+ y = c(-0.5, 0, 1, 0.5, 0, 0.5, 1.5, 1, 0.5, 1, 2.1, 1.7, 1, 1.5,
+ 2.2, 2.1, 1.7, 2.1, 3.2, 2.8, 2.1, 2.2, 3.3, 3.2)
+ )
+
+ datapoly <- merge(values, positions, by = c("id"))
+
+ p <- datapoly |>
+ gg_polygon(
+ x = x,
+ y = y,
+ col = value,
+ group = id,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_qq"
+
+test_that(test_name, {
+ p <- palmerpenguins::penguins |>
+ gg_qq(
+ sample = body_mass_g,
+ facet = species,
+ coord = coord_cartesian(clip = "on"),
+ ) +
+ geom_qq_line(
+ colour = blue,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_quantile"
+
+test_that(test_name, {
+ p <- palmerpenguins::penguins |>
+ gg_quantile(
+ x = flipper_length_mm,
+ y = body_mass_g,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_raster"
+
+test_that(test_name, {
+ p <- ggplot2::faithfuld |>
+ gg_raster(
+ x = waiting,
+ y = eruptions,
+ col = density,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_rect"
+
+test_that(test_name, {
+ p <- data.frame(
+ x = rep(c(2, 5, 7, 9, 12), 2),
+ y = rep(c(1, 2), each = 5),
+ z = factor(c(rep(1:4, each = 2), 5, NA)),
+ w = rep(diff(c(0, 4, 6, 8, 10, 14)), 2)) |>
+ dplyr::mutate(
+ xmin = x - w / 2,
+ xmax = x + w / 2,
+ ymin = y,
+ ymax = y + 1
+ ) |>
+ gg_rect(
+ xmin = xmin,
+ xmax = xmax,
+ ymin = ymin,
+ ymax = ymax,
+ col = z,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_ribbon"
+
+test_that(test_name, {
+ p <- data.frame(year = 1875:1972, level = as.vector(LakeHuron)) |>
+ mutate(level_min = level - 1, level_max = level + 1) |>
+ gg_ribbon(
+ x = year,
+ ymin = level_min,
+ ymax = level_max,
+ colour = NA,
+ x_labels = \(x) x,
+ y_label = "Level",
+ ) +
+ geom_line(
+ mapping = aes(y = level),
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+# test_name <- "gg_rug"
+#
+# test_that(test_name, {
+# p <- palmerpenguins::penguins |>
+# dplyr::mutate(dplyr::across(sex, \(x) stringr::str_to_sentence(x))) |>
+# gg_rug(
+# x = flipper_length_mm,
+# y = body_mass_g,
+# col = sex,
+# )
+#
+# vdiffr::expect_doppelganger(test_name, p)
+# })
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_segment"
+
+test_that(test_name, {
+ p <- data.frame(x1 = 2.62, x2 = 3.57, y1 = 21.0, y2 = 15.0) |>
+ gg_segment(
+ x = x1,
+ xend = x2,
+ y = y1,
+ yend = y2,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+# test_name <- "gg_sf"
+#
+# test_that(test_name, {
+# p <- sf::st_read(system.file("shape/nc.shp", package = "sf")) |>
+# gg_sf(
+# col = AREA,
+# )
+#
+# vdiffr::expect_doppelganger(test_name, p)
+# })
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_smooth"
+
+test_that(test_name, {
+ p <- palmerpenguins::penguins |>
+ dplyr::mutate(dplyr::across(sex, \(x) stringr::str_to_sentence(x))) |>
+ tidyr::drop_na(sex) |>
+ gg_smooth(
+ x = flipper_length_mm,
+ y = body_mass_g,
+ col = sex,
+ se = TRUE,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_step"
+
+test_that(test_name, {
+ p <- economics |>
+ filter(date > lubridate::ymd("2010-01-01")) |>
+ gg_step(
+ x = date,
+ y = unemploy,
+ y_expand_limits = 0,
+ y_label = "Unemployment",
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_text"
+
+test_that(test_name, {
+ p <- bind_rows(
+ mtcars |> slice_min(order_by = mpg),
+ mtcars |> slice_max(order_by = mpg)) |>
+ tibble::rownames_to_column("model") |>
+ gg_text(
+ x = model,
+ y = mpg,
+ col = mpg,
+ label = model,
+ size = 3.53,
+ y_expand_limits = 0,
+ y_label = "Miles per gallon",
+ col_palette = c(orange, "white", teal),
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_tile"
+
+test_that(test_name, {
+ p <- palmerpenguins::penguins |>
+ dplyr::mutate(dplyr::across(sex, \(x) stringr::str_to_sentence(x))) |>
+ group_by(species, sex) |>
+ summarise(flipper_length_mm = mean(flipper_length_mm, na.rm = TRUE)) |>
+ gg_tile(
+ x = sex,
+ y = species,
+ col = flipper_length_mm,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_violin"
+
+test_that(test_name, {
+ p <- palmerpenguins::penguins |>
+ tidyr::drop_na(sex) |>
+ dplyr::mutate(dplyr::across(sex, \(x) stringr::str_to_sentence(x))) |>
+ gg_violin(
+ x = sex,
+ y = body_mass_g,
+ col = species,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "gg_blanket"
+
+test_that(test_name, {
+ p <- palmerpenguins::penguins |>
+ tidyr::drop_na(sex) |>
+ dplyr::mutate(dplyr::across(sex, \(x) stringr::str_to_sentence(x))) |>
+ gg_blanket(
+ geom = "violin",
+ stat = "ydensity",
+ position = "dodge",
+ x = sex,
+ y = body_mass_g,
+ col = species,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+set_blanket()
diff --git a/tests/testthat/test-article-go-further.R b/tests/testthat/test-article-go-further.R
new file mode 100644
index 000000000..77a28221c
--- /dev/null
+++ b/tests/testthat/test-article-go-further.R
@@ -0,0 +1,299 @@
+testthat::skip_if(getRversion() <= package_version("4.1.0"))
+testthat::skip_on_os(c("mac", "linux"))
+
+## ----setup------------------------------------------------------------------------------------------
+library(ggplot2)
+library(dplyr)
+library(stringr)
+library(tidyr)
+library(palmerpenguins)
+library(patchwork)
+set_blanket()
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "1"
+
+test_that(test_name, {
+ p1 <- diamonds |>
+ count(color) |>
+ gg_col(
+ x = n,
+ y = color,
+ width = 0.75,
+ x_labels = \(x) x / 1000,
+ x_label = "Count (thousands)",
+ subtitle = "\nDefault order"
+ )
+
+ p2 <- diamonds |>
+ count(color) |>
+ mutate(across(color, \(x) x |>
+ forcats::fct_reorder(n) |>
+ forcats::fct_rev())) |>
+ gg_col(
+ x = n,
+ y = color,
+ width = 0.75,
+ x_labels = \(x) x / 1000,
+ x_label = "Count (thousands)",
+ subtitle = "\nRe-orderered"
+ )
+
+ p <- p1 + p2
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "2"
+
+test_that(test_name, {
+ p1 <- diamonds |>
+ count(color) |>
+ filter(color %in% c("E", "G", "I")) |>
+ gg_col(
+ x = n,
+ y = color,
+ width = 0.75,
+ x_labels = \(x) x / 1000,
+ x_label = "Count (thousands)",
+ subtitle = "\nUnused levels kept",
+ )
+
+ p2 <- diamonds |>
+ count(color) |>
+ filter(color %in% c("E", "G", "I")) |>
+ mutate(color = forcats::fct_drop(color)) |>
+ gg_col(
+ x = n,
+ y = color,
+ width = 0.75,
+ x_labels = \(x) x / 1000,
+ x_label = "Count (thousands)",
+ subtitle = "\nUnused levels dropped",
+ )
+
+ p <- p1 + p2
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+
+## ----fig.asp=0.4------------------------------------------------------------------------------------
+test_name <- "3"
+
+test_that(test_name, {
+ p <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE) |>
+ gg_sf(col = AREA)
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "4"
+
+test_that(test_name, {
+ p <- penguins |>
+ gg_pointrange(
+ stat = "summary",
+ x = species,
+ y = flipper_length_mm,
+ size = 0.1,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "5"
+
+test_that(test_name, {
+ p <- penguins |>
+ mutate(across(sex, \(x) str_to_sentence(x))) |>
+ gg_boxplot(
+ x = species,
+ y = flipper_length_mm,
+ col = sex,
+ colour = "black", #or fill = #D3D3D3",
+ position = position_dodge2(preserve = "single"),
+ alpha = 0.9,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "6"
+
+test_that(test_name, {
+ p <- penguins |>
+ gg_boxplot(
+ x = species,
+ y = flipper_length_mm,
+ colour = "black", #or fill = #D3D3D3",
+ width = 0.5,
+ alpha = 0.9,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "7"
+
+test_that(test_name, {
+ p <- penguins |>
+ count(species, sex) |>
+ gg_col(
+ x = sex,
+ y = n,
+ col = species,
+ position = position_dodge2(preserve = "single"),
+ width = 0.75,
+ x_labels = \(x) str_to_sentence(x),
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "8"
+
+test_that(test_name, {
+ p <- penguins |>
+ count(species, sex) |>
+ gg_col(
+ x = n,
+ y = sex,
+ col = species,
+ position = position_dodge2(preserve = "single"),
+ width = 0.75,
+ y_labels = \(x) str_to_sentence(x),
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "9"
+
+test_that(test_name, {
+ p <- penguins |>
+ mutate(across(sex, \(x) str_to_sentence(x))) |>
+ gg_histogram(
+ x = flipper_length_mm,
+ facet = species,
+ facet2 = sex,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "10"
+
+test_that(test_name, {
+ p <- data.frame(
+ age = c(0:9, 0:9),
+ sex = c(rep("Male", 10), rep("Female", 10)),
+ population = c(200, 250, 300, 350, 440, 450, 500, 550, 600, 650,
+ 190, 240, 290, 330, 420, 430, 480, 530, 580, 630)) |>
+ mutate(population = ifelse(sex == "Female", -population, population)) %>%
+ gg_col(
+ y = age,
+ x = population,
+ col = sex,
+ width = 1,
+ orientation = "y",
+ x_labels = \(x) abs(x),
+ y_symmetric = TRUE,
+ ) +
+ geom_vline(
+ xintercept = 0,
+ colour = "#121b24",
+ linewidth = 10 / 33
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "11"
+
+test_that(test_name, {
+ p <- data.frame(
+ age = c(0:9, 0:9),
+ sex = c(rep("Male", 10), rep("Female", 10)),
+ population = c(200, 250, 300, 350, 440, 450, 500, 550, 600, 650,
+ 190, 240, 290, 330, 420, 430, 480, 530, 580, 630)) |>
+ mutate(population = ifelse(sex == "Female", -population, population)) %>%
+ gg_col(
+ y = age,
+ x = population,
+ col = sex,
+ width = 1,
+ orientation = "y",
+ x_labels = \(x) abs(x),
+ y_symmetric = TRUE,
+ ) +
+ geom_vline(
+ xintercept = 0,
+ colour = "#121b24",
+ linewidth = 10 / 33
+ ) +
+ light_mode_r()
+ # ggeasy::easy_remove_y_gridlines() +
+ # ggeasy::easy_remove_y_axis()
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+
+
+
+## ----fig.asp=0.55-----------------------------------------------------------------------------------
+test_name <- "12"
+
+test_that(test_name, {
+ p <- penguins |>
+ gg_histogram(
+ x = flipper_length_mm,
+ mapping = aes(y = after_stat(density)),
+ facet = species,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+
+
+## ----fig.asp=0.55-----------------------------------------------------------------------------------
+test_name <- "13"
+
+test_that(test_name, {
+
+ p <- faithfuld |>
+ gg_contour(
+ x = waiting,
+ y = eruptions,
+ z = density,
+ mapping = aes(colour = after_stat(level)),
+ bins = 8,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+
+
+
diff --git a/tests/testthat/test-col_palette.R b/tests/testthat/test-col_palette.R
new file mode 100644
index 000000000..31e0eb7e8
--- /dev/null
+++ b/tests/testthat/test-col_palette.R
@@ -0,0 +1,214 @@
+testthat::skip_if(getRversion() <= package_version("4.1.0"))
+testthat::skip_on_os(c("mac", "linux"))
+
+library(ggplot2)
+library(dplyr)
+library(palmerpenguins)
+
+set_blanket()
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "1"
+
+test_that(test_name, {
+ p <- faithfuld |>
+ gg_contour_filled(
+ x = waiting,
+ y = eruptions,
+ z = density,
+ bins = 8,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+test_name <- "2"
+
+test_that(test_name, {
+ set.seed(123)
+
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = species,
+ col = bill_length_mm,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+test_name <- "3"
+
+test_that(test_name, {
+ set.seed(123)
+
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = species,
+ col = species,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+
+test_name <- "4"
+
+test_that(test_name, {
+ p <- faithfuld |>
+ gg_contour_filled(
+ x = waiting,
+ y = eruptions,
+ z = density,
+ bins = 8,
+ col_palette = scales::pal_viridis(option = "A"),
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+test_name <- "5"
+
+test_that(test_name, {
+ set.seed(123)
+
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = species,
+ col = bill_length_mm,
+ col_palette = scales::pal_viridis(option = "A"),
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+test_name <- "6"
+
+test_that(test_name, {
+ set.seed(123)
+
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = species,
+ col = species,
+ col_palette = scales::pal_viridis(option = "A")
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+test_name <- "7"
+
+test_that(test_name, {
+ set.seed(123)
+
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = species,
+ col = bill_length_mm,
+ col_palette = viridisLite::magma(n = 20)
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+test_name <- "8"
+
+test_that(test_name, {
+ set.seed(123)
+
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = species,
+ col = species,
+ col_palette = c("red", "blue", "green")
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+test_name <- "9"
+
+test_that(test_name, {
+ set.seed(123)
+
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = species,
+ col = species,
+ col_palette = c("Gentoo" = "red", "Adelie" = "blue", "Chinstrap" = "green")
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+test_name <- "10"
+
+test_that(test_name, {
+ set.seed(123)
+
+ p <- faithfuld |>
+ gg_contour_filled(
+ x = waiting,
+ y = eruptions,
+ z = density,
+ bins = 8,
+ col_palette = viridisLite::magma(n = 8)
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+test_name <- "11"
+
+test_that(test_name, {
+ set.seed(123)
+
+ p <- data.frame(
+ trt = factor(c(1, 1, 2, 2)),
+ resp = c(1, 5, 3, 4),
+ group = factor(c(1, 2, 1, 2)),
+ upper = c(1.1, 5.3, 3.3, 4.2),
+ lower = c(0.8, 4.6, 2.4, 3.6)
+ ) |>
+ gg_linerange(
+ x = trt,
+ ymin = lower,
+ ymax = upper,
+ mapping = aes(colour = group),
+ position = position_dodge(width = 0.2),
+ x_label = "Treatment",
+ y_label = "Response",
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+test_name <- "12"
+
+test_that(test_name, {
+ set.seed(123)
+
+ p <- mtcars %>%
+ dplyr::mutate(
+ cyl = factor(cyl, levels = c("4", "6", "8", "10"))
+ ) |>
+ gg_point(
+ x = mpg,
+ y = wt,
+ col = cyl,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+
+
+
+set_blanket()
diff --git a/tests/testthat/test-datetime.R b/tests/testthat/test-datetime.R
new file mode 100644
index 000000000..58b1bd300
--- /dev/null
+++ b/tests/testthat/test-datetime.R
@@ -0,0 +1,61 @@
+testthat::skip_if(getRversion() <= package_version("4.1.0"))
+testthat::skip_on_os(c("mac", "linux"))
+
+library(ggplot2)
+library(dplyr)
+
+set_blanket()
+
+set.seed(123)
+t <- as.POSIXct("2021-01-01")
+e1 <- as.POSIXct("2021-12-31 23:59:59")
+n1 <- as.numeric(lubridate::as.duration(e1 - t))
+s1 <- sample(seq.int(n1), 3000L)
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "datetime"
+
+test_that(test_name, {
+ p <- tibble::tibble(dttm = t + s1) |>
+ dplyr::mutate(mon = lubridate::floor_date(dttm, "month")) |>
+ dplyr::summarise(total = dplyr::n(), .by = "mon") |>
+ gg_point(
+ x = mon,
+ y = total,
+ )
+
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "time"
+
+test_that(test_name, {
+ p <- tibble::tibble(dttm = t + s1) |>
+ dplyr::mutate(mon = lubridate::floor_date(dttm, "month")) |>
+ dplyr::summarise(total = dplyr::n(), .by = "mon") |>
+ dplyr::mutate(mon = hms::as_hms(mon)) |>
+ gg_point(
+ x = mon,
+ y = total,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "date"
+
+test_that(test_name, {
+ p <- tibble::tibble(dttm = t + s1) |>
+ dplyr::mutate(mon = lubridate::floor_date(dttm, "month")) |>
+ dplyr::summarise(total = dplyr::n(), .by = "mon") |>
+ dplyr::mutate(mon = lubridate::as_date(mon)) |>
+ gg_point(
+ x = mon,
+ y = total,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
diff --git a/tests/testthat/test-ggproto-etc.R b/tests/testthat/test-ggproto-etc.R
new file mode 100644
index 000000000..238c0f941
--- /dev/null
+++ b/tests/testthat/test-ggproto-etc.R
@@ -0,0 +1,100 @@
+testthat::skip_if(getRversion() <= package_version("4.1.0"))
+testthat::skip_on_os(c("mac", "linux"))
+
+library(ggplot2)
+library(dplyr)
+library(stringr)
+library(tidyr)
+library(palmerpenguins)
+set_blanket()
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "default"
+
+test_that(test_name, {
+ p <- penguins |>
+ drop_na(sex) |>
+ mutate(across(sex, \(x) str_to_sentence(x))) |>
+ gg_blanket(
+ geom = "violin",
+ stat = "ydensity",
+ position = "dodge",
+ x = sex,
+ y = body_mass_g,
+ col = species,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+test_name <- "GeomViolin"
+
+test_that(test_name, {
+ p <- penguins |>
+ drop_na(sex) |>
+ mutate(across(sex, \(x) str_to_sentence(x))) |>
+ gg_blanket(
+ geom = GeomViolin,
+ stat = "ydensity",
+ position = "dodge",
+ x = sex,
+ y = body_mass_g,
+ col = species,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+test_name <- "StatYdensity"
+
+test_that(test_name, {
+ p <- penguins |>
+ drop_na(sex) |>
+ mutate(across(sex, \(x) str_to_sentence(x))) |>
+ gg_blanket(
+ geom = "violin",
+ stat = StatYdensity,
+ position = "dodge",
+ x = sex,
+ y = body_mass_g,
+ col = species,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+test_name <- "PositionDodge"
+
+test_that(test_name, {
+ p <- penguins |>
+ drop_na(sex) |>
+ mutate(across(sex, \(x) str_to_sentence(x))) |>
+ gg_blanket(
+ geom = "violin",
+ stat = "ydensity",
+ position = PositionDodge,
+ x = sex,
+ y = body_mass_g,
+ col = species,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+test_name <- "all 3"
+
+test_that(test_name, {
+ p <- penguins |>
+ drop_na(sex) |>
+ mutate(across(sex, \(x) str_to_sentence(x))) |>
+ gg_blanket(
+ geom = GeomViolin,
+ stat = StatYdensity,
+ position = PositionDodge,
+ x = sex,
+ y = body_mass_g,
+ col = species,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
diff --git a/tests/testthat/test-labelled.R b/tests/testthat/test-labelled.R
new file mode 100644
index 000000000..ed68d9c91
--- /dev/null
+++ b/tests/testthat/test-labelled.R
@@ -0,0 +1,36 @@
+testthat::skip_if(getRversion() <= package_version("4.1.0"))
+testthat::skip_on_os(c("mac", "linux"))
+
+library(ggplot2)
+library(dplyr)
+library(stringr)
+library(tidyr)
+library(palmerpenguins)
+set_blanket()
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "labelled"
+
+test_that(test_name, {
+ p <- tibble::tibble(
+ q1 = c("M", "F"),
+ q2 = c(TRUE, FALSE),
+ q3 = c(1, 2),
+ q4 = factor(c(1, 2)),
+ ) |>
+ labelled::set_variable_labels(q1 = "Sex",
+ q2 = "Happy",
+ q3 = "Age",
+ q4 = "Zero or one") |> #str()
+ gg_point(
+ x = q2,
+ y = q1,
+ col = q3,
+ facet = q4,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+set_blanket()
+
diff --git a/tests/testthat/test-modes.R b/tests/testthat/test-modes.R
new file mode 100644
index 000000000..0b48b725c
--- /dev/null
+++ b/tests/testthat/test-modes.R
@@ -0,0 +1,87 @@
+testthat::skip_if(getRversion() <= package_version("4.1.0"))
+testthat::skip_on_os(c("mac", "linux"))
+
+library(palmerpenguins)
+library(ggplot2)
+
+set_blanket()
+
+test_name <- "light_mode_r"
+
+test_that(test_name, {
+
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = body_mass_g,
+ col = species,
+ facet = sex,
+ facet2 = island,
+ mapping = aes(alpha = species, shape = species),
+ mode = light_mode_r()
+ ) +
+ scale_alpha_manual(values = c(1, 1, 0.33))
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+test_name <- "light_mode_t"
+
+test_that(test_name, {
+
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = body_mass_g,
+ col = species,
+ facet = sex,
+ facet2 = island,
+ mapping = aes(alpha = species, shape = species),
+ mode = light_mode_t()
+ ) +
+ scale_alpha_manual(values = c(1, 1, 0.33))
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+test_name <- "light_mode_b"
+
+test_that(test_name, {
+
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = body_mass_g,
+ col = species,
+ facet = sex,
+ facet2 = island,
+ mapping = aes(alpha = species, shape = species),
+ mode = light_mode_b()
+ ) +
+ scale_alpha_manual(values = c(1, 1, 0.33))
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+###
+test_name <- "dark_mode_r"
+
+test_that(test_name, {
+
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = body_mass_g,
+ col = species,
+ facet = sex,
+ facet2 = island,
+ mapping = aes(alpha = species, shape = species),
+ mode = dark_mode_r()
+ ) +
+ scale_alpha_manual(values = c(1, 1, 0.33))
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+set_blanket()
+
diff --git a/tests/testthat/test-numeric-col.R b/tests/testthat/test-numeric-col.R
new file mode 100644
index 000000000..638fafb53
--- /dev/null
+++ b/tests/testthat/test-numeric-col.R
@@ -0,0 +1,65 @@
+testthat::skip_if(getRversion() <= package_version("4.1.0"))
+testthat::skip_on_os(c("mac", "linux"))
+
+library(palmerpenguins)
+library(ggplot2)
+set_blanket(colour = "#121b24")
+
+test_name <- "light_mode_r"
+
+test_that(test_name, {
+ set.seed(123)
+
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = island,
+ col = bill_depth_mm,
+ facet = sex,
+ mapping = aes(alpha = species, shape = species),
+ mode = light_mode_r()
+ ) +
+ scale_alpha_manual(values = c(1, 1, 0.33))
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+test_name <- "light_mode_t"
+
+test_that(test_name, {
+ set.seed(123)
+
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = island,
+ col = bill_depth_mm,
+ facet = sex,
+ mapping = aes(alpha = species, shape = species),
+ mode = light_mode_t()
+ ) +
+ scale_alpha_manual(values = c(1, 1, 0.33))
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+test_name <- "light_mode_b"
+
+test_that(test_name, {
+ set.seed(123)
+
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = island,
+ col = bill_depth_mm,
+ facet = sex,
+ mapping = aes(alpha = species, shape = species),
+ mode = light_mode_b()
+ ) +
+ scale_alpha_manual(values = c(1, 1, 0.33))
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+set_blanket()
diff --git a/tests/testthat/test-positional_scales.R b/tests/testthat/test-positional_scales.R
new file mode 100644
index 000000000..90f64af53
--- /dev/null
+++ b/tests/testthat/test-positional_scales.R
@@ -0,0 +1,74 @@
+testthat::skip_if(getRversion() <= package_version("4.1.0"))
+testthat::skip_on_os(c("mac", "linux"))
+
+library(ggplot2)
+library(dplyr)
+set_blanket()
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "1"
+
+test_that(test_name, {
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = body_mass_g,
+ x_breaks = scales::breaks_width(15),
+ x_expand_limits = 250,
+ x_labels = scales::label_currency(),
+ x_expand = c(0.5, 0.5),
+ x_position = "top",
+ x_label = "Blah",
+ caption = ""
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "2"
+
+test_that(test_name, {
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = body_mass_g,
+ y_breaks = scales::breaks_width(1000),
+ y_expand_limits = 7000,
+ y_labels = scales::label_currency(),
+ y_expand = c(0.1, 0.1),
+ y_position = "right",
+ y_label = "Blah",
+ caption = ""
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "3"
+
+test_that(test_name, {
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = body_mass_g,
+ x_breaks = scales::breaks_width(15),
+ x_expand_limits = 250,
+ x_labels = scales::label_currency(),
+ x_expand = c(0.5, 0.5),
+ x_position = "top",
+ x_label = "Blah",
+ y_breaks = scales::breaks_width(1000),
+ y_expand_limits = 7000,
+ y_labels = scales::label_currency(),
+ y_expand = c(0.1, 0.1),
+ y_position = "right",
+ y_label = "Blah",
+ caption = ""
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+set_blanket()
diff --git a/tests/testthat/test-set_blanket.R b/tests/testthat/test-set_blanket.R
new file mode 100644
index 000000000..62934b4d7
--- /dev/null
+++ b/tests/testthat/test-set_blanket.R
@@ -0,0 +1,143 @@
+testthat::skip_if(getRversion() <= package_version("4.1.0"))
+testthat::skip_on_os(c("mac", "linux"))
+
+library(palmerpenguins)
+library(ggplot2)
+library(dplyr)
+
+###
+test_name <- "1"
+
+test_that(test_name, {
+
+ set_blanket(
+ mode = NULL,
+ theme = theme_grey(),
+ )
+
+ p <- penguins |>
+ mutate(across(sex, \(x) stringr::str_to_sentence(x))) |>
+ gg_point(
+ x = flipper_length_mm,
+ y = body_mass_g,
+ col = sex,
+ ) +
+ geom_vline(xintercept = 200)
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+###
+test_name <- "2"
+
+test_that(test_name, {
+
+ set_blanket(
+ mode = light_mode_r(),
+ colour = red,
+ text_colour = teal,
+ reference_line_colour = teal,
+ )
+
+ p <- penguins |>
+ mutate(across(sex, \(x) stringr::str_to_sentence(x))) |>
+ gg_point(
+ x = flipper_length_mm,
+ y = body_mass_g,
+ col = sex,
+ ) +
+ geom_vline(xintercept = 200)
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+###
+
+set_blanket(
+ mode = dark_mode_r(base_size = 15),
+ colour = red,
+ text_colour = "red",
+ reference_line_colour = "red",
+ reference_line_linewidth = 5,
+ text_size = 15 / 2.83505,
+ col_palette_d = c(navy, red, "green"),
+ col_palette_c = c(navy, purple, red, orange)
+)
+
+###
+test_name <- "3"
+
+test_that(test_name, {
+
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = body_mass_g,
+ x_breaks = scales::breaks_pretty(3),
+ ) +
+ geom_vline(xintercept = 200) +
+ annotate("text", x = I(0.25), y = I(0.75), label = "Here")
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+###
+test_name <- "4"
+
+test_that(test_name, {
+
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = body_mass_g,
+ col = species,
+ x_breaks = scales::breaks_pretty(3),
+ ) +
+ geom_vline(xintercept = 200) +
+ annotate("text",
+ x = I(0.25),
+ y = I(0.75),
+ label = "Here")
+
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+###
+test_name <- "5"
+
+test_that(test_name, {
+
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = body_mass_g,
+ col = bill_depth_mm,
+ x_breaks = scales::breaks_pretty(3),
+ ) +
+ geom_vline(xintercept = 200) +
+ annotate("text", x = I(0.25), y = I(0.75), label = "Here")
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+###
+test_name <- "6"
+
+test_that(test_name, {
+
+ p <- penguins |>
+ mutate(across(sex, \(x) stringr::str_to_sentence(x))) |>
+ gg_smooth(
+ x = flipper_length_mm,
+ y = body_mass_g,
+ col = species,
+ se = TRUE,
+ ) +
+ geom_vline(xintercept = 200) +
+ annotate("text", x = I(0.25), y = I(0.75), label = "Here")
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+set_blanket()
diff --git a/tests/testthat/test-symmetric.R b/tests/testthat/test-symmetric.R
new file mode 100644
index 000000000..a5752f87e
--- /dev/null
+++ b/tests/testthat/test-symmetric.R
@@ -0,0 +1,36 @@
+testthat::skip_if(getRversion() <= package_version("4.1.0"))
+testthat::skip_on_os(c("mac", "linux"))
+
+library(palmerpenguins)
+library(ggplot2)
+
+set_blanket()
+
+test_name <- "1"
+
+test_that(test_name, {
+
+ p <- penguins |>
+ gg_histogram(
+ y = flipper_length_mm,
+ x_symmetric = FALSE,
+ y_symmetric = TRUE,
+ mode_orientation = NULL,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+test_name <- "2"
+
+test_that(test_name, {
+
+ p <- penguins |>
+ gg_histogram(
+ y = flipper_length_mm,
+ x_symmetric = TRUE,
+ y_symmetric = FALSE,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
diff --git a/tests/testthat/test-vignette-ggblanket.R b/tests/testthat/test-vignette-ggblanket.R
new file mode 100644
index 000000000..d223dde56
--- /dev/null
+++ b/tests/testthat/test-vignette-ggblanket.R
@@ -0,0 +1,453 @@
+testthat::skip_if(getRversion() <= package_version("4.1.0"))
+testthat::skip_on_os(c("mac", "linux"))
+
+library(ggplot2)
+library(dplyr)
+library(stringr)
+library(tidyr)
+library(palmerpenguins)
+library(patchwork)
+set_blanket()
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "1"
+
+test_that(test_name, {
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = body_mass_g,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+
+## ---------------------------------------------------------------------------------------------------
+
+test_name <- "2"
+
+test_that(test_name, {
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = body_mass_g,
+ col = species,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ----fig.asp=0.45-----------------------------------------------------------------------------------
+test_name <- "3"
+
+test_that(test_name, {
+ p <- penguins |>
+ drop_na(sex) |>
+ mutate(across(sex, \(x) str_to_sentence(x))) |>
+ gg_bar(
+ y = species,
+ col = sex,
+ width = 0.75,
+ position = "dodge",
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "4"
+
+test_that(test_name, {
+ p <- penguins |>
+ drop_na(sex) |>
+ mutate(across(sex, \(x) str_to_sentence(x))) |>
+ gg_histogram(
+ x = flipper_length_mm,
+ facet = species,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ----fig.asp=0.75-----------------------------------------------------------------------------------
+test_name <- "5"
+
+test_that(test_name, {
+ p <- penguins |>
+ mutate(across(sex, \(x) str_to_sentence(x))) |>
+ gg_histogram(
+ x = flipper_length_mm,
+ facet = species,
+ facet2 = sex,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "6"
+
+test_that(test_name, {
+ set.seed(123)
+
+ p <- penguins |>
+ gg_point(
+ x = species,
+ y = body_mass_g,
+ colour = "#7FCDBB",
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ----fig.asp=0.33-----------------------------------------------------------------------------------
+# test_name <- "7"
+#
+# test_that(test_name, {
+# viridisLite::rocket(n = 9)
+#
+# p <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE) |>
+# gg_sf(
+# col = AREA,
+# col_palette = viridisLite::rocket(n = 9)
+# )
+#
+# vdiffr::expect_doppelganger(test_name, p)
+# })
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "8"
+
+test_that(test_name, {
+ set.seed(123)
+
+ p <- penguins |>
+ drop_na(sex) |>
+ gg_point(
+ x = species,
+ y = body_mass_g,
+ col = flipper_length_mm,
+ facet = sex,
+ x_labels = \(x) str_sub(x, 1, 1),
+ y_expand_limits = 0,
+ y_breaks = scales::breaks_width(1500),
+ y_labels = scales::label_number(big.mark = " "),
+ y_expand = expansion(mult = c(0, 0.05)),
+ y_label = "Body mass (g)",
+ col_steps = TRUE,
+ facet_labels = \(x) str_to_sentence(x),
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ----fig.asp=0.6------------------------------------------------------------------------------------
+test_name <- "9"
+
+test_that(test_name, {
+ p <- diamonds |>
+ gg_hex(
+ x = carat,
+ y = price,
+ coord = coord_cartesian(clip = "on"),
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ----echo=FALSE-------------------------------------------------------------------------------------
+test_name <- "10"
+
+test_that(test_name, {
+ d <- data.frame(
+ trt = factor(c(1, 1, 2, 2)),
+ resp = c(1, 5, 3, 4),
+ group = factor(c(1, 2, 1, 2)),
+ upper = c(1.1, 5.3, 3.3, 4.2),
+ lower = c(0.8, 4.6, 2.4, 3.6)
+ )
+
+ p1 <- d |>
+ gg_errorbar(
+ x = trt,
+ ymin = lower,
+ ymax = upper,
+ col = group,
+ width = 0.1,
+ x_label = "Treatment",
+ y_label = "Response",
+ subtitle = "\nmode = light_mode_r(),"
+ ) +
+ theme(legend.position = "none")
+
+ p2 <- d |>
+ gg_errorbar(
+ x = trt,
+ ymin = lower,
+ ymax = upper,
+ col = group,
+ width = 0.1,
+ x_label = "Treatment",
+ y_label = "Response",
+ subtitle = "\n+ light_mode_r()"
+ ) +
+ theme(legend.position = "none")
+
+ p <- p1 + p2
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+
+
+## ----fig.asp=0.7------------------------------------------------------------------------------------
+test_name <- "11"
+
+test_that(test_name, {
+ p <- penguins |>
+ gg_histogram(
+ x = flipper_length_mm,
+ col = species,
+ title = "Penguin flipper length by species",
+ subtitle = "Palmer Archipelago, Antarctica",
+ caption = "Source: Gorman, 2020",
+ mode = light_mode_t(),
+ ) +
+ theme(legend.title = element_blank())
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+
+## ----fig.asp=0.65-----------------------------------------------------------------------------------
+test_name <- "13"
+
+test_that(test_name, {
+ p <- penguins |>
+ gg_histogram(
+ x = flipper_length_mm,
+ col = species,
+ title = "Penguin flipper length by species",
+ subtitle = "Palmer Archipelago, Antarctica",
+ caption = "Source: Gorman, 2020",
+ mode = dark_mode_r(),
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+
+
+## ----echo=FALSE-------------------------------------------------------------------------------------
+test_name <- "14"
+
+test_that(test_name, {
+ d <- data.frame(
+ trt = factor(c(1, 1, 2, 2)),
+ resp = c(1, 5, 3, 4),
+ group = factor(c(1, 2, 1, 2)),
+ upper = c(1.1, 5.3, 3.3, 4.2),
+ lower = c(0.8, 4.6, 2.4, 3.6)
+ )
+
+ p1 <- d |>
+ gg_errorbar(
+ x = trt,
+ ymin = lower,
+ ymax = upper,
+ col = group,
+ width = 0.1,
+ x_label = "Treatment",
+ y_label = "Response",
+ subtitle = "\nDefault y scale"
+ ) +
+ theme(legend.position = "none")
+
+ p2 <- d |>
+ gg_errorbar(
+ x = trt,
+ ymin = lower,
+ ymax = upper,
+ col = group,
+ width = 0.1,
+ x_label = "Treatment",
+ y_label = "Response",
+ y_symmetric = TRUE,
+ subtitle = "\ny_limits = c(NA, NA),"
+ ) +
+ theme(legend.position = "none")
+
+ p3 <- d |>
+ gg_col(
+ x = trt,
+ y = upper,
+ col = group,
+ position = "dodge",
+ width = 0.5,
+ x_label = "Treatment upper",
+ y_label = "Response",
+ y_symmetric = TRUE,
+ subtitle = "\ny_limits = c(0, NA),"
+ ) +
+ theme(legend.position = "none")
+
+ p <- p1 + p2 + p3
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "15"
+
+test_that(test_name, {
+ p <- penguins |>
+ mutate(across(sex, \(x) str_to_sentence(x))) |>
+ drop_na(sex) |>
+ gg_smooth(
+ x = flipper_length_mm,
+ y = body_mass_g,
+ col = sex,
+ se = TRUE, # via ... from geom_smooth
+ level = 0.999, # via ... from geom_smooth
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+
+
+## ----fig.asp=0.4------------------------------------------------------------------------------------
+test_name <- "16"
+
+test_that(test_name, {
+ p <- penguins |>
+ gg_boxplot(
+ x = flipper_length_mm,
+ y = species,
+ position = position_dodge2(preserve = "single"),
+ alpha = 0,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "17"
+
+test_that(test_name, {
+ p <- penguins |>
+ gg_boxplot(
+ x = species,
+ y = flipper_length_mm,
+ col = sex,
+ position = position_dodge2(preserve = "single"),
+ alpha = 0,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+
+
+## ----fig.asp = 0.4----------------------------------------------------------------------------------
+test_name <- "18"
+
+test_that(test_name, {
+ p <- penguins |>
+ group_by(species) |>
+ summarise(body_mass_g = mean(body_mass_g, na.rm = TRUE)) |>
+ mutate(lower = body_mass_g * 0.95) |>
+ mutate(upper = body_mass_g * 1.2) %>%
+ gg_col(
+ x = body_mass_g,
+ xmin = lower,
+ xmax = upper,
+ y = species,
+ col = species,
+ width = 0.75,
+ x_expand_limits = c(0, max(.$upper)),
+ x_labels = \(x) x / 1000,
+ x_label = "Body mass kg",
+ ) +
+ geom_errorbar(
+ colour = "black",
+ width = 0.1,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+
+
+## ----fig.asp=0.4------------------------------------------------------------------------------------
+test_name <- "19"
+
+test_that(test_name, {
+ p <- penguins |>
+ group_by(species) |>
+ summarise(body_mass_g = mean(body_mass_g, na.rm = TRUE)) |>
+ mutate(lower = body_mass_g * 0.95) |>
+ mutate(upper = body_mass_g * 1.2) |>
+ gg_blanket(
+ x = body_mass_g,
+ y = species,
+ col = species,
+ xmin = lower,
+ xmax = upper,
+ width = 0.75,
+ x_expand_limits = 0,
+ x_labels = \(x) x / 1000,
+ x_label = "Body mass kg",
+ ) +
+ geom_col(
+ colour = "#d3d3d3",
+ fill = "#d3d3d3",
+ alpha = 0.9,
+ width = 0.75,
+ ) +
+ geom_errorbar(
+ width = 0.1,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "20"
+
+test_that(test_name, {
+ p <- penguins |>
+ gg_point(
+ x = flipper_length_mm,
+ y = body_mass_g,
+ col = species,
+ mapping = aes(alpha = species, shape = species),
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+## ---------------------------------------------------------------------------------------------------
+test_name <- "21"
+
+test_that(test_name, {
+ p <- penguins |>
+ gg_blanket(
+ geom = "bar",
+ stat = "bin",
+ position = "stack",
+ x = flipper_length_mm,
+ col = species,
+ )
+
+ vdiffr::expect_doppelganger(test_name, p)
+})
+
+set_blanket()
+
+