Skip to content

Commit 23a748f

Browse files
committed
Add boxplot and dotplot visual tests
1 parent 09faf05 commit 23a748f

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

visual_test/boxplot.r

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
vcontext("boxplot")
2+
3+
ggplot(mtcars, aes(x = factor(cyl), y = drat, colour = factor(cyl))) +
4+
geom_boxplot(outlier.size = 5)
5+
save_vtest("outlier colours")
6+
7+
end_vcontext()

visual_test/dotplot.r

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,15 @@ ggplot(dat2, aes(y, fill = g)) +
132132
facet_grid(x ~ .)
133133
save_vtest("facets, 3 groups, histodot, stackgroups")
134134

135+
# Missing values
136+
dat2 <- dat
137+
dat2$x[c(1, 10)] <- NA
138+
139+
ggplot(dat2, aes(x)) + geom_dotplot(binwidth = .4)
140+
save_vtest("2 NA values, dot-density binning, binwidth = .4")
141+
142+
ggplot(dat2, aes(0, x)) +
143+
geom_dotplot(binwidth = .4, binaxis = "y", stackdir = "center")
144+
save_vtest("2 NA values, bin along y, stack center")
145+
135146
end_vcontext()

0 commit comments

Comments
 (0)