增加scale_y_continuous对象的大小

时间:2014-07-17 17:19:20

标签: r ggplot2

我是ggplot中的绝对生物,但我需要 快速扩大a标签的大小 目前由同事撰写的代码 不可达。这是一个可重复的例子:

library(ggplot2)
b1<-cbind(sort(rnorm(100)),1)
b2<-cbind(sort(rnorm(100)),1)
H1 <- data.frame(Direction = c(1:length(b1[,1])),Iind = (b1[,1]), supp = rep("H_1",length(b1[,1])))
H2 <- data.frame(Direction = c(1:length(b1[,1])), Iind = (b2[,1]), supp = rep("H_2",length(b2[,1])))
plotData <- data.frame(rbind(H1, H2))
perfPlot = ggplot(data=plotData, aes(x=Direction, y=Iind, group=supp, colour=supp)) + geom_line(size = 1.2)
perfPlot = perfPlot + scale_y_continuous(name=bquote(paste("I(",H^m,",",bold(.("a")),")")))
perplot

我需要复杂的y标签(一个bquote(paste("I(",H^m,",",bold(.("a")),")")))的大小更大,但我无法在size中找到参数scale_y_continuous()

有人能指出我这样做的方法吗?

1 个答案:

答案 0 :(得分:3)

尝试调整theme()

perfPlot + theme(axis.title.y=element_text(size=24))

enter image description here