| tableau_shape_pal | R Documentation |
Shape palettes used by Tableau.
tableau_shape_pal(
palette = c("default", "filled", "proportions"),
unicode = FALSE
)
palette |
Palette name. |
unicode |
If |
Not all shape palettes in Tableau are supported, and these palettes are not exact.
Shape palettes in Tableau are used to expose images for use as markers in charts, and thus are sometimes groupings of closely related symbols.
A palette function. It takes the number of shapes n and returns an integer vector of n
shape (pch) codes, and can be used as the palette argument of
discrete_scale().
Supported values by palette: "default" eight (ten with
unicode = TRUE), "filled" six (ten), "proportions"
two (five). Shapes with no base pch equivalent – the sideways triangles,
the solid star, and the partially filled circles – are dropped rather than
approximated by a different shape.
"proportions" encodes fill fraction, which base pch cannot
express at all, so only its empty and full circles survive; they remain
meaningful as a two-value scale. To encode a proportion, map alpha
or fill instead, or use unicode = TRUE with a font covering
Geometric Shapes, such as DejaVu Sans.
Other shapes tableau:
scale_shape_tableau()
# The eight shapes with a font-independent equivalent.
show_shapes(tableau_shape_pal()(8))
## Not run:
# All ten, drawn from the device font. Needs a font covering Geometric
# Shapes, such as DejaVu Sans.
show_shapes(tableau_shape_pal(unicode = TRUE)(10))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.