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
So far placement of legend using the loc argument is limited to the inside of the axis (e.g. right, center, upper left, etc). However, often the plotting area is cluttered with the data points, and it is desired to place the legend outside of the axis, as for example described in http://matplotlib.org/users/legend_guide.html#legend-location
It would be useful to have additional loc values for quick and intuitive placement of the legend outside of the axis:
I like this idea in principle, and it shouldn't be too difficult to
implement. The tricky part will be in making room outside the plot area.
Should the subplot area be shrunk or should the figure size be expanded? In
keeping with the current design of matplotlib, I would vote for shrinking
the subplot region, but that may not be desirable (especially with figures
that have aspect ratios set).
Ultimately, though, this idea is leaps and bounds better than the current
solution of trying to remember how to manually force it.
So far placement of legend using the loc argument is limited to the
inside of the axis (e.g. right, center, upper left, etc). However, often
the plotting area is cluttered with the data points, and it is desired to
place the legend outside of the axis, as for example described in http://matplotlib.org/users/legend_guide.html#legend-location
It would be useful to have additional loc values for quick and intuitive
placement of the legend outside of the axis:
plt.legend(loc='outside right center')
—
Reply to this email directly or view it on GitHub #3857.
Activity
WeatherGod commentedon Nov 28, 2014
I like this idea in principle, and it shouldn't be too difficult to
implement. The tricky part will be in making room outside the plot area.
Should the subplot area be shrunk or should the figure size be expanded? In
keeping with the current design of matplotlib, I would vote for shrinking
the subplot region, but that may not be desirable (especially with figures
that have aspect ratios set).
Ultimately, though, this idea is leaps and bounds better than the current
solution of trying to remember how to manually force it.
On Thu, Nov 27, 2014 at 7:54 AM, mrkrd notifications@github.com wrote:
tacaswell commentedon Nov 28, 2014
This still comes back to needing to get the constraint-engine working.
petehuang commentedon Dec 30, 2016
#6182 made some good progress but has stalled since then. PR welcome - it would address #3745 as well.
Recommend labeling with Difficulty: Easy?
isentropic commentedon Jun 13, 2022
I'd like this feature too, but there might be some aspect ratio problems / figure size problems, as now it complicated the layouting
jklymak commentedon Jun 13, 2022
See #19743. That got bogged down in the whole anchor dance, which is super flexible but actually a pain to deal with conceptually and algorithmically.
QuLogic commentedon May 4, 2023
I guess this is fixed by #19743.