Possible Bug

Hello devels,

I chose to use matplotlib for a restaurant simulation. It supplied all the
features I needed and I was pleasantly surprised. However the people I was
doing this project for mentioned that the simulation slowed down to a crawl
10 or so minutes into the simulation. It sounded like a memory leak to me so
I investigated and found a 100 KB/sec leak in Windows (via the interpreter as
well as frozen with py2exe) as well as in Linux. I narrowed it down to a
part of the code where I updated xlim and ylim via Axes::set_xlim,
Axes::set_ylim. Commenting that part out yielded no leak, however I lost
some critical functionality in my charts (which behave like the Windows Task
Manager resource monitor graphs). So I really need this fixed. I will send
shortly a test case which replicates the problem.

Since the maintainer is out on vacation, I was also wondering if anyone knew
enough about the internals of matplotlib that they could give me an idea of
which modules (Python or otherwise) are affected by Axes::set_xlim and
Axes::set_ylim.

Joe

The legend() docs state:
  Make a legend with existing lines
   >>> legend()
   legend by itself will try and build a legend using the label
   property of the lines/patches/collections. You can set the label of
   a line by doing plot(x, y, label='my data') or line.set_label('my
   data'). If label is set to '_nolegend_', the item will not be shown
   in legend.

But trying to pass '_nolegend_' doesn't seem to work. And a grep through the code finds no instances of '_nolegend_'.

import pylab as p

x = p.arange( 0,3, .1 )
y1 = p.cos( x )
y2 = p.sin( x )
y3 = 2*p.sin( x )

p.plot( x, y1 )
p.plot( x, y2 )
p.plot( x, y3 )

p.legend( ( "cos(x)", "_nolegend_", "2*sin(x)" ) )

p.show()