Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# ggplot2 (development version)

* Added `"dot"` and `"blank"` to list of named shapes, representing
`shape = "."` and `shape = NA` respectively (@teunbrand, #5088).
* Using two ordered factors as facetting variables in
`facet_grid(..., as.table = FALSE)` now throws a warning instead of an
error (@teunbrand, #5109).
Expand Down
4 changes: 3 additions & 1 deletion R/geom-point.r
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ translate_shape_string <- function(shape_string) {
"square filled" = 22,
"diamond filled" = 23,
"triangle filled" = 24,
"triangle down filled" = 25
"triangle down filled" = 25,
"dot" = 46,
"blank" = NA
)

shape_match <- charmatch(shape_string, names(pch_table))
Expand Down
6 changes: 3 additions & 3 deletions vignettes/ggplot2-specs.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,13 @@ Shapes take five types of values:
"diamond", paste("diamond", c("open", "filled", "plus")),
"triangle", paste("triangle", c("open", "filled", "square")),
paste("triangle down", c("open", "filled")),
"plus", "cross", "asterisk"
"plus", "cross", "asterisk", "dot", "blank"
)

shapes <- data.frame(
shape_names = shape_names,
x = c(1:7, 1:6, 1:3, 5, 1:3, 6, 2:3, 1:3),
y = -rep(1:6, c(7, 6, 4, 4, 2, 3))
x = c(1:7, 1:6, 1:3, 5, 1:3, 6, 2:3, 1:5),
y = -rep(1:6, c(7, 6, 4, 4, 2, 5))
)

ggplot(shapes, aes(x, y)) +
Expand Down