Here is a link to an excellent wiki that explains how to put greek symbols in ggplot2. In summary, here is what you do to obtain greek symbols
- Text Labels: Use
parse = T
insidegeom_text
orannotate
. - Axis Labels: Use
expression(alpha)
to get greek alpha. - Facet Labels: Use
labeller = label_parsed
insidefacet
. - Legend Labels: Use
bquote(alpha == .(value))
in legend label.
You can see detailed usage of these options in the link
EDIT. The objective of using greek symbols along the tick marks can be achieved as follows
require(ggplot2);
data(tips);
p0 = qplot(sex, data = tips, geom = 'bar');
p1 = p0 + scale_x_discrete(labels = c('Female' = expression(alpha),
'Male' = expression(beta)));
print(p1);
For complete documentation on the various symbols that are available when doing this and how to use them, see ?plotmath
.