Revision: 8382
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8382&view=rev
Author:   leejjoon
Date:     2010-06-05 18:31:52 +0000 (Sat, 05 Jun 2010)

Log Message:
-----------
mpl_toolkits.axisartist now skips ticklabels of empty string which have caused 
problem with some TeX installation

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/texmanager.py
    trunk/matplotlib/lib/mpl_toolkits/axisartist/axis_artist.py

Modified: trunk/matplotlib/lib/matplotlib/texmanager.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/texmanager.py       2010-06-05 04:19:10 UTC 
(rev 8381)
+++ trunk/matplotlib/lib/matplotlib/texmanager.py       2010-06-05 18:31:52 UTC 
(rev 8382)
@@ -577,6 +577,8 @@
         """
         return width, heigth and descent of the text.
         """
+        if tex.strip() == '':
+            return 0, 0, 0
 
         if renderer:
             dpi_fraction = renderer.points_to_pixels(1.)

Modified: trunk/matplotlib/lib/mpl_toolkits/axisartist/axis_artist.py
===================================================================
--- trunk/matplotlib/lib/mpl_toolkits/axisartist/axis_artist.py 2010-06-05 
04:19:10 UTC (rev 8381)
+++ trunk/matplotlib/lib/mpl_toolkits/axisartist/axis_artist.py 2010-06-05 
18:31:52 UTC (rev 8382)
@@ -769,6 +769,7 @@
         #self._set_offset_radius(r)
 
         for (x, y), a, l in self._locs_angles_labels:
+            if not l.strip(): continue
             self._set_ref_angle(a) #+ add_angle
             self.set_x(x)
             self.set_y(y)
@@ -811,6 +812,7 @@
         """
         whd_list = []
         for (x, y), a, l in self._locs_angles_labels:
+            if not l.strip(): continue
             clean_line, ismath = self.is_math_text(l)
             whd = renderer.get_text_width_height_descent(
                 clean_line, self._fontproperties, ismath=ismath)


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

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to