Black star symbol for geom_point in ggplot2

I am making a research map with ggplot2 and want to use the black star symbol (for example: http://www.fileformat.info/info/unicode/char/2605/index.htm ) to indicate the location of the city.

Is there a way to configure the pch argument in geom_point to construct this character, possibly using an expression in unicode? I managed to create other unicode characters in ggplot2 with this code:

library(ggplot2)
p <- ggplot(mtcars, aes(wt, mpg))
p + geom_point(pch="\u2265", size=10)

When I use \ u2605 instead of the black star symbol, only rectangular rectangular symbols are displayed as a result of this graph. Is there any other way to do this or alternative unicode for this character? I use RStudio on my Mac, if that matters.

Thanks Jay

+4
source share

Source: https://habr.com/ru/post/1623124/


All Articles