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
When the legend is wider than the plot, the legend.justification option in theme is ignored. Here's a quick example where legend.justification is left, but the legend is too long, and extends past the plot in both directions (getting cutoff).
In a single plot, having cut-off legends are problematic no matter which direction they go. When combining plots using patchwork (https://github.com/thomasp85/patchwork), changing the justification allows long legends to extend into the space of adjoining plots. For example, this allows guides to be manually combined across plots (apparently guide collection is now implemented in patchwork, but it wasn't present earlier.) It's also useful when the legend spacing differs from the plot spacing (small plot, large legend mixed with a larger plot with a smaller legend) - a situation I run into when use ggplot2 + patchwork to create heavily annotated heat maps.
The text was updated successfully, but these errors were encountered:
Issue:
When the legend is wider than the plot, the
legend.justification
option intheme
is ignored. Here's a quick example wherelegend.justification
is left, but the legend is too long, and extends past the plot in both directions (getting cutoff).Created on 2019-11-19 by the reprex package (v0.3.0)
Backstory
In a single plot, having cut-off legends are problematic no matter which direction they go. When combining plots using patchwork (https://github.com/thomasp85/patchwork), changing the justification allows long legends to extend into the space of adjoining plots. For example, this allows guides to be manually combined across plots (apparently guide collection is now implemented in patchwork, but it wasn't present earlier.) It's also useful when the legend spacing differs from the plot spacing (small plot, large legend mixed with a larger plot with a smaller legend) - a situation I run into when use ggplot2 + patchwork to create heavily annotated heat maps.
The text was updated successfully, but these errors were encountered: