You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to manually decide the position of the legend(s).
In the case of collected guides, and with a defined design it will be very useful to be able to manually put the legend in a blank space btw figures.
Is there a way to position the collected guides inside the plot area of one panel? The following naive attempt did not work:
p1 + p2 +
inset_element(guide_area(), left = 0.6, bottom = 0.6, right = 1, top = 1) +
plot_layout(guides = "collect")
The way I was able to get the result I wanted was to set legend.position = "none" on the left panel and legend.position = c(.15, .9) on the right panel.
Activity
thomasp85 commentedon May 12, 2020
Have a look at
guide_area()🙂costavale commentedon May 12, 2020
Thank you! (....and what about the justification of the collected guides? thk)
thomasp85 commentedon May 12, 2020
These can be set in the patchwork theme
MokeEire commentedon Nov 23, 2020
Is there a way to position the collected guides inside the plot area of one panel? The following naive attempt did not work:
The way I was able to get the result I wanted was to set
legend.position = "none"on the left panel andlegend.position = c(.15, .9)on the right panel.jarbet commentedon Mar 26, 2026
I case anyone else is wondering,
guide_areacan also be used withwrap_plots: