I am plotting a graph with ggplot2 and I want to put arithmetic symbols in the legend labels (or anywhere else for that matter) such as "≥". I've tried the coding line expression(x>=y)
which works well, but I don't want the character before or after the "≥". For example, with the following code:
library(ggplot2)
mtcars$carb <- factor(mtcars$carb)
ggplot(mtcars, aes(wt, mpg, group=carb)) +
geom_point(aes(colour=carb), size=4) +
scale_colour_discrete(labels=c(expression(x>=y), "2", "3", "4", "6", "8"))
I get this
but I want this.
Is there a way to do that?