Skip to content

Commit fd5be52

Browse files
committed
override test
1 parent 2dc3000 commit fd5be52

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: animint2
22
Title: Animated Interactive Grammar of Graphics
3-
Version: 2025.9.30
3+
Version: 2025.10.3
44
URL: https://animint.github.io/animint2/
55
BugReports: https://github.com/animint/animint2/issues
66
Authors@R: c(

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Changes in version 2025.10.3 (PR#240)
2+
3+
- `guide_legend(override.aes)` works in a plot with both color and fill legends.
4+
15
# Changes in version 2025.9.30 (PR#239)
26

37
- `getCommonChunk()` has new atime performance test.

tests/testthat/test-compiler-guides.R

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,20 @@ context("Guides")
33
test_that("colourbar trains without labels", {
44
g <- guide_colorbar()
55
sc <- scale_colour_continuous(limits = c(0, 4), labels = NULL)
6-
76
out <- guide_train(g, sc)
87
expect_equal(names(out$key), c("colour", ".value"))
98
})
109

10+
test_that("no error for override fill white", {
11+
viz <- animint(
12+
ggplot()+
13+
geom_tile(aes(
14+
x, x, color=y, fill=x),
15+
data=data.frame(x=seq(-1,1), y=0:2))+
16+
scale_color_gradient(
17+
low="white",high="black",
18+
guide=guide_legend(override.aes=list(fill="white")))+
19+
scale_fill_gradient2())
20+
info <- animint2dir(viz, open.browser = FALSE)
21+
expect_is(info, "environment")
22+
})

0 commit comments

Comments
 (0)