From: <jd...@us...> - 2008-12-08 21:06:52
|
Revision: 6517 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6517&view=rev Author: jdh2358 Date: 2008-12-08 21:06:49 +0000 (Mon, 08 Dec 2008) Log Message: ----------- fixed inaxes event bug Modified Paths: -------------- trunk/matplotlib/doc/_templates/gallery.html trunk/matplotlib/doc/users/mathtext.rst trunk/matplotlib/lib/matplotlib/backend_bases.py trunk/matplotlib/lib/matplotlib/patches.py Modified: trunk/matplotlib/doc/_templates/gallery.html =================================================================== --- trunk/matplotlib/doc/_templates/gallery.html 2008-12-08 20:21:33 UTC (rev 6516) +++ trunk/matplotlib/doc/_templates/gallery.html 2008-12-08 21:06:49 UTC (rev 6517) @@ -53,6 +53,8 @@ <a href="examples/api/two_scales.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/two_scales.png" border="0" alt="two_scales"/></a> +<a href="examples/api/unicode_minus.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/unicode_minus.png" border="0" alt="unicode_minus"/></a> + <a href="examples/api/watermark_image.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/watermark_image.png" border="0" alt="watermark_image"/></a> <a href="examples/api/watermark_text.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/watermark_text.png" border="0" alt="watermark_text"/></a> @@ -217,8 +219,12 @@ <a href="examples/pylab_examples/errorbar_limits.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_limits_01.png" border="0" alt="errorbar_limits"/></a> +<a href="examples/pylab_examples/fancyarrow_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/fancyarrow_demo.png" border="0" alt="fancyarrow_demo"/></a> + <a href="examples/pylab_examples/fancybox_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/fancybox_demo.png" border="0" alt="fancybox_demo"/></a> +<a href="examples/pylab_examples/fancybox_demo2.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/fancybox_demo2.png" border="0" alt="fancybox_demo2"/></a> + <a href="examples/pylab_examples/fancytextbox_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/fancytextbox_demo.png" border="0" alt="fancytextbox_demo"/></a> <a href="examples/pylab_examples/figimage_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/figimage_demo.png" border="0" alt="figimage_demo"/></a> @@ -333,6 +339,8 @@ <a href="examples/pylab_examples/legend_demo2.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo2.png" border="0" alt="legend_demo2"/></a> +<a href="examples/pylab_examples/legend_demo3.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo3.png" border="0" alt="legend_demo3"/></a> + <a href="examples/pylab_examples/legend_scatter.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_scatter.png" border="0" alt="legend_scatter"/></a> <a href="examples/pylab_examples/line_collection.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/line_collection.png" border="0" alt="line_collection"/></a> Modified: trunk/matplotlib/doc/users/mathtext.rst =================================================================== --- trunk/matplotlib/doc/users/mathtext.rst 2008-12-08 20:21:33 UTC (rev 6516) +++ trunk/matplotlib/doc/users/mathtext.rst 2008-12-08 21:06:49 UTC (rev 6517) @@ -143,8 +143,16 @@ s(t) = \mathcal{A}\sin(2 \omega t) Here "s" and "t" are variable in italics font (default), "sin" is in -Roman font, and the amplitude "A" is in calligraphy font. +Roman font, and the amplitude "A" is in calligraphy font. Note in the +example above the caligraphy ``A`` is squished into the ``sin``. You +can use a spacing command to add a little whitespace between them:: + s(t) = \mathcal{A}\/\sin(2 \omega t) + +.. math:: + + s(t) = \mathcal{A}\/\sin(2 \omega t) + The choices available with all fonts are: ============================ ================================== @@ -159,7 +167,7 @@ .. role:: math-stix(math) :fontset: stix -When using the STIX fonts, you also have the choice of: +When using the `STIX <http://www.aip.org/stixfonts/>`_ fonts, you also have the choice of: ====================================== ========================================= Command Result Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-12-08 20:21:33 UTC (rev 6516) +++ trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-12-08 21:06:49 UTC (rev 6517) @@ -758,7 +758,7 @@ if x is None or y is None: # cannot check if event was in axes if no x,y info - self.inaxes = False + self.inaxes = None self._update_enter_leave() return Modified: trunk/matplotlib/lib/matplotlib/patches.py =================================================================== --- trunk/matplotlib/lib/matplotlib/patches.py 2008-12-08 20:21:33 UTC (rev 6516) +++ trunk/matplotlib/lib/matplotlib/patches.py 2008-12-08 21:06:49 UTC (rev 6517) @@ -1382,9 +1382,9 @@ for row in _table: for column, cell in zip(columns, row): column.append(cell) - - + + col_len = [max([len(cell) for cell in column]) for column in columns] lines = [] @@ -1394,10 +1394,10 @@ lines.append(table_formatstr) lines.append(pad + ' '.join([cell.ljust(cl) for cell, cl in zip(_table[0], col_len)])) lines.append(table_formatstr) - + lines.extend([(pad + ' '.join([cell.ljust(cl) for cell, cl in zip(row, col_len)])) for row in _table[1:]]) - + lines.append(table_formatstr) lines.append('') return "\n".join(lines) @@ -1427,10 +1427,10 @@ for argname, argdefault in zip(args[1:], defaults)] else: args = [] - + _table.append([cls.__name__, name, ",".join([("%s=%s" % (an, av)) for an, av in args])]) - + return _pprint_table(_table) @@ -1448,7 +1448,7 @@ # the "class" should have the _style_list attribute, which is # a dictionary of stylname, style class paie. - + _list = stylename.replace(" ","").split(",") _name = _list[0].lower() try: @@ -1492,20 +1492,20 @@ BoxStyle.Round(pad=0.2) - or + or BoxStyle("Round", pad=0.2) or - + BoxStyle("Round, pad=0.2") Following boxstyle classes are defined. - + %(AvailableBoxstyles)s An instance of any boxstyle class is an callable object, - whose call signature is + whose call signature is:: __call__(self, x0, y0, width, height, mutation_size, aspect_ratio=1.) @@ -1517,7 +1517,7 @@ the mutation. """ - + _style_list = {} @@ -1593,7 +1593,7 @@ *pad* amount of padding """ - + self.pad = pad super(BoxStyle.Square, self).__init__() @@ -1653,7 +1653,7 @@ dxx = dx*.5 # adjust x0. 1.4 <- sqrt(2) x0 = x0 + pad / 1.4 - + cp = [(x0+dxx, y0), (x1, y0), (x1, y1), (x0+dxx, y1), (x0+dxx, y1+dxx), (x0-dx, y0+dx), (x0+dxx, y0-dxx), # arrow (x0+dxx, y0), (x0+dxx, y0)] @@ -1687,7 +1687,7 @@ return p - + _style_list["rarrow"] = RArrow @@ -1770,7 +1770,7 @@ *rounding_size* rounding size of edges. *pad* if None """ - + self.pad = pad self.rounding_size = rounding_size super(BoxStyle.Round4, self).__init__() @@ -2038,8 +2038,8 @@ self._bbox_transmuter = boxstyle else: self._bbox_transmuter = BoxStyle(boxstyle, **kw) - + kwdoc = dict() kwdoc["AvailableBoxstyles"]=_pprint_styles(BoxStyle._style_list) kwdoc.update(artist.kwdocd) @@ -2180,12 +2180,12 @@ ConnectionStyle.Arc3(rad=0.2) - or + or ConnectionStyle("Arc3", rad=0.2) or - + ConnectionStyle("Arc3, rad=0.2") Following classes are defined @@ -2194,7 +2194,7 @@ An instance of any connection style class is an callable object, - whose call signature is + whose call signature is:: __call__(self, posA, posB, patchA=None, patchB=None, shrinkA=2., shrinkB=2.) @@ -2204,17 +2204,17 @@ (or end) from the boundary of the patch. The path is further shrinked by *shrinkA* (or *shrinkB*) which is given in points. """ - + _style_list = {} class _Base(object): """ A base class for connectionstyle classes. The dervided needs - to implement a *connect* methods whose call signature is + to implement a *connect* methods whose call signature is:: connect(posA, posB) - + where posA and posB are tuples of x, y coordinates to be connected. The methods needs to return a path connecting two points. This base class defines a __call__ method, and few @@ -2289,7 +2289,7 @@ Calls the *connect* method to create a path between *posA* and *posB*. The path is clipped and shrinked. """ - + path = self.connect(posA, posB) clipped_path = self._clip(path, patchA, patchB) @@ -2334,8 +2334,8 @@ return Path(vertices, codes) _style_list["arc3"] = Arc3 - + class Angle3(_Base): """ Creates a simple quadratic bezier curve between two @@ -2448,16 +2448,16 @@ def __init__(self, angleA=0, angleB=0, armA=None, armB=None, rad=0.): """ *angleA* : - starting angle of the path + starting angle of the path *angleB* : - ending angle of the path + ending angle of the path *armA* : - length of the starting arm + length of the starting arm *armB* : - length of the ending arm + length of the ending arm *rad* : rounding radius of the edges @@ -2531,9 +2531,9 @@ __doc__ = cbook.dedent(__doc__) % \ {"AvailableConnectorstyles": _pprint_styles(_style_list)} - + class ArrowStyle(_Style): """ :class:`ArrowStyle` is a container class which defines several @@ -2543,12 +2543,12 @@ A arrowstyle object can be either created as ArrowStyle.Fancy(head_length=.4, head_width=.4, tail_width=.4) - or + or ArrowStyle("Fancy", head_length=.4, head_width=.4, tail_width=.4) or - + ArrowStyle("Fancy, head_length=.4, head_width=.4, tail_width=.4") Following classes are defined @@ -2557,7 +2557,7 @@ An instance of any arrow style class is an callable object, - whose call signature is + whose call signature is:: __call__(self, path, mutation_size, linewidth, aspect_ratio=1.) @@ -2795,14 +2795,14 @@ class CurveA(_Curve): """ - An arrow with a head at its begin point. + An arrow with a head at its begin point. """ def __init__(self, head_length=.4, head_width=.2): """ *head_length* length of the arrow head - + *head_width* width of the arrow head """ @@ -2816,14 +2816,14 @@ class CurveB(_Curve): """ - An arrow with a head at its end point. + An arrow with a head at its end point. """ def __init__(self, head_length=.4, head_width=.2): """ *head_length* length of the arrow head - + *head_width* width of the arrow head """ @@ -2837,14 +2837,14 @@ class CurveAB(_Curve): """ - An arrow with heads both at the begin and the end point. + An arrow with heads both at the begin and the end point. """ def __init__(self, head_length=.4, head_width=.2): """ *head_length* length of the arrow head - + *head_width* width of the arrow head """ @@ -2859,7 +2859,7 @@ class _Bracket(_Base): def __init__(self, bracketA=None, bracketB=None, - widthA=1., widthB=1., + widthA=1., widthB=1., lengthA=0.2, lengthB=0.2, angleA=None, angleB=None, scaleA=None, scaleB=None @@ -2870,8 +2870,8 @@ self.angleA, self.angleB = angleA, angleB self.scaleA, self.scaleB= scaleA, scaleB - def _get_bracket(self, x0, y0, - cos_t, sin_t, width, length, + def _get_bracket(self, x0, y0, + cos_t, sin_t, width, length, ): # arrow from x0, y0 to x1, y1 @@ -2949,10 +2949,10 @@ """ *widthB* width of the bracket - + *lengthB* length of the bracket - + *angleB* angle between the bracket and the line """ @@ -2975,12 +2975,12 @@ *head_with* width of the arrow head - + *tail_width* width of the arrow tail """ - + self.head_length, self.head_width, self.tail_width = \ head_length, head_width, tail_width super(ArrowStyle.Simple, self).__init__() @@ -3043,7 +3043,7 @@ *head_with* width of the arrow head - + *tail_width* width of the arrow tail @@ -3140,7 +3140,7 @@ Wedge(?) shape. Only wokrs with a quadratic bezier curve. The begin point has a width of the tail_width and the end point has a width of 0. At the middle, the width is shrink_factor*tail_width. - + """ def __init__(self, tail_width=.3, shrink_factor=0.5): @@ -3151,7 +3151,7 @@ *shrink_factor* fraction of the arrow width at the middle point """ - + self.tail_width = tail_width self.shrink_factor = shrink_factor super(ArrowStyle.Wedge, self).__init__() @@ -3191,7 +3191,7 @@ A fancy arrow patch. It draws an arrow using the :class:ArrowStyle. """ - + def __str__(self): return self.__class__.__name__ \ + "FancyArrowPatch(%g,%g,%g,%g,%g,%g)" % tuple(self._q_bezier) @@ -3340,8 +3340,8 @@ self._connector = connectionstyle else: self._connector = ConnectionStyle(connectionstyle, **kw) - + def get_connectionstyle(self): """ Return the ConnectionStyle instance This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |