带有区别颜色的barplot,可显着正和负P值
我的数据集包含 12 个月和 4 个季节(季风前、季风、季风后、旱季)及其与环宽指数相关的 r 和 p 值,
这是我使用的代码,
k <- read.csv("macro_r_p.csv",TRUE,",")
k
cols <- c("azure3", "red") [(k$p < 0.05)+1]
barplot(k$r,names.arg=k$parameter,ylab="Correlation coefficient",col=cols,
main = expression("T"[max]), las=2)
但是,我只能管理颜色对于正和负显着 p 值 (p < 0.05)。我想要一种不同的颜色表示积极的显着关系,另一种不同的颜色表示消极的显着关系。给我获得复杂文本字体(稍大一点)的代码会很有帮助。另外,我的图表高度没有正确调整。
my data set contains 12 months and 4 seasons (pre-monsoon, monsoon, postmonsoon,dry-season) and their r and p-value in relation to ring width index
here is the code I used,
k <- read.csv("macro_r_p.csv",TRUE,",")
k
cols <- c("azure3", "red") [(k$p < 0.05)+1]
barplot(k$r,names.arg=k$parameter,ylab="Correlation coefficient",col=cols,
main = expression("T"[max]), las=2)
but, I could only manage a color for both positive and negative significant p value (p < 0.05). I want one different color for positive significant relation and another different color for negative significant relation. It would be helpful to give me the code to get a sophisticated text font (a bit larger). Also, my graph height was not adjusted properly.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论