Re: [Matplotlib-users] Limit legend to visible data

2011-01-30 Thread Peter Butterworth
with a slight correction from the code proposed by Justin, it works fine (tested on mpl 1.0.1). On Wed, Dec 1, 2010 at 11:58 AM, Justin McCann wrote: > Is there a straightforward way to limit the legend only to lines that > appear within the current display limits? I have a plot that has too > ma

Re: [Matplotlib-users] Limit legend to visible data

2010-12-03 Thread Goyo
2010/12/3 Justin McCann : > On Wed, Dec 1, 2010 at 11:58 AM, Justin McCann wrote: > This seems to do the trick, but might be a bit too clever. I'm not > sure if get_children() (or findobjs) is the right call to retrieve all > the plot elements. If you are just looking for line2D instances then us

Re: [Matplotlib-users] Limit legend to visible data

2010-12-03 Thread Justin McCann
On Wed, Dec 1, 2010 at 11:58 AM, Justin McCann wrote: > Is there a straightforward way to limit the legend only to lines that > appear within the current display limits? I have a plot that has too > many separate data series to show on the legend at once, but once I > zoom in it would be good to r

[Matplotlib-users] Limit legend to visible data

2010-12-01 Thread Justin McCann
Is there a straightforward way to limit the legend only to lines that appear within the current display limits? I have a plot that has too many separate data series to show on the legend at once, but once I zoom in it would be good to re-set the legend to show only the visible data points/lines. I