[R-meta] forest plot details

Viechtbauer, Wolfgang (SP) wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Fri Oct 15 17:09:46 CEST 2021


Hi Norman,

R does not a zoom button. I suspect you are using RStudio, which has such a button. But what you really should do is save the plot using something like png() or pdf() (or whatever type of file you would like to create). You can then play around with the 'width', 'height' and 'pointsize' arguments until it looks the way you like. That way, you have full control over the dimensions and resolution of the figure. This also creates a fully reproducible workflow instead of using some tool to do screen capture.

Remember to use dev.off() when using something like png() so that the 'plotting device' is closed after you have created the figure.

Best,
Wolfgang

>-----Original Message-----
>From: Norman DAURELLE [mailto:norman.daurelle using agroparistech.fr]
>Sent: Friday, 15 October, 2021 16:25
>To: Viechtbauer, Wolfgang (SP)
>Cc: r-sig-meta-analysis
>Subject: Re: forest plot details
>
>ATTACHMENT(S) REMOVED: Forest plot with subgroups and ordered.png
>
>Dear Wolfgang, dear list members,
>
>thank you very much !
>
>I have another question, it's something that has been troubling me for a while :
>when I have many rows in a forest plot, reading each row becomes difficult,
>the rows get crushed together, the way they are in the forest plot I attach.
>
>If I use the "zoom" button of the plot window in R, it makes the graph more
>readble for me,
>but then the text is thinner.
>
>Is there a way to implement space between rows without having to set each line
>that is "filled" manually ?
>I mean I understand that the part " rows = c(...)" allows you to choose which
>rows are used and which are left blank,
>but I would basically just like to be able to change the line spacing, leave a
>little more space between rows so that the plot is more readable.
>
>Maybe i would just have to increase the font size then use the zoom option and
>capture the plot with the snipping tool.
>
>As always, any advice would be appreciated.
>
>Best wishes,
>Norman.
>
>________________________________________
>De: "Wolfgang Viechtbauer, SP" <wolfgang.viechtbauer using maastrichtuniversity.nl>
>À: "Norman DAURELLE" <norman.daurelle using agroparistech.fr>, "r-sig-meta-analysis"
><r-sig-meta-analysis using r-project.org>
>Envoyé: Vendredi 15 Octobre 2021 15:29:01
>Objet: RE: forest plot details
>
>Hi Norman,
>
>In the example you linked to, just replace the 'order=dat$alloc' part in forest()
>with 'order=order(dat$alloc, dat$yi)'.
>
>Best,
>Wolfgang
>
>>-----Original Message-----
>>From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces using r-project.org] On
>>Behalf Of Norman DAURELLE
>>Sent: Friday, 15 October, 2021 11:09
>>To: r-sig-meta-analysis
>>Subject: [R-meta] forest plot details
>>
>>Dear list members,
>>
>>Reading [ https://www.metafor-
>>project.org/doku.php/plots:forest_plot_with_subgroups | https://www.metafor-
>>project.org/doku.php/plots:forest_plot_with_subgroups ] I managed to add
>>subgroups to my forest plot,
>>but I would like the outcomes to be ordered according to the value of the
>effect-
>>size inside each group.
>>
>>Is it possible to do that in a forest plot ?
>>
>>Any advice would be much appreciated.
>>
>>Best wishes,
>>Norman



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