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 want to customise a figure legend by reversing the horizontal order of the symbols and labels. Example: change x data1 to data1 x. In Gnuplot, this is simply achieved by set key reverse.
In matplotlib, there seems to be no user-friendly solution, or no solution at all. I've found examples how to reverse the vertical order, but no means to move the symbols (handles) to the right of the labels.
As a low level solution, I thought about changing a kind of handle anchor or just shifting the handle's position, but couldn't even find an entry point for that.
The text was updated successfully, but these errors were encountered:
For reference, it looks like the handle/label order is set around L633 in ledgend.py when the items are shoved into the VPacker.
I don't think this will be too hard to add, but will require adding a kwarg to Legend.__init__, Figure.legend, Axes.legend, plt.legend, and plt.figlegend.
I want to customise a figure legend by reversing the horizontal order of the symbols and labels. Example: change
x data1
todata1 x
. In Gnuplot, this is simply achieved byset key reverse
.In matplotlib, there seems to be no user-friendly solution, or no solution at all. I've found examples how to reverse the vertical order, but no means to move the symbols (handles) to the right of the labels.
As a low level solution, I thought about changing a kind of handle anchor or just shifting the handle's position, but couldn't even find an entry point for that.
The text was updated successfully, but these errors were encountered: