[英]Axis tick marks for forestplot in R
I have a plot made with forestplot in the rmeta package. 我在rmeta包中有一个用forestplot绘制的图。 Notice the horizontal axis has no tick marks.
请注意,水平轴没有刻度线。 How could I add them at, say, intervals of
0.5
? 我怎样才能以
0.5
间隔添加它们?
Here is the plot: 这是情节:
And the code: 和代码:
Forest1 <- read.table(file="Forest_1.txt", sep="\t", head=TRUE, row.names=1)
tabletext<-rbind(c("A","3.77"),
c("B","1.33"),
c("C","1.32"),
c("D","1.12"),
c("E","1.58"),
c("F","0.9"))
m <-Forest1$OR
l <-Forest1$lower
u <-Forest1$upper
#overview datafile:
cbind(tabletext, m,l,u)
m l u
[1,] "A" "3.77" "3.77" "0.6144" "6.9256"
[2,] "B" "1.33" "1.33" "0.644" "2.016"
[3,] "C" "1.32" "1.32" "0.6536" "1.9864"
[4,] "D" "1.12" "1.12" "0.4536" "1.7864"
[5,] "E" "1.58" "1.58" "1.0116" "2.1484"
[6,] "F" "0.9" "0.9" "0.7236" "1.0764"
forestplot(tabletext,m,l,u, zero=1, xticks=c(0.2,7),col=meta.colors(box="royalblue",line="darkblue", summary="royalblue"))
您应该使用以下命令修改对forestplot的调用:
forestplot(tabletext,m,l,u, zero=1, xticks=c(0.2,.7,1.2,1.7,2.2,2.7,3.2,3.7,4.2,4.7,5.2,5.7,6.2,6.7,7),col=meta.colors(box="royalblue",line="darkblue", summary="royalblue"))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.