I'd like to specify my own shape palettes for ggplot2
at least as a vector for input into scale_shape_manual
. I really like the paired shapes palette from JMP, but noticed R doesn't have some of these shapes. In particular, sideways triangles (e.g. |>
or <|
) or a filled upside down triangle (e.g. \/
) are missing. Are these available anywhere? If not, how can I specify these extra shapes and is there a way to get ggplot2
to use them in plots?
Creating new shape palettes in ggplot2 and other R graphics
4k views Asked by wdkrnls At
1
You can create your own shape palette by specifying the Unicode values for the characters you want. You can find Unicode values for various geometric shapes here. For example:
You can, of course, use Unicode characters in base graphics as well:
Not every Unicode character renders correctly. I'm not sure why, but it may have to do with which fonts you have installed.