[R] combine symbol beta and text in ggplot2 and adjust size

hadley wickham h.wickham at gmail.com
Thu Oct 30 16:26:05 CET 2008


> For this example:
>
> library(ggplot2)
> p <- ggplot(mtcars, aes(x = wt, y=mpg)) + geom_point()
> p <- p + scale_x_continuous(expression(beta))
> p
>
> How can I include text with the expression. For example, "level of
> \beta". Also, how can I increase

Have a look at ?plotmath - you want something like
expression(paste("Level of ", beta))

> the size of the font for this axis label.

See http://had.co.nz/ggplot2/book/polishing.pdf

Hadley

-- 
http://had.co.nz/



More information about the R-help mailing list