NightingaleHealth / ggforestplot

An R package to create forestplots of measures of effects with their confidence intervals.
MIT License
57 stars 12 forks source link

Legend positioning #2

Closed mattlee821 closed 4 years ago

mattlee821 commented 4 years ago

Hey! I'm having issues with the legend not fitting on the plot (attached screenshot). I've tried to look through the functions to figure out where you specify the exact positioning of the legend but can't figure it out to edit this myself- maybe it is defined by patchwork::wrap_plots....

This only seems to be an issue when wrapping multiple forestplots together (following this guide). I think this is an issue because the plot which I have as my bottom plot, the one in which the legend is positioned relative to, is smaller in height than the legend it self. In the attached screenshot i know there is a 'model1' label missing below the 'model2' label but this has been pushed off the plot.

If i increase the height of the plot when saving (pdf("plot.pdf", width = 8, height = 100) the issue is resolved. But if there were a way to adjust the legend positioning outside of the overall plot size that would be useful.

Screenshot 2020-04-06 at 16 13 18

mattlee821 commented 4 years ago

Given the new update on the vignette suggesting use of ggforce this can be closed as the legend is now central in plots.

mariakalimeri commented 4 years ago

Hey! Very sorry for not noticing this earlier (must have missed the email with the original opening of this issue). But good that this is now, indirectly, fixed!