ggplot: Parsing Expressions
code
beginner
r
ggplot
A useful trick is to pass expressions into ggplot. Here I’ve used the following as arguments in labs()
.
c("r11", "r1", "Ihtk.0", "Ihtk.Slope", "Ia.0", "Ia.Slope", "vrest")
c(expression(M\~Omega), expression(M\~Omega), "nA", expression(frac(nA,
"nA", expression(frac(nA, mV)), "mV" ) mV)),
You can also do something like this theme(plot.title = element_text(face="italic"))
to add italics to the figure title.