Revision: 4912
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4912&view=rev
Author:   mdboom
Date:     2008-01-31 07:28:29 -0800 (Thu, 31 Jan 2008)

Log Message:
-----------
Merged revisions 4867-4911 via svnmerge from 
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint

........
  r4874 | jdh2358 | 2008-01-16 23:13:27 -0500 (Wed, 16 Jan 2008) | 1 line
  
  forced nonunicode fname for save in agg
........
  r4879 | mdboom | 2008-01-18 12:59:51 -0500 (Fri, 18 Jan 2008) | 2 lines
  
  Fix poly_editor.py
........
  r4882 | mdboom | 2008-01-21 14:03:48 -0500 (Mon, 21 Jan 2008) | 2 lines
  
  Fix bug with pie chart slices less than 2.5 degrees.
........
  r4896 | efiring | 2008-01-25 19:11:36 -0500 (Fri, 25 Jan 2008) | 2 lines
  
  Apply patch by Manuel Metz to scatter docstring.
........
  r4904 | jrevans | 2008-01-28 13:02:31 -0500 (Mon, 28 Jan 2008) | 4 lines
  
  Fixed a bug where plotting a singe point unitized errorbar data would
  fail.  Fixed a bug where plotting errorbar data where the error is a
  duration for a time valued axes would fail.
........
  r4907 | mdboom | 2008-01-29 15:24:58 -0500 (Tue, 29 Jan 2008) | 1 line
  
  Allow updating of shared axes when calling Axes.axis() (Thanks Jorgen 
Stenarson)
........
  r4911 | mdboom | 2008-01-31 10:21:10 -0500 (Thu, 31 Jan 2008) | 2 lines
  
  Fix \sqrt with a numeric radical.
........

Modified Paths:
--------------
    trunk/matplotlib/CHANGELOG
    trunk/matplotlib/examples/mathtext_examples.py
    trunk/matplotlib/lib/matplotlib/axes.py
    trunk/matplotlib/lib/matplotlib/mathtext.py

Property Changed:
----------------
    trunk/matplotlib/


Property changes on: trunk/matplotlib
___________________________________________________________________
Name: svnmerge-integrated
   - /branches/v0_91_maint:1-4866
   + /branches/v0_91_maint:1-4911

Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG  2008-01-31 15:21:10 UTC (rev 4911)
+++ trunk/matplotlib/CHANGELOG  2008-01-31 15:28:29 UTC (rev 4912)
@@ -1,3 +1,6 @@
+2008-01-31 Fix \sqrt with radical number (broken by making [ and ]
+           work below) - MGD
+
 2008-01-27 Applied  Martin Teichmann's patch to improve the Qt4
            backend. Uses Qt's builtin toolbars and statusbars.
            See bug 1828848 - DSD

Modified: trunk/matplotlib/examples/mathtext_examples.py
===================================================================
--- trunk/matplotlib/examples/mathtext_examples.py      2008-01-31 15:21:10 UTC 
(rev 4911)
+++ trunk/matplotlib/examples/mathtext_examples.py      2008-01-31 15:28:29 UTC 
(rev 4912)
@@ -40,7 +40,7 @@
     r"$f^'$",
     r'$\frac{x_2888}{y}$',
     r"$\sqrt[3]{\frac{X_2}{Y}}=5$",
-    r"$\sqrt[5x\pi]{\prod^\frac{x}{2\pi^2}_\infty}$",
+    r"$\sqrt[5]{\prod^\frac{x}{2\pi^2}_\infty}$",
     r"$\sqrt[3]{x}=5$",
     r'$\frac{X}{\frac{X}{Y}}$',
     # From UTR #25
@@ -56,7 +56,7 @@
 
 def doall():
     tests = stests
-    
+
     figure(figsize=(8, (len(tests) * 1) + 2))
     plot([0, 0], 'r')
     grid(False)
@@ -69,7 +69,7 @@
     savefig('mathtext_examples')
     #close('all')
     show()
-    
+
 if '--latex' in sys.argv:
     fd = open("mathtext_examples.ltx", "w")
     fd.write("\\documentclass{article}\n")

Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py     2008-01-31 15:21:10 UTC (rev 
4911)
+++ trunk/matplotlib/lib/matplotlib/axes.py     2008-01-31 15:28:29 UTC (rev 
4912)
@@ -2641,10 +2641,6 @@
         ymin = npy.asarray(ymin)
         ymax = npy.asarray(ymax)
 
-        if len(ymin)==1:
-            ymin = ymin*npy.ones(x.shape, x.dtype)
-        if len(ymax)==1:
-            ymax = ymax*npy.ones(x.shape, x.dtype)
 
         if len(ymin)!=len(x):
             raise ValueError, 'ymin and x are unequal sized sequences'
@@ -2661,12 +2657,17 @@
         self.add_collection(coll)
         coll.update(kwargs)
 
-        minx = x.min()
-        maxx = x.max()
-        miny = min(ymin.min(), ymax.min())
-        maxy = max(ymin.max(), ymax.max())
-        minx, maxx = self.convert_xunits((minx, maxx))
-        miny, maxy = self.convert_yunits((miny, maxy))
+        # We do the conversion first since not all unitized data is uniform
+        xx = self.convert_xunits( x )
+        yymin = self.convert_yunits( ymin )
+        yymax = self.convert_yunits( ymax )
+
+        minx = min( xx )
+        maxx = max( xx )
+
+        miny = min( min(yymin), min(yymax) )
+        maxy = max( max(yymin), max(yymax) )
+
         corners = (minx, miny), (maxx, maxy)
         self.update_datalim(corners)
         self.autoscale_view()
@@ -4165,6 +4166,18 @@
         Finally, marker can be (verts, 0), verts is a sequence of (x,y)
         vertices for a custom scatter symbol.
 
+            numsides is the number of sides
+
+            style is the style of the regular symbol:
+              0 : a regular polygon
+              1 : a star-like symbol
+              2 : an asterisk
+
+            angle is the angle of rotation of the symbol
+
+        Finally, marker can be (verts, 0), verts is a sequence of (x,y)
+        vertices for a custom scatter symbol.
+
         s is a size argument in points squared.
 
         Any or all of x, y, s, and c may be masked arrays, in which

Modified: trunk/matplotlib/lib/matplotlib/mathtext.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/mathtext.py 2008-01-31 15:21:10 UTC (rev 
4911)
+++ trunk/matplotlib/lib/matplotlib/mathtext.py 2008-01-31 15:28:29 UTC (rev 
4912)
@@ -2102,12 +2102,7 @@
                        Suppress(Literal(r"\sqrt"))
                      + Optional(
                          Suppress(Literal("["))
-                       + Group(
-                           OneOrMore(
-                             (c_over_c | symbol)
-                           ^ font
-                           )
-                         )
+                       + Regex("[0-9]+")
                        + Suppress(Literal("]")),
                          default = None
                        )
@@ -2595,11 +2590,7 @@
         if root is None:
             root = Box(0., 0., 0.)
         else:
-            if not isinstance(root, ParseResults):
-                raise ParseFatalException(
-                    "Can not parse root of radical. "
-                    "Only simple symbols are allowed in the root.")
-            root = Hlist(root.asList())
+            root = Hlist([Char(x, state) for x in root])
             root.shrink()
             root.shrink()
 


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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to