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

Skip to content

Commit 8d783f1

Browse files
committed
applied Axes3DI.plot3d sf patch
svn path=/trunk/matplotlib/; revision=2841
1 parent 2e89e54 commit 8d783f1

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

lib/matplotlib/axes3d.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,18 +199,21 @@ def auto_scale_xyz(self, X,Y,Z=None,had_data=None):
199199
self.zz_dataLim.update_numerix(z, z, not had_data)
200200
self.autoscale_view()
201201

202-
def autoscale_view(self):
202+
def autoscale_view(self, scalex=True, scaley=True, scalez=True):
203203
self.set_top_view()
204204
if not self._ready: return
205205

206206
if not self._autoscaleon: return
207-
locator = self.w_xaxis.get_major_locator()
208-
#print 'auto', locator.autoscale()
209-
self.set_w_xlim(locator.autoscale())
210-
locator = self.w_yaxis.get_major_locator()
211-
self.set_w_ylim(locator.autoscale())
212-
locator = self.w_zaxis.get_major_locator()
213-
self.set_w_zlim(locator.autoscale())
207+
208+
if scalex:
209+
locator = self.w_xaxis.get_major_locator()
210+
self.set_w_xlim(locator.autoscale())
211+
if scaley:
212+
locator = self.w_yaxis.get_major_locator()
213+
self.set_w_ylim(locator.autoscale())
214+
if scalez:
215+
locator = self.w_zaxis.get_major_locator()
216+
self.set_w_zlim(locator.autoscale())
214217

215218
def get_w_lims(self):
216219
minx,maxx = self.get_w_xlim()

0 commit comments

Comments
 (0)