Skip to content

Commit ded8766

Browse files
committed
ggplot-themes-fix-marker-default-shape
1 parent 25f0d4c commit ded8766

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
@@ -32,6 +32,20 @@ test_that("dotted/dashed grid translated as line with alpha=0.1",{
3232
}
3333
})
3434

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

0 commit comments

Comments
 (0)