简体   繁体   English

GGplot2的最小大小geom_text()

[英]Smallest size of GGplot2 geom_text()

I have a plot made with GGplot2. 我有一个用GGplot2绘制的图。 Now when i want to change the size of my text points within the plot, the size of the text does not change. 现在,当我想更改绘图中文本点的大小时,文本大小不会改变。 I use the following line of code: 我使用以下代码行:

ggplot(data = out, aes(x = V2, y = V1)) +
    ****geom_text(data = out[!is.na(out$V1),], aes(label = labels, alpha=0.3, size=0.1))**** +
    facet_grid(id1 ~ id2,scales="fixed")+
    geom_text(data=df.text,aes(pos,pos,label=id1)) + geom_abline( slope=1 ) + 
    ggtitle("Corralation between measured & calculated affinities") +
    ylab("") + xlab("") + theme(panel.grid.minor.x=element_blank(), panel.grid.major.x=element_blank())
}

I put ** between start and end of the line of interest fat. 我在兴趣线的开始和结束之间放置了**。 I know that size is the right parameter to change, but why isn't my text changing when for instance making size=0.01. 我知道大小是要更改的正确参数,但是为什么在例如使size = 0.01时我的文本没有更改。

多亏了亚当·金伯利(Adam Kimberley),size参数应该移到第二个括号之外,例如geom_text(data = out[!is.na(out$V1),], aes(label = labels), size=0.1, alpha=0.3)比文字大小大。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM