#==============================# ggplot2: subscript in x-axis labels(ticks) rm(list=ls(all=TRUE))library(ggplot2)data <- data.frame(names=tolower(LETTERS[1:4]),mean_p=runif(4))p <- ggplot(data,aes(x=names,y=mean_p))p <- p + geom_bar(colour="black",fill="white")p <- p + xlab("expressions") + scale_y_continuous(expression(paste("Wacky Data")))p <- p + scale_x_discrete(labels=c(a=expression(paste(Delta^2)), b=expression(paste(q^n)), c=expression(log(z)), d=expression(paste(omega / (x + 13)^2))))p # from: #==============================# ggplot2: subscript in y-axis labels rm(list=ls(all=TRUE))library(ggplot2)dat <- data.frame(x = rnorm(100), y = rnorm(100))ggplot(dat, aes(x=x,y=y)) + geom_point() + labs(y=expression(Blah[1*d]))ggplot(dat, aes(x=x,y=y)) + geom_point() + labs(y=expression(Blah["1d"])) ggplot(dat, aes(x=x,y=y)) + geom_point() + labs(y=expression(Blah[1*d]*"%")) # from: # # #