In matplotlib 0.90.1 the behavior of legend() seems to have changed.
Here's a test code fragment:
···
---------------------------
import pylab
import numpy
y=numpy.arange(-10,10)**2
print y
pylab.plot(y)
pylab.legend()
pylab.show()
---------------------------
Running on python 2.5.1, matplotlib 0.90.0 gives me a reasonable-looking
legend in upper right corner with label "line0".
matplotlib 0.90.1 gives an empty rectangular box, fairly large, right in
the middle of the plot.
Attempting to move the legend with loc=2 or whatever has no effect.
However, giving an explicit label ( pylab.legend(['line1']) ) makes it
start working the same as 0.90.0.
I started looking at the source but don't have time today to understand
how this is supposed to work. Maybe later.
Is this the intended behavior? The announcement for 0.90.1 says:
"Display only meaningful labels when calling legend() without args."
It's not clear to me what this means.
--
Jonathan Griffitts
AnyWare Engineering Boulder, CO, USA