hadley/ggplot2 — Issue #311: plotmath expression in legend labels
Author: kohske
Created: 2011-12-21 02:57:53+00:00
State: open

Two way: directly pass the expression

```
qplot(1:3, 1:3, col=1:3) +
scale_colour_continuous(breaks = 1:3,
labels = c(expression(alpha),expression(beta),expression(gamma)))
```

or, use `parse = TRUE` option like `geom_text`

```
qplot(1:3, 1:3, col=1:3) +
scale_colour_continuous(breaks = 1:3, labels = c("alpha", "beta", "gamma"),
guide = guide_legend(parse = TRUE))

#or

qplot(1:3, 1:3, col=1:3) +
scale_colour_continuous(breaks = 1:3, labels = c("alpha", "beta", "gamma"), parse.label = TRUE)
```

need to write tests.

see also 89e814251ddb3d5382548de799bb5d771e0355a3