Dear All, I have run into some difficulties when making a figure consisting of multiple funnel plots, while trying to minimize figure post-processing. It would be great to hear any suggestions for the questions below: * 1. How to specifically adjust the size of the axis text and tick labels? I hope to find an argument like ?size? in ggplot to achieve it. * 2. How to specifically increase the size of the funnel plot legend? * 3. Is there a way to create a composite figure in a way similar to ?ggarrange? in ggplot when having multiple funnel plots? Thank you in advance! Best regards, Sicong (Zone)
[R-meta] increase axis text size in funnel plot
4 messages · Michael Dewey, Liu Sicong, Wolfgang Viechtbauer
Dear Sicong There are many, many packages on CRAN which generate forest plots, some as standalone facilities and some as part of genral meta-analysis software, so unless you give us more detail about which package you are using and what happened when you tried we are unlikely to be able to be of much help. Michael
On 06/09/2023 16:17, Liu Sicong via R-sig-meta-analysis wrote:
Dear All, I have run into some difficulties when making a figure consisting of multiple funnel plots, while trying to minimize figure post-processing. It would be great to hear any suggestions for the questions below: * 1. How to specifically adjust the size of the axis text and tick labels? I hope to find an argument like ?size? in ggplot to achieve it. * 2. How to specifically increase the size of the funnel plot legend? * 3. Is there a way to create a composite figure in a way similar to ?ggarrange? in ggplot when having multiple funnel plots? Thank you in advance! Best regards, Sicong (Zone) [[alternative HTML version deleted]]
_______________________________________________ R-sig-meta-analysis mailing list @ R-sig-meta-analysis at r-project.org To manage your subscription to this mailing list, go to: https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis
Dear Michael,
My apologies for missing important details. I was using metofor and please see my current codes below for getting the composite figure:
jpeg("../figure/funnel.jpeg", width = 1600, height = 1920, units = "px", quality = 100)
par(mfrow=c(3,1))
metafor::funnel(rma(d, vi = dv_LOR2g, method = "REML", data = aggr_btwES_pt), xlab = "Effect Size (d)", level = c(90, 95, 99), shade=c("white", "gray55", "gray75"), legend = F, addtau2 = T, cex = 1, at = c(-5, 0, 5))
metafor::funnel(rma(d, vi = dv_LOR2g, method = "REML", data = aggr_btwES_hc), xlab = "Effect Size (d)", level = c(90, 95, 99), shade=c("white", "gray55", "gray75"), legend = F, addtau2 = T, cex = 1)
metafor::funnel(rma(d, vi = dv_LOR2g, method = "REML", data = aggr_btwES), xlab = "Effect Size (d)", level = c(90, 95, 99), shade=c("white", "gray55", "gray75"), legend = F, addtau2 = T, cex = 1)
dev.off()
Thank you!
Cheers,
Sicong (Zone)
-------------
From: Michael Dewey <lists at dewey.myzen.co.uk>
Date: Wednesday, September 6, 2023 at 12:04 PM
To: R Special Interest Group for Meta-Analysis <r-sig-meta-analysis at r-project.org>
Cc: Liu Sicong <64zone at gmail.com>
Subject: Re: [R-meta] increase axis text size in funnel plot
Dear Sicong
There are many, many packages on CRAN which generate forest plots, some
as standalone facilities and some as part of genral meta-analysis
software, so unless you give us more detail about which package you are
using and what happened when you tried we are unlikely to be able to be
of much help.
Michael
On 06/09/2023 16:17, Liu Sicong via R-sig-meta-analysis wrote:
Dear All,
I have run into some difficulties when making a figure consisting of multiple funnel plots, while trying to minimize figure post-processing. It would be great to hear any suggestions for the questions below:
* 1. How to specifically adjust the size of the axis text and tick labels? I hope to find an argument like ?size? in ggplot to achieve it.
* 2. How to specifically increase the size of the funnel plot legend?
* 3. Is there a way to create a composite figure in a way similar to ?ggarrange? in ggplot when having multiple funnel plots?
Thank you in advance!
Best regards,
Sicong (Zone)
[[alternative HTML version deleted]]
_______________________________________________ R-sig-meta-analysis mailing list @ R-sig-meta-analysis at r-project.org To manage your subscription to this mailing list, go to: https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis
-- Michael http://www.dewey.myzen.co.uk/home.html
1 day later
Dear Sicong, To adjust the size of the axis text and tick labels, use 'cex.axis' and 'cex.lab'. For example: dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg) res <- rma(yi, vi, data=dat) funnel(res) funnel(res, cex=2) funnel(res, cex=2, cex.axis=1.5, cex.lab=1.5) To adjust the legend size, you will need the development version of metafor: https://wviechtb.github.io/metafor/#installation Then the 'legend' argument allows more flexibility. For example: funnel(res, legend=TRUE) funnel(res, legend=list(cex=2)) 'cex' can even take on three different values, the first for the text, the second for the boxes, the third for the points. Like this: funnel(res, cex=2, legend=list(cex=c(2,3,1))) And to create 'composite figures', you can use: par(mfrow=c(2,2)) funnel(res) funnel(res, cex=2, cex.axis=1.5, cex.lab=1.5) funnel(res, legend=TRUE) funnel(res, cex=2, legend=list(cex=c(2,3,1))) Best, Wolfgang
-----Original Message-----
From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces at r-project.org] On
Behalf Of Liu Sicong via R-sig-meta-analysis
Sent: Wednesday, 06 September, 2023 18:09
To: Michael Dewey; R Special Interest Group for Meta-Analysis
Cc: Liu Sicong
Subject: Re: [R-meta] increase axis text size in funnel plot
Dear Michael,
My apologies for missing important details. I was using metofor and please see my
current codes below for getting the composite figure:
jpeg("../figure/funnel.jpeg", width = 1600, height = 1920, units = "px", quality
= 100)
par(mfrow=c(3,1))
metafor::funnel(rma(d, vi = dv_LOR2g, method = "REML", data = aggr_btwES_pt),
xlab = "Effect Size (d)", level = c(90, 95, 99), shade=c("white", "gray55",
"gray75"), legend = F, addtau2 = T, cex = 1, at = c(-5, 0, 5))
metafor::funnel(rma(d, vi = dv_LOR2g, method = "REML", data = aggr_btwES_hc),
xlab = "Effect Size (d)", level = c(90, 95, 99), shade=c("white", "gray55",
"gray75"), legend = F, addtau2 = T, cex = 1)
metafor::funnel(rma(d, vi = dv_LOR2g, method = "REML", data = aggr_btwES), xlab
= "Effect Size (d)", level = c(90, 95, 99), shade=c("white", "gray55", "gray75"),
legend = F, addtau2 = T, cex = 1)
dev.off()
Thank you!
Cheers,
Sicong (Zone)
-------------
From: Michael Dewey <lists at dewey.myzen.co.uk>
Date: Wednesday, September 6, 2023 at 12:04 PM
To: R Special Interest Group for Meta-Analysis <r-sig-meta-analysis at r-
project.org>
Cc: Liu Sicong <64zone at gmail.com>
Subject: Re: [R-meta] increase axis text size in funnel plot
Dear Sicong
There are many, many packages on CRAN which generate forest plots, some
as standalone facilities and some as part of genral meta-analysis
software, so unless you give us more detail about which package you are
using and what happened when you tried we are unlikely to be able to be
of much help.
Michael
On 06/09/2023 16:17, Liu Sicong via R-sig-meta-analysis wrote:
Dear All, I have run into some difficulties when making a figure consisting of multiple
funnel plots, while trying to minimize figure post-processing. It would be great to hear any suggestions for the questions below:
* 1. How to specifically adjust the size of the axis text and tick labels?
I hope to find an argument like ?size? in ggplot to achieve it.
* 2. How to specifically increase the size of the funnel plot legend? * 3. Is there a way to create a composite figure in a way similar to
?ggarrange? in ggplot when having multiple funnel plots?
Thank you in advance! Best regards, Sicong (Zone)