Many plotting functions in R use the graphical parameter pch
to specify the shape of the data points. According to R documentation, there are 26 vector shapes to pick between, as well as the option to use ASCII characters.
Would it be possible to specify other simple vector shapes to use in plots, such as the examples below?
There are some answers on stack overflow for creating plots with images as the points, but I feel this is a distinct question, as I would like to create vector shapes compatible with other graphical parameters such as col
and cex
. Another answer suggests using unicode symbols which is my best option so far, but it's still difficult to find the precise symbols I want.
Surely R has somewhere stored the code that creates the 26 vector shapes that are available, and it would be possible to write code in the same format for new shapes that could be used in the same way? A pointer in the right direction (or confirmation that this is totally impossible) would be great.