Hi: The following script:
> #!/usr/bin/env python from matplotlib.matlab import *
> figure(1) plot([0],[0]) show()
Thanks, Peter, for alerting me to this problem. I'm now adding this
script and several other instances of plotting constants in a variety
of guises to the unit testing scripts. I think the following fix will
work for you. Replace matplotlib.axes.Axes.add_line with
def add_line(self, l):
"Add a line to the list of plot lines"
self._set_artist_props(l)
xdata = l.get_xdata()
ydata = l.get_ydata()
if l.get_transform() != self.transData:
xys = self._get_verts_in_data_coords(
l.get_transform(), zip(xdata, ydata))
self.update_datalim(xys)
else:
# the data are already using the data coord system - no
# transforms necessary
minx, maxx = min(xdata), max(xdata)
miny, maxy = min(ydata), max(ydata)
if minx==maxx:
minx -= 1
maxx += 1
if miny==maxy:
miny -= 1
maxy += 1
corners = ( (minx, miny), (maxx, maxy) )
self.update_datalim(corners)
l.set_clip_box(self.bbox)
self._lines.append(l)
Passes my tests...
JDH