Skip to content

Commit 6f04b85

Browse files
committed
Add solid as equivalent of linetype = 1.
Fixes #1534
1 parent 491c40f commit 6f04b85

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ggplot2 2.0.0.9000
22

3+
* `geom_path()` knows that "solid" (not just 1) represents a solid line (#1534).
4+
35
* `layer()` now automatically adds a `na.rm` parameter if none is explicitly
46
supplied.
57

R/geom-path.r

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,9 @@ GeomPath <- ggproto("GeomPath", Geom,
168168

169169
# Work out whether we should use lines or segments
170170
attr <- plyr::ddply(munched, "group", function(df) {
171+
linetype <- unique(df$linetype)
171172
data.frame(
172-
solid = identical(unique(df$linetype), 1),
173+
solid = identical(linetype, 1) || identical(linetype, "solid"),
173174
constant = nrow(unique(df[, c("alpha", "colour","size", "linetype")])) == 1
174175
)
175176
})

0 commit comments

Comments
 (0)