wilkelab / cowplot

cowplot: Streamlined Plot Theme and Plot Annotations for ggplot2
https://wilkelab.org/cowplot/
701 stars 84 forks source link

[Feature request] Align legend with the start and end of the axis #181

Open sbcalaff opened 2 years ago

sbcalaff commented 2 years ago

I wonder if it would be possible to implement a feature that make it possible to align the legend with the start and end of the axis. For example, in the figure below the legend extends along the Y-axis, perfectly aligned with the start and end of the axis. This new feature can be extended to the sharing of a single legend by multiple plots.

image (Image taken from https://uk.mathworks.com/help/examples/graphics/win64/CreatingColorbarsFullEmbedExample_01.png)