diff --git a/R/scale-shape.R b/R/scale-shape.R index effa0a0b2f..39687022fc 100644 --- a/R/scale-shape.R +++ b/R/scale-shape.R @@ -12,6 +12,13 @@ #' @inheritParams scale_x_discrete #' @inheritDotParams discrete_scale -expand -position -scale_name -palette #' @rdname scale_shape +#' @details +#' Shapes can be referred to by number or name. Shapes in \[0, 20\] do not +#' support a fill aesthetic, whereas shapes in \[21, 25\] do. +#' +#' \if{html}{\figure{shape_table.svg}{All shapes by number and name}} +#' \if{latex}{\figure{shape_table.pdf}} +#' #' @seealso #' The documentation for [differentiation related aesthetics][aes_linetype_size_shape]. #' diff --git a/man/figures/shape_table.pdf b/man/figures/shape_table.pdf new file mode 100644 index 0000000000..8e7f539dc2 Binary files /dev/null and b/man/figures/shape_table.pdf differ diff --git a/man/figures/shape_table.svg b/man/figures/shape_table.svg new file mode 100644 index 0000000000..b94a3471fc --- /dev/null +++ b/man/figures/shape_table.svg @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0: +square open +1: +circle open +2: +triangle open +3: +plus +4: +cross +5: +diamond open +6: +triangle down open +7: +square cross +8: +asterisk +9: +diamond plus +10: +circle plus +11: +star +12: +square plus +13: +circle cross +14: +square triangle +15: +square +16: +circle small +17: +triangle +18: +diamond +19: +circle +20: +bullet +21: +circle filled +22: +square filled +23: +diamond filled +24: +triangle filled +25: +triangle down filled + + diff --git a/man/scale_shape.Rd b/man/scale_shape.Rd index 85b991fd9a..4f90b5c0d6 100644 --- a/man/scale_shape.Rd +++ b/man/scale_shape.Rd @@ -89,6 +89,13 @@ seventh and subsequent levels will not appear on the plot. Use a continuous variable to shape unless \code{scale_shape_binned()} is used. Still, as shape has no inherent order, this use is not advised. } +\details{ +Shapes can be referred to by number or name. Shapes in [0, 20] do not +support a fill aesthetic, whereas shapes in [21, 25] do. + +\if{html}{\figure{shape_table.svg}{All shapes by number and name}} +\if{latex}{\figure{shape_table.pdf}} +} \examples{ set.seed(596) dsmall <- diamonds[sample(nrow(diamonds), 100), ]