Skip to content

Commit 564ceca

Browse files
committed
Merge pull request #117 from ropensci/pedro-ggplot-fix-marker-default
ggplot: themes: fix marker default shape
2 parents 8c1864a + ded8766 commit 564ceca

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

R/ggplotly.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ default.marker.sizeref <- 1
66
marker.size.mult <- 10
77

88
marker.defaults <- list(alpha=1,
9-
shape="o",
9+
shape="16",
1010
size=marker.size.mult,
1111
sizeref=default.marker.sizeref,
1212
sizemode="area",

tests/testthat/test-ggplot-theme.R

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,20 @@ test_that("dotted/dashed grid translated as line with alpha=0.1",{
3838
save_outputs(ggiris, "theme-dashed-grid-lines")
3939
})
4040

41+
countrypop <- data.frame(country=c("Paraguay", "Peru", "Philippines"),
42+
population=c(7, 31, 101),
43+
edu=c(4.2, 1.75, 1.33),
44+
illn=c(0.38, 1.67, 0.43))
45+
gg <- ggplot(countrypop) +
46+
geom_point(aes(edu, illn, colour=country, size=population))
47+
48+
test_that("marker default shape is a circle", {
49+
info <- gg2list(gg)
50+
for (i in c(1:3)) {
51+
expect_identical(info[[i]]$marker$symbol, "circle")
52+
}
53+
})
54+
4155
test_that("plot panel border is translated correctly", {
4256
ggiris <- iris.base + theme_grey() # has no panel.border
4357
info <- gg2list(ggiris)

0 commit comments

Comments
 (0)