I would like to plot grid objects and base R objects on the same png. The package I am using (meta) uses the grid graphics system.
I would like to use mfrow for this if possible, as it is what I am using elsewhere.
If I plot:
png("test.png",width=297,height=210,units="mm",res=300)
par(mfrow=c(2,2))
plot(1,1)
plot(1,1)
plot(1,1)
plot(1,1)
dev.off()
Everything works fine.
However if I plot:
library(meta)
m <- metaprop(4:1, c(10, 20, 30, 40))
png("test.png",width=297,height=210,units="mm",res=300)
par(mfrow=c(2,2))
plot(1,1)
forest(m,new=F)
plot(1,1)
forest(m,new=F)
dev.off()
Things aren't right as the forest plots try to take up the whole page rather than being restricted to their corners.
Thanks in advance for your help