Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0df7fc4

Browse files
committed
Use autoscale_view for contour plot autoscaling
svn path=/trunk/matplotlib/; revision=6412
1 parent 237b41f commit 0df7fc4

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/matplotlib/contour.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,7 @@ def __init__(self, ax, *args, **kwargs):
625625
y0 = ma.minimum(y)
626626
y1 = ma.maximum(y)
627627
self.ax.update_datalim([(x0,y0), (x1,y1)])
628-
self.ax.set_xlim((x0, x1))
629-
self.ax.set_ylim((y0, y1))
628+
self.ax.autoscale_view()
630629

631630
def changed(self):
632631
tcolors = [ (tuple(rgba),) for rgba in

0 commit comments

Comments
 (0)