减少“xlab”和中的x轴之间的空间(metafor package)在R

减少“xlab”和中的x轴之间的空间(metafor package)在R,r,plot,metafor,R,Plot,Metafor,我试图缩小xlab(标题为:“Log Risk Ratio”)和由R中的metafor包生成的森林图中的x轴(见下图)之间的空间,但没有成功 有没有办法做到这一点 library(metafor) dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg) forest(dat$yi, dat$vi, mgp = c(2, .3, 0)) # Tried setting `mgp` with

我试图缩小
xlab
(标题为:
“Log Risk Ratio”
)和由R中的
metafor
包生成的森林图中的x轴(见下图)之间的空间,但没有成功

有没有办法做到这一点

library(metafor)

dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)

forest(dat$yi, dat$vi, mgp = c(2, .3, 0)) # Tried setting `mgp` without success!
库(metafor)

datforest调用base R plot函数,因此您首先将xlab设置为“”,然后使用mtext手动添加文本。增加padj将使标签远离轴

forest(dat$yi, dat$vi, mgp = c(2, .3, 0),xlab="") 
mtext(side=1,"Log Risk Ratio",padj=2)