Sometimes the legend simply gets in the way. You can't always guess
the correct placement (think generic tool which processes lots of
different input data sets), or zooming/panning makes it obscure a
chunk of the plot you want to look at. Is it possible to move it
interactively? I'm using mpl 1.3.1
I believe (as of v1.3.1) that after you create the legend you call
leg.draggable(True)
http://matplotlib.org/api/legend_api.html#matplotlib.legend.Legend.draggable
On Tue, Jan 7, 2014 at 6:37 AM, Skip Montanaro wrote:
> Sometimes the legend simply gets in the way. You can't always guess
> the
> I believe (as of v1.3.1) that after you create the legend you call
> leg.draggable(True)
> http://matplotlib.org/api/legend_api.html#matplotlib.legend.Legend.draggable
Outstanding! (Google was not my friend here. I wasn't searching for
"draggable.")
Skip
---
Le 07/01/2014 17:51, Paul Hobson a écrit :
> I believe (as of v1.3.1) that after you create the legend you call
> leg.draggable(True)
I had never heard of that nice possibility!
Would it make sense to add a few lines to the Legend Guide/Legend location ?
http://matplotlib.org/users/legend_guide.ht
>> I believe (as of v1.3.1) that after you create the legend you call
>> leg.draggable(True)
>>
http://matplotlib.org/api/legend_api.html#matplotlib.legend.Legend.draggable
>
> Outstanding! (Google was not my friend here. I wasn't searching for
> "draggable.")
It works if I only plot using the lef
>
> On that assumption, I tried changing the legend to be associated with the
> right Y axis:
>
> if a legend is requested:
> labels = [line.get_label() for line in lines]
> if I have right axis data to plot:
> right_plot.legend(lines, labels).draggable(True)
> else:
> l