Skip to content

Commit 4bf6a7c

Browse files
committed
add test
1 parent c1e5536 commit 4bf6a7c

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed
Lines changed: 60 additions & 0 deletions
Loading

tests/testthat/test-geom-hex.R

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ test_that("bin size are picked up from stat", {
2727
geom_hex(aes(x = x, y = y), binwidth = c(0.1, 0.1)) +
2828
coord_cartesian(xlim = c(-1, 1), ylim = c(-1, 1))
2929
)
30+
31+
expect_doppelganger(
32+
"hexes with different sizes",
33+
ggplot(data.frame(x = 1:3, y = 0, r = (1:3)/6)) +
34+
geom_hex(
35+
aes(x = x, y = y, radius = r),
36+
stat = "identity"
37+
) +
38+
coord_cartesian(xlim = c(0, 4), y = c(-1, 1))
39+
)
40+
3041
})
3142

3243
test_that("geom_hex works in non-linear coordinate systems", {

0 commit comments

Comments
 (0)