Revision: 8732
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8732&view=rev
Author:   efiring
Date:     2010-10-06 23:59:15 +0000 (Wed, 06 Oct 2010)

Log Message:
-----------
autoscale_view: respect tight kwarg even if only images are present.
slight modification of patch by Stan West.

Modified Paths:
--------------
    branches/v1_0_maint/lib/matplotlib/axes.py

Modified: branches/v1_0_maint/lib/matplotlib/axes.py
===================================================================
--- branches/v1_0_maint/lib/matplotlib/axes.py  2010-10-06 16:57:16 UTC (rev 
8731)
+++ branches/v1_0_maint/lib/matplotlib/axes.py  2010-10-06 23:59:15 UTC (rev 
8732)
@@ -1776,12 +1776,13 @@
         :meth:`matplotlib.axes.Axes.relim`
         prior to calling autoscale_view.
         """
-        if tight is not None:
-            self._tight = bool(tight)
-        # if image data only just use the datalim
-        _tight = self._tight or (len(self.images)>0 and
-                                 len(self.lines)==0 and
-                                 len(self.patches)==0)
+        if tight is None:
+            # if image data only just use the datalim
+            _tight = self._tight or (len(self.images)>0 and
+                                     len(self.lines)==0 and
+                                     len(self.patches)==0)
+        else:
+            _tight = self._tight = bool(tight)
 
         if scalex and self._autoscaleXon:
             xshared = self._shared_x_axes.get_siblings(self)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to