Skip to content

Commit e8dee8c

Browse files
committed
Merge branch 'master' of github.com:hadley/ggplot2
2 parents b59216e + 23a748f commit e8dee8c

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

R/stat-bindot.r

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ StatBindot <- ggproto("StatBindot", Stat,
1414
params
1515
},
1616

17+
compute_layer = function(self, data, params, panels) {
18+
data <- remove_missing(data, params$na.rm,
19+
params$binaxis,
20+
snake_class(self),
21+
finite = TRUE
22+
)
23+
ggproto_parent(Stat, self)$compute_layer(data, params, panels)
24+
},
25+
1726
compute_panel = function(self, data, scales, na.rm = FALSE, binwidth = NULL,
1827
binaxis = "x", method = "dotdensity",
1928
binpositions = "bygroup", origin = NULL,

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)