I would like to include greek symbols in my ggplot2 legend as follows:
However, the greek symbols appear in the legend as:
The relevant part of the code generating this graph:
data <- read_excel("file.xlsx", sheet=sheet)
data <- melt(data, id.vars = c("X"))
g <- ggplot(data, aes(x=X))
g <- g + geom_ma(aes(y=value, color=variable, linetype=variable))
It is clear that R does not by default support unicode-based greek symbols inserted into Excel files, which are then melted using the reshape2 library. How does one achieve the correct behaviour?
Other resources on the internet suggest the usage of expression() or bquote(), but these approaches won't work with the method I use for generating graphs (with reshape2).