Skip to content

Commit 52e2e23

Browse files
steveharozhadley
authored andcommitted
Show a list of shapes in scale_shape docs (#1578)
* Show a list of shapes in scale_shape docs * Cleaned up shapes list * cleanup shape example code
1 parent d562b20 commit 52e2e23

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

R/scale-shape.r

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@
2424
#'
2525
#' # Or for short:
2626
#' d %+% dsmall
27+
#'
28+
#' # Show a list of available shapes
29+
#' df_shapes <- data.frame(shape = 0:24)
30+
#' ggplot(df_shapes, aes(shape = shape)) +
31+
#' geom_point(aes(shape = shape, x = 0, y = 0), size = 5, fill = 'red') +
32+
#' scale_shape_identity() +
33+
#' facet_wrap(~shape) + theme_void()
2734
scale_shape <- function(..., solid = TRUE) {
2835
discrete_scale("shape", "shape_d", shape_pal(solid), ...)
2936
}

man/scale_shape.Rd

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)