[R-meta] question on resolution forestplot in metafor

Viechtbauer, Wolfgang (SP) wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Mon Jul 6 16:44:01 CEST 2020

The jpg has a low resolution (567 x 566 pixels) and therefore also looks rather grainy to me. Maybe Phota Viewer does some kind of manipulation in how it shows the jpg?

@Frank: In any case, the resolution of a jpg (or png or tiff or whatever plotting device you use) is not controlled by metafor. My guess is that you are not 'properly' saving the plot with the jpeg(...); <code for plot>; dev.off() commands but are doing some kind of copy-pasting from the displayed figure into some other software. That is not how one should save plots to files (and gives you no control over the resolution). See help(jpeg) for how to adjust the resolution and how to save plots to files in a scripted fashion.


>-----Original Message-----
>From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces using r-project.org]
>On Behalf Of Michael Dewey
>Sent: Saturday, 04 July, 2020 17:07
>To: Frank van Boven; r-sig-meta-analysis using r-project.org
>Subject: Re: [R-meta] question on resolution forestplot in metafor
>Dear Frank
>The jpeg you attached looks fine to me. This may be some subtle
>interaction between the software you are using to view it and the way R
>writes jpegs. I am opening it in Windows Phota Viewer.
>On 04/07/2020 12:52, Frank van Boven wrote:
>> Dear all,
>> I have a question on improving the resolution of a forestplot in metafor.
>> When printing it appears to become grainy.
>> I always chose the standard packages (Formula and metafor), enclosed the
>> script for the plot.
>> forest(res, slab = paste(new$Author, new$Year, new$Intervention, sep =
>> ", "), xlim = c(-12, 8), alim = c(-4,4), ilab = (new$Baseline),
>> ilab.xpos = c(-4.5), cex = 0.75)
>> op <- par(cex = 0.75, font = 2)
>> text(-12, 7, "Author; Year and Intervention", pos = 4)
>> text(-5, 7, "Baselineload", pos = 4)
>> text (-5, 6.5, "[ug/g dust]", pos = 4)
>> text(8, 7, "Std. mean difference", pos = 2)
>> text (8, 6.5,"[95% CI]", pos = 2)
>> par(op)
>> Is there any code known to improve a resolution to 300 dpi needed, or
>> additional package to use?
>> Thanks for your help.
>> Kind regards,
>> Frank van Boven

More information about the R-sig-meta-analysis mailing list