Revision: 8177
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8177&view=rev
Author:   jdh2358
Date:     2010-03-03 21:33:35 +0000 (Wed, 03 Mar 2010)

Log Message:
-----------
fix hexbin bins=log bug

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/axes.py
    trunk/matplotlib/lib/matplotlib/ticker.py

Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py     2010-03-03 21:06:01 UTC (rev 
8176)
+++ trunk/matplotlib/lib/matplotlib/axes.py     2010-03-03 21:33:35 UTC (rev 
8177)
@@ -69,12 +69,12 @@
         except ValueError:
             return linestyle, marker, color         # Yes
         else:
-            if fmt != fmtint: 
-                # user definitely doesn't want tri_down marker 
+            if fmt != fmtint:
+                # user definitely doesn't want tri_down marker
                 return linestyle, marker, color     # Yes
             else:
                 # ignore converted color
-                color = None 
+                color = None
     except ValueError:
         pass                                        # No, not just a color.
 
@@ -5773,18 +5773,16 @@
             if (accum==0).any():
                 # make sure we have not zeros
                 accum += 1
-            
 
-        # Transform accum if needed
-        if bins=='log':
-            accum = np.log10(accum+1)
-
         # autoscale the norm with curren accum values if it hasn't
         # been set
         if norm is not None:
             if norm.vmin is None and norm.vmax is None:
                 norm.autoscale(accum)
-  
+
+        # Transform accum if needed
+        if bins=='log':
+            accum = np.log10(accum+1)
         elif bins!=None:
             if not iterable(bins):
                 minimum, maximum = min(accum), max(accum)

Modified: trunk/matplotlib/lib/matplotlib/ticker.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/ticker.py   2010-03-03 21:06:01 UTC (rev 
8176)
+++ trunk/matplotlib/lib/matplotlib/ticker.py   2010-03-03 21:33:35 UTC (rev 
8177)
@@ -542,9 +542,10 @@
         return self.fix_minus(s)
 
     def format_data(self, value):
+        b = self.labelOnlyBase
         self.labelOnlyBase = False
         value = cbook.strip_math(self.__call__(value))
-        self.labelOnlyBase = True
+        self.labelOnlyBase = b
         return value
 
     def format_data_short(self,value):


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

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to