Skip to content
Back to formatted view

Raw Message

Message-ID: <86b348383063425dbd20c40b946b838f@UM-MAIL3213.unimaas.nl>
Date: 2020-12-17T12:52:42Z
From: Wolfgang Viechtbauer
Subject: [R-meta] how to make a nicer forest plot
In-Reply-To: <CAEJcFY3G7Bb5m9LQ2O8L94PAk9yc4VR+F1f5i2AuVxZ1b0Xt3w@mail.gmail.com>

Dear Valeria,

Try adding at=c(-1, 0, 1, 5, 10) or wherever you would like axis marks.

You also might want to play around with the 'efac' argument to decrease the length of the vertical bars at the end of the CIs. This also affects the height of the summary polygon. You could use efac=c(0,1), the first to basically suppress the vertical lines on the CIs while keeping the polygon height unaffected (or change the 1 as deemed fit).

Best,
Wolfgang

>-----Original Message-----
>From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces at r-project.org]
>On Behalf Of Valeria Ivaniushina
>Sent: Thursday, 17 December, 2020 13:43
>To: R meta
>Subject: [R-meta] how to make a nicer forest plot
>
>Dear list members,
>
>This is my code for a forest plot.
>plot(forest(res,
>? ? ? ? ? ? xlab="Log odds ratio",
>? ? ? ? ? ? mlab="",
>? ? ? ? ? ? cex=1.8,
>? ? ? ? ? ? slab=paste(wb$Name),
>? ? ? ? ? ? psize=1, header="Publication",
>? ? ? ? ? ? xlim = c(-2.48, 4.0),
>? ? ? ? ? ? ylim = c(-1.5,20),
>))
>
>The plot looks ok, but the range of the X-axis is far?too large.
>How can I correct?it?