r - Expression of italics and superscripts in ggplot axis title -
i sorry ask this, can't seem expression right include in ylab() or xlab() arguments of ggplot2-object. needs read:
"2q (rarefied)". "2" needs superscripted, though.
i have fiddled expression() , paste(), seems impossible. appreciated.
edit: example:
dat<-as.data.frame(matrix(runif(100), 10,10)) names(dat) <- letters[1:10] library(ggplot2) ggplot(dat, aes(a,b)) + geom_point()+ xlab("some title")
all necessary information can found in help("plotmath").
ggplot(dat, aes(a,b)) + geom_point()+ xlab(expression({}^2*italic(q)~textstyle(group("(", rarefied, ")")))) 
Comments
Post a Comment