diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index fa6431d5c81b..90c14a172ea8 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -965,7 +965,7 @@ def hlines(self, y, xmin, xmax, colors='k', linestyles='solid', for thisxmin, thisxmax, thisy in zip(xmin, xmax, y)] coll = mcoll.LineCollection(verts, colors=colors, linestyles=linestyles, label=label) - self.add_collection(coll) + self.add_collection(coll, autolim=False) coll.update(kwargs) if len(y) > 0: @@ -1045,7 +1045,7 @@ def vlines(self, x, ymin, ymax, colors='k', linestyles='solid', #print 'creating line collection' coll = mcoll.LineCollection(verts, colors=colors, linestyles=linestyles, label=label) - self.add_collection(coll) + self.add_collection(coll, autolim=False) coll.update(kwargs) if len(x) > 0: @@ -1210,7 +1210,7 @@ def eventplot(self, positions, orientation='horizontal', lineoffsets=1, linewidth=linewidth, color=color, linestyle=linestyle) - self.add_collection(coll) + self.add_collection(coll, autolim=False) coll.update(kwargs) colls.append(coll) @@ -3937,7 +3937,7 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None, self.autoscale_view(tight=True) # add the collection last - self.add_collection(collection) + self.add_collection(collection, autolim=False) if not marginals: return collection @@ -3983,7 +3983,7 @@ def coarse_bin(x, y, coarse): hbar.set_norm(norm) hbar.set_alpha(alpha) hbar.update(kwargs) - self.add_collection(hbar) + self.add_collection(hbar, autolim=False) coarse = np.linspace(ymin, ymax, gridsize) ycoarse = coarse_bin(yorig, C, coarse) @@ -4011,7 +4011,7 @@ def coarse_bin(x, y, coarse): vbar.set_norm(norm) vbar.set_alpha(alpha) vbar.update(kwargs) - self.add_collection(vbar) + self.add_collection(vbar, autolim=False) collection.hbar = hbar collection.vbar = vbar @@ -4073,7 +4073,7 @@ def quiver(self, *args, **kw): self.cla() q = mquiver.Quiver(self, *args, **kw) - self.add_collection(q, True) + self.add_collection(q, autolim=True) self.autoscale_view() return q quiver.__doc__ = mquiver.Quiver.quiver_doc @@ -4113,7 +4113,7 @@ def barbs(self, *args, **kw): if not self._hold: self.cla() b = mquiver.Barbs(self, *args, **kw) - self.add_collection(b) + self.add_collection(b, autolim=True) self.autoscale_view() return b @@ -4301,9 +4301,10 @@ def get_interp_point(ind): XY2 = np.array([x[where], y2[where]]).T self.dataLim.update_from_data_xy(XY1, self.ignore_existing_data_limits, updatex=True, updatey=True) + self.ignore_existing_data_limits = False self.dataLim.update_from_data_xy(XY2, self.ignore_existing_data_limits, updatex=False, updatey=True) - self.add_collection(collection) + self.add_collection(collection, autolim=False) self.autoscale_view() return collection @@ -4408,10 +4409,10 @@ def fill_betweenx(self, y, x1, x2=0, where=None, **kwargs): X2Y = np.array([x2[where], y[where]]).T self.dataLim.update_from_data_xy(X1Y, self.ignore_existing_data_limits, updatex=True, updatey=True) - + self.ignore_existing_data_limits = False self.dataLim.update_from_data_xy(X2Y, self.ignore_existing_data_limits, - updatex=False, updatey=True) - self.add_collection(collection) + updatex=True, updatey=False) + self.add_collection(collection, autolim=False) self.autoscale_view() return collection @@ -4886,7 +4887,7 @@ def pcolor(self, *args, **kwargs): corners = (minx, miny), (maxx, maxy) self.update_datalim(corners) self.autoscale_view() - self.add_collection(collection) + self.add_collection(collection, autolim=False) return collection @docstring.dedent_interpd @@ -5032,7 +5033,7 @@ def pcolormesh(self, *args, **kwargs): corners = (minx, miny), (maxx, maxy) self.update_datalim(corners) self.autoscale_view() - self.add_collection(collection) + self.add_collection(collection, autolim=False) return collection @docstring.dedent_interpd @@ -5184,7 +5185,7 @@ def pcolorfast(self, *args, **kwargs): collection.set_array(C) collection.set_cmap(cmap) collection.set_norm(norm) - self.add_collection(collection) + self.add_collection(collection, autolim=False) xl, xr, yb, yt = X.min(), X.max(), Y.min(), Y.max() ret = collection diff --git a/lib/matplotlib/contour.py b/lib/matplotlib/contour.py index d12567c8ee27..abd19fec7b6e 100644 --- a/lib/matplotlib/contour.py +++ b/lib/matplotlib/contour.py @@ -939,7 +939,7 @@ def __init__(self, ax, *args, **kwargs): alpha=self.alpha, transform=self.get_transform(), zorder=zorder) - self.ax.add_collection(col) + self.ax.add_collection(col, autolim=False) self.collections.append(col) else: tlinewidths = self._process_linewidths() @@ -961,7 +961,7 @@ def __init__(self, ax, *args, **kwargs): transform=self.get_transform(), zorder=zorder) col.set_label('_nolegend_') - self.ax.add_collection(col, False) + self.ax.add_collection(col, autolim=False) self.collections.append(col) self.changed() # set the colors