diff --git a/tests/testthat/_snaps/vdiffr_geoms_coords/geom-point2-works.svg b/tests/testthat/_snaps/vdiffr_geoms_coords/geom-point2-works.svg
index 26e4ff8bf..b63d4cd05 100644
--- a/tests/testthat/_snaps/vdiffr_geoms_coords/geom-point2-works.svg
+++ b/tests/testthat/_snaps/vdiffr_geoms_coords/geom-point2-works.svg
@@ -39,6 +39,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -213,16 +223,6 @@
Petal.Width
Sepal.Length
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/testthat/test-vdiffr_geoms_coords.R b/tests/testthat/test-vdiffr_geoms_coords.R
index 845b95486..ed9f0a724 100644
--- a/tests/testthat/test-vdiffr_geoms_coords.R
+++ b/tests/testthat/test-vdiffr_geoms_coords.R
@@ -1,36 +1,32 @@
test_that("geom and coord functions work correctly", {
- skip_if_not_installed("poorman")
- suppressPackageStartupMessages(library(poorman))
-
+ skip_if_not_installed("ggplot2")
# coord_radar() ------------------
- data <- iris %>%
- group_by(Species) %>%
- summarise(across(everything(), mean)) %>%
- datawizard::reshape_longer(c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width"))
+ data <- aggregate(iris[1:4], list(Species = iris$Species), mean)
+ data <- datawizard::reshape_longer(data, c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width"))
set.seed(123)
vdiffr::expect_doppelganger(
title = "coord_radar() works",
- fig = ggplot(
+ fig = ggplot2::ggplot(
data,
- aes(
+ ggplot2::aes(
x = name,
y = value,
color = Species,
group = Species
)
) +
- geom_polygon(fill = NA, linewidth = 2) +
+ ggplot2::geom_polygon(fill = NA, linewidth = 2) +
coord_radar(start = -pi / 4)
)
# geom_point2() ----------------------
- normal <- ggplot(iris, aes(x = Petal.Width, y = Sepal.Length)) +
- geom_point(size = 8, alpha = 0.3) +
+ normal <- ggplot2::ggplot(iris, ggplot2::aes(x = Petal.Width, y = Sepal.Length)) +
+ ggplot2::geom_point(size = 8, alpha = 0.3) +
theme_modern()
- new <- ggplot(iris, aes(x = Petal.Width, y = Sepal.Length)) +
+ new <- ggplot2::ggplot(iris, ggplot2::aes(x = Petal.Width, y = Sepal.Length)) +
geom_point2(size = 8, alpha = 0.3) +
theme_modern()
@@ -45,7 +41,7 @@ test_that("geom and coord functions work correctly", {
set.seed(123)
vdiffr::expect_doppelganger(
title = "`geom_poolpoint()` works - 1",
- fig = ggplot(iris, aes(x = Petal.Width, y = Sepal.Length, color = Species)) +
+ fig = ggplot2::ggplot(iris, ggplot2::aes(x = Petal.Width, y = Sepal.Length, color = Species)) +
geom_poolpoint(label = rownames(iris)) +
scale_color_flat_d() +
theme_modern()
@@ -54,7 +50,7 @@ test_that("geom and coord functions work correctly", {
set.seed(123)
vdiffr::expect_doppelganger(
title = "`geom_poolpoint()` works - 2",
- fig = ggplot(iris, aes(x = Petal.Width, y = Sepal.Length, color = Species)) +
+ fig = ggplot2::ggplot(iris, ggplot2::aes(x = Petal.Width, y = Sepal.Length, color = Species)) +
geom_pooljitter(label = rownames(iris)) +
scale_color_flat_d() +
theme_modern()
@@ -65,7 +61,7 @@ test_that("geom and coord functions work correctly", {
set.seed(123)
vdiffr::expect_doppelganger(
title = "geom_violindot() works",
- fig = ggplot(iris, aes(x = Species, y = Sepal.Length, fill = Species)) +
+ fig = ggplot2::ggplot(iris, ggplot2::aes(x = Species, y = Sepal.Length, fill = Species)) +
geom_violindot() +
theme_modern()
)
@@ -75,7 +71,7 @@ test_that("geom and coord functions work correctly", {
set.seed(123)
vdiffr::expect_doppelganger(
title = "geom_violinhalf() works",
- fig = ggplot(iris, aes(x = Species, y = Sepal.Length, fill = Species)) +
+ fig = ggplot2::ggplot(iris, ggplot2::aes(x = Species, y = Sepal.Length, fill = Species)) +
geom_violinhalf() +
theme_modern() +
scale_fill_material_d()