Skip to content

Adding math symbols? #7

Answered by NicolasH2
dbleyl asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @dbleyl ,

if we are talking about unicode symbols, then this worked for me:

library(ggplot2)
library(ggbrace)

plt <- ggplot(iris, aes(x=Sepal.Length, y=Sepal.Width, color=Species, label=Species)) + 
  geom_point() +
  theme_classic() +
  theme(legend.position="none")

plt + geom_brace(aes(c(4,7), c(4, 4.5), label="\u03b1 \u03a9 \u00be \u026E"), inherit.data=F, labelsize=5)

you can find a list of all the unicodes in the following link. Just replace the U+ in the beginning of each unicode with \u: https://en.wikipedia.org/wiki/List_of_Unicode_characters

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by NicolasH2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants