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

Skip to content

Commit d12be91

Browse files
committed
Changed axis('scaled') behavior per Mark Bakker's request
svn path=/trunk/matplotlib/; revision=2972
1 parent a8a8910 commit d12be91

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/axes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ def apply_aspect(self, data_ratio = None):
762762
return
763763

764764

765-
l,b,w,h = self.get_position()
765+
l,b,w,h = self.get_position(original=True)
766766
box_aspect = fig_aspect * (h/w)
767767
data_ratio = box_aspect / A
768768
#print 'box_aspect, data_ratio, ysize/xsize', box_aspect, data_ratio, ysize/xsize
@@ -841,6 +841,7 @@ def axis(self, *v, **kwargs):
841841
self.set_aspect('equal', adjustable='datalim')
842842
elif s == 'scaled':
843843
self.set_aspect('equal', adjustable='box', anchor='C')
844+
self.set_autoscale_on(False) # Req. by Mark Bakker
844845
elif s=='tight':
845846
self.autoscale_view(tight=True)
846847
self.set_autoscale_on(False)

0 commit comments

Comments
 (0)