[Matplotlib-users] Interative legend manipulation?

2014-01-07 Thread Skip Montanaro
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

Re: [Matplotlib-users] Interative legend manipulation?

2014-01-07 Thread Paul Hobson
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

Re: [Matplotlib-users] Interative legend manipulation?

2014-01-07 Thread Skip Montanaro
> 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 ---

Re: [Matplotlib-users] Interative legend manipulation?

2014-01-08 Thread Pierre Haessig
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

Re: [Matplotlib-users] Interative legend manipulation?

2014-01-09 Thread Skip Montanaro
>> 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

Re: [Matplotlib-users] Interative legend manipulation?

2014-01-09 Thread Skip Montanaro
> > 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