Skip to content

Commit b6449ee

Browse files
committed
update snaps
1 parent f408588 commit b6449ee

File tree

3 files changed

+28
-7
lines changed

3 files changed

+28
-7
lines changed

R/stat-boxplot.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ StatBoxplot <- ggproto("StatBoxplot", Stat,
2727
default = NA)
2828

2929
if (is.na(params$flipped_aes)) {
30-
cli::cli_warn("Warning: Orientation is not uniquely specified when both the x and y aesthetics are continuous. Picking default orientation 'x'.")
30+
cli::cli_warn("Orientation is not uniquely specified when both the x and y aesthetics are continuous. Picking default orientation 'x'.")
3131
params$flipped_aes <- FALSE
3232
}
3333
data <- flip_data(data, params$flipped_aes)

tests/testthat/_snaps/geom-boxplot.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,35 @@
11
# geom_boxplot for continuous x gives warning if more than one x (#992)
22

3-
Warning: Orientation is not uniquely specified when both the x and y aesthetics are continuous. Picking default orientation 'x'.
3+
Code
4+
p <- bplot(aes(x, y))
5+
Condition
6+
Warning:
7+
Orientation is not uniquely specified when both the x and y aesthetics are continuous. Picking default orientation 'x'.
8+
Warning:
9+
Continuous x aesthetic
10+
i did you forget `aes(group = ...)`?
411

512
---
613

7-
Warning: Orientation is not uniquely specified when both the x and y aesthetics are continuous. Picking default orientation 'x'.
14+
Code
15+
p <- bplot(aes(x, y), facet_wrap(~x))
16+
Condition
17+
Warning:
18+
Orientation is not uniquely specified when both the x and y aesthetics are continuous. Picking default orientation 'x'.
19+
Warning:
20+
Continuous x aesthetic
21+
i did you forget `aes(group = ...)`?
822

923
---
1024

11-
Warning: Orientation is not uniquely specified when both the x and y aesthetics are continuous. Picking default orientation 'x'.
25+
Code
26+
p <- bplot(aes(Sys.Date() + x, y))
27+
Condition
28+
Warning:
29+
Orientation is not uniquely specified when both the x and y aesthetics are continuous. Picking default orientation 'x'.
30+
Warning:
31+
Continuous x aesthetic
32+
i did you forget `aes(group = ...)`?
1233

1334
# boxplots with a group size >1 error
1435

tests/testthat/test-geom-boxplot.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ test_that("geom_boxplot for continuous x gives warning if more than one x (#992)
4242
ggplot_build(ggplot(dat, aes) + geom_boxplot(aes) + extra)
4343
}
4444

45-
expect_snapshot_warning(bplot(aes(x, y)))
46-
expect_snapshot_warning(bplot(aes(x, y), facet_wrap(~x)))
47-
expect_snapshot_warning(bplot(aes(Sys.Date() + x, y)))
45+
expect_snapshot(p <- bplot(aes(x, y)))
46+
expect_snapshot(p <- bplot(aes(x, y), facet_wrap(~x)))
47+
expect_snapshot(p <- bplot(aes(Sys.Date() + x, y)))
4848

4949
expect_silent(bplot(aes(x, group = x, y)))
5050
expect_silent(bplot(aes(1, y)))

0 commit comments

Comments
 (0)