330 lines (263 with data), 24.4 kB
@header@
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="matplotlib.html"><font color="#ffffff">matplotlib</font></a>.<a href="matplotlib.backends.html"><font color="#ffffff">backends</font></a>.backend_svg</strong></big></big> (version 0.90.0)</font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/jdhunter/dev/lib/python2.5/site-packages/matplotlib/backends/backend_svg.py">/home/jdhunter/dev/lib/python2.5/site-packages/matplotlib/backends/backend_svg.py</a></font></td></tr></table>
<p></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="base64.html">base64</a><br>
</td><td width="25%" valign=top><a href="codecs.html">codecs</a><br>
</td><td width="25%" valign=top><a href="os.html">os</a><br>
</td><td width="25%" valign=top><a href="tempfile.html">tempfile</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#FigureCanvasBase">matplotlib.backend_bases.FigureCanvasBase</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.backends.backend_svg.html#FigureCanvasSVG">FigureCanvasSVG</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#FigureManagerBase">matplotlib.backend_bases.FigureManagerBase</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.backends.backend_svg.html#FigureManagerSVG">FigureManagerSVG</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.backends.backend_svg.html#FigureManagerSVG">FigureManagerSVG</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#RendererBase">matplotlib.backend_bases.RendererBase</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.backends.backend_svg.html#RendererSVG">RendererSVG</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="FigureCanvasSVG">class <strong>FigureCanvasSVG</strong></a>(<a href="matplotlib.backend_bases.html#FigureCanvasBase">matplotlib.backend_bases.FigureCanvasBase</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="FigureCanvasSVG-print_figure"><strong>print_figure</strong></a>(self, filename, dpi, facecolor<font color="#909090">='w'</font>, edgecolor<font color="#909090">='w'</font>, orientation<font color="#909090">='portrait'</font>, **kwargs)</dt></dl>
<hr>
Methods inherited from <a href="matplotlib.backend_bases.html#FigureCanvasBase">matplotlib.backend_bases.FigureCanvasBase</a>:<br>
<dl><dt><a name="FigureCanvasSVG-__init__"><strong>__init__</strong></a>(self, figure)</dt></dl>
<dl><dt><a name="FigureCanvasSVG-blit"><strong>blit</strong></a>(self, bbox<font color="#909090">=None</font>)</dt><dd><tt>blit the canvas in bbox (default entire canvas)</tt></dd></dl>
<dl><dt><a name="FigureCanvasSVG-button_press_event"><strong>button_press_event</strong></a>(self, x, y, button, guiEvent<font color="#909090">=None</font>)</dt><dd><tt>Backend derived classes should call this function on any mouse<br>
button press. x,y are the canvas coords: 0,0 is lower, left.<br>
button and key are as defined in MouseEvent</tt></dd></dl>
<dl><dt><a name="FigureCanvasSVG-button_release_event"><strong>button_release_event</strong></a>(self, x, y, button, guiEvent<font color="#909090">=None</font>)</dt><dd><tt>Backend derived classes should call this function on any mouse<br>
button release. x,y are the canvas coords: 0,0 is lower, left.<br>
button and key are as defined in MouseEvent</tt></dd></dl>
<dl><dt><a name="FigureCanvasSVG-draw"><strong>draw</strong></a>(self, *args, **kwargs)</dt><dd><tt>Render the figure</tt></dd></dl>
<dl><dt><a name="FigureCanvasSVG-draw_cursor"><strong>draw_cursor</strong></a>(self, event)</dt><dd><tt>Draw a cursor in the event.axes if inaxes is not None. Use<br>
native GUI drawing for efficiency if possible</tt></dd></dl>
<dl><dt><a name="FigureCanvasSVG-draw_event"><strong>draw_event</strong></a>(self, renderer)</dt></dl>
<dl><dt><a name="FigureCanvasSVG-draw_idle"><strong>draw_idle</strong></a>(self, *args, **kwargs)</dt><dd><tt>draw only if idle; defaults to draw but backends can overrride</tt></dd></dl>
<dl><dt><a name="FigureCanvasSVG-get_width_height"><strong>get_width_height</strong></a>(self)</dt><dd><tt>return the figure width and height in points or pixels<br>
(depending on the backend), truncated to integers</tt></dd></dl>
<dl><dt><a name="FigureCanvasSVG-key_press_event"><strong>key_press_event</strong></a>(self, key, guiEvent<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="FigureCanvasSVG-key_release_event"><strong>key_release_event</strong></a>(self, key, guiEvent<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="FigureCanvasSVG-motion_notify_event"><strong>motion_notify_event</strong></a>(self, x, y, guiEvent<font color="#909090">=None</font>)</dt><dd><tt>Backend derived classes should call this function on any<br>
motion-notify-event. x,y are the canvas coords: 0,0 is lower, left.<br>
button and key are as defined in MouseEvent</tt></dd></dl>
<dl><dt><a name="FigureCanvasSVG-mpl_connect"><strong>mpl_connect</strong></a>(self, s, func)</dt><dd><tt>Connect event with string s to func. The signature of func is<br>
<br>
def func(event)<br>
<br>
where event is a MplEvent. The following events are recognized<br>
<br>
'resize_event',<br>
'draw_event',<br>
'key_press_event',<br>
'key_release_event',<br>
'button_press_event',<br>
'button_release_event',<br>
'motion_notify_event',<br>
'pick_event', <br>
<br>
<br>
For the three events above, if the mouse is over the axes,<br>
the variable event.inaxes will be set to the axes it is over,<br>
and additionally, the variables event.xdata and event.ydata<br>
will be defined. This is the mouse location in data coords.<br>
See backend_bases.MplEvent.<br>
<br>
return value is a connection id that can be used with<br>
mpl_disconnect</tt></dd></dl>
<dl><dt><a name="FigureCanvasSVG-mpl_disconnect"><strong>mpl_disconnect</strong></a>(self, cid)</dt><dd><tt>disconnect callback id cid</tt></dd></dl>
<dl><dt><a name="FigureCanvasSVG-pick_event"><strong>pick_event</strong></a>(self, mouseevent, artist, **kwargs)</dt><dd><tt>This method will be called by artists who are picked and will<br>
fire off PickEvent callbacks registered listeners</tt></dd></dl>
<dl><dt><a name="FigureCanvasSVG-resize"><strong>resize</strong></a>(self, w, h)</dt><dd><tt>set the canvas size in pixels</tt></dd></dl>
<dl><dt><a name="FigureCanvasSVG-resize_event"><strong>resize_event</strong></a>(self)</dt></dl>
<dl><dt><a name="FigureCanvasSVG-switch_backends"><strong>switch_backends</strong></a>(self, FigureCanvasClass)</dt><dd><tt>instantiate an instance of FigureCanvasClass<br>
<br>
This is used for backend switching, eg, to instantiate a<br>
FigureCanvasPS from a FigureCanvasGTK. Note, deep copying is<br>
not done, so any changes to one of the instances (eg, setting<br>
figure size or line props), will be reflected in the other</tt></dd></dl>
<hr>
Data and other attributes inherited from <a href="matplotlib.backend_bases.html#FigureCanvasBase">matplotlib.backend_bases.FigureCanvasBase</a>:<br>
<dl><dt><strong>events</strong> = ('resize_event', 'draw_event', 'key_press_event', 'key_release_event', 'button_press_event', 'button_release_event', 'motion_notify_event', 'pick_event')</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><strong>FigureManager</strong> = <a name="FigureManager">class FigureManagerSVG</a>(<a href="matplotlib.backend_bases.html#FigureManagerBase">matplotlib.backend_bases.FigureManagerBase</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods inherited from <a href="matplotlib.backend_bases.html#FigureManagerBase">matplotlib.backend_bases.FigureManagerBase</a>:<br>
<dl><dt><a name="FigureManagerSVG-__init__"><strong>__init__</strong></a>(self, canvas, num)</dt></dl>
<dl><dt><a name="FigureManagerSVG-destroy"><strong>destroy</strong></a>(self)</dt></dl>
<dl><dt><a name="FigureManagerSVG-full_screen_toggle"><strong>full_screen_toggle</strong></a>(self)</dt></dl>
<dl><dt><a name="FigureManagerSVG-key_press"><strong>key_press</strong></a>(self, event)</dt></dl>
<dl><dt><a name="FigureManagerSVG-resize"><strong>resize</strong></a>(self, w, h)</dt><dd><tt>For gui backends: resize window in pixels</tt></dd></dl>
<dl><dt><a name="FigureManagerSVG-show_popup"><strong>show_popup</strong></a>(self, msg)</dt><dd><tt>Display message in a popup -- GUI only</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="FigureManagerSVG">class <strong>FigureManagerSVG</strong></a>(<a href="matplotlib.backend_bases.html#FigureManagerBase">matplotlib.backend_bases.FigureManagerBase</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods inherited from <a href="matplotlib.backend_bases.html#FigureManagerBase">matplotlib.backend_bases.FigureManagerBase</a>:<br>
<dl><dt><a name="FigureManagerSVG-__init__"><strong>__init__</strong></a>(self, canvas, num)</dt></dl>
<dl><dt><a name="FigureManagerSVG-destroy"><strong>destroy</strong></a>(self)</dt></dl>
<dl><dt><a name="FigureManagerSVG-full_screen_toggle"><strong>full_screen_toggle</strong></a>(self)</dt></dl>
<dl><dt><a name="FigureManagerSVG-key_press"><strong>key_press</strong></a>(self, event)</dt></dl>
<dl><dt><a name="FigureManagerSVG-resize"><strong>resize</strong></a>(self, w, h)</dt><dd><tt>For gui backends: resize window in pixels</tt></dd></dl>
<dl><dt><a name="FigureManagerSVG-show_popup"><strong>show_popup</strong></a>(self, msg)</dt><dd><tt>Display message in a popup -- GUI only</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="RendererSVG">class <strong>RendererSVG</strong></a>(<a href="matplotlib.backend_bases.html#RendererBase">matplotlib.backend_bases.RendererBase</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="RendererSVG-__init__"><strong>__init__</strong></a>(self, width, height, svgwriter, basename<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="RendererSVG-close_group"><strong>close_group</strong></a>(self, s)</dt></dl>
<dl><dt><a name="RendererSVG-draw_arc"><strong>draw_arc</strong></a>(self, gc, rgbFace, x, y, width, height, angle1, angle2, rotation)</dt><dd><tt>Ignores angles for now</tt></dd></dl>
<dl><dt><a name="RendererSVG-draw_image"><strong>draw_image</strong></a>(self, x, y, im, bbox)</dt></dl>
<dl><dt><a name="RendererSVG-draw_line"><strong>draw_line</strong></a>(self, gc, x1, y1, x2, y2)</dt></dl>
<dl><dt><a name="RendererSVG-draw_lines"><strong>draw_lines</strong></a>(self, gc, x, y, transform<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="RendererSVG-draw_point"><strong>draw_point</strong></a>(self, gc, x, y)</dt></dl>
<dl><dt><a name="RendererSVG-draw_polygon"><strong>draw_polygon</strong></a>(self, gc, rgbFace, points)</dt></dl>
<dl><dt><a name="RendererSVG-draw_rectangle"><strong>draw_rectangle</strong></a>(self, gc, rgbFace, x, y, width, height)</dt></dl>
<dl><dt><a name="RendererSVG-draw_text"><strong>draw_text</strong></a>(self, gc, x, y, s, prop, angle, ismath)</dt></dl>
<dl><dt><a name="RendererSVG-finish"><strong>finish</strong></a>(self)</dt></dl>
<dl><dt><a name="RendererSVG-flipy"><strong>flipy</strong></a>(self)</dt></dl>
<dl><dt><a name="RendererSVG-get_canvas_width_height"><strong>get_canvas_width_height</strong></a>(self)</dt></dl>
<dl><dt><a name="RendererSVG-get_text_width_height"><strong>get_text_width_height</strong></a>(self, s, prop, ismath)</dt></dl>
<dl><dt><a name="RendererSVG-open_group"><strong>open_group</strong></a>(self, s)</dt></dl>
<dl><dt><a name="RendererSVG-option_image_nocomposite"><strong>option_image_nocomposite</strong></a>(self)</dt><dd><tt>if svg.image_noscale is True, compositing multiple images into one is prohibited</tt></dd></dl>
<hr>
Methods inherited from <a href="matplotlib.backend_bases.html#RendererBase">matplotlib.backend_bases.RendererBase</a>:<br>
<dl><dt><a name="RendererSVG-draw_line_collection"><strong>draw_line_collection</strong></a>(self, segments, transform, clipbox, colors, linewidths, linestyle, antialiaseds, offsets, transOffset)</dt><dd><tt>This is a function for optimized line drawing. If you need to draw<br>
many line segments with similar properties, it is faster to avoid the<br>
overhead of all the object creation etc. The lack of total<br>
configurability is compensated for with efficiency. Hence we don't use<br>
a GC and many of the line props it supports. See<br>
matplotlib.collections for more details.<br>
<br>
segments is a sequence of ( line0, line1, line2), where linen =<br>
is an Mx2 array with columns x, y. Each line can be a<br>
different length<br>
<br>
transform is used to Transform the lines<br>
<br>
clipbox is a xmin, ymin, width, height clip rect<br>
<br>
colors is a tuple of RGBA tuples<br>
<br>
linewidths is a tuple of linewidths<br>
*** really should be called 'dashes' not 'linestyle', since<br>
we call gc.set_dashes() not gc.set_linestyle() ***<br>
<br>
linestyle is an (offset, onoffseq) tuple or None,None for solid<br>
<br>
antialiseds is a tuple of ones or zeros indicating whether the<br>
segment should be aa or not<br>
<br>
offsets, if not None, is an Nx2 array of x,y offsets to<br>
translate the lines by after transform is used to transform<br>
the offset coords<br>
<br>
This function could be overridden in the backend to possibly implement<br>
faster drawing, but it is already much faster than using <a href="#RendererSVG-draw_lines">draw_lines</a>()<br>
by itself.</tt></dd></dl>
<dl><dt><a name="RendererSVG-draw_poly_collection"><strong>draw_poly_collection</strong></a>(self, verts, transform, clipbox, facecolors, edgecolors, linewidths, antialiaseds, offsets, transOffset)</dt><dd><tt>Draw a polygon collection<br>
<br>
verts are a sequence of polygon vectors, where each polygon<br>
vector is a sequence of x,y tuples of vertices<br>
<br>
facecolors and edgecolors are a sequence of RGBA tuples<br>
linewidths are a sequence of linewidths<br>
antialiaseds are a sequence of 0,1 integers whether to use aa<br>
<br>
If a linewidth is zero or an edgecolor alpha is zero, the<br>
line will be omitted; similarly, the fill will be omitted<br>
if the facecolor alpha is zero.</tt></dd></dl>
<dl><dt><a name="RendererSVG-draw_quad_mesh"><strong>draw_quad_mesh</strong></a>(self, meshWidth, meshHeight, colors, xCoords, yCoords, clipbox, transform, offsets, transOffset, showedges)</dt><dd><tt>Draw a quadrilateral mesh<br>
See documentation in QuadMesh class in collections.py for details</tt></dd></dl>
<dl><dt><a name="RendererSVG-draw_regpoly_collection"><strong>draw_regpoly_collection</strong></a>(self, clipbox, offsets, transOffset, verts, sizes, facecolors, edgecolors, linewidths, antialiaseds)</dt><dd><tt>Draw a regular poly collection<br>
<br>
offsets - is a sequence is x,y tuples<br>
transOffset - maps this to display coords<br>
<br>
verts - are the vertices of the regular polygon at the origin<br>
<br>
sizes are the area of the circle that circumscribes the<br>
polygon in points^2<br>
<br>
facecolors and edgecolors are a sequence of RGBA tuples<br>
linewidths are a sequence of linewidths<br>
antialiaseds are a sequence of 0,1 integers whether to use aa</tt></dd></dl>
<dl><dt><a name="RendererSVG-draw_tex"><strong>draw_tex</strong></a>(self, gc, x, y, s, prop, angle, ismath<font color="#909090">='TeX!'</font>)</dt></dl>
<dl><dt><a name="RendererSVG-get_image_magnification"><strong>get_image_magnification</strong></a>(self)</dt><dd><tt>Get the factor by which to magnify images passed to draw_image.<br>
Allows a backend to have images at a different resolution to other<br>
artists.</tt></dd></dl>
<dl><dt><a name="RendererSVG-get_texmanager"><strong>get_texmanager</strong></a>(self)</dt></dl>
<dl><dt><a name="RendererSVG-get_text_extent"><strong>get_text_extent</strong></a>(self, text)</dt><dd><tt>Get the text extent in window coords</tt></dd></dl>
<dl><dt><a name="RendererSVG-new_gc"><strong>new_gc</strong></a>(self)</dt><dd><tt>Return an instance of a GraphicsContextBase</tt></dd></dl>
<dl><dt><a name="RendererSVG-points_to_pixels"><strong>points_to_pixels</strong></a>(self, points)</dt><dd><tt>Convert points to display units<br>
points - a float or a numerix array of float<br>
return points converted to pixels<br>
<br>
You need to override this function (unless your backend doesn't have a<br>
dpi, eg, postscript or svg).<br>
Some imaging systems assume some value for pixels per inch.<br>
points to pixels = points * pixels_per_inch/72.0 * dpi/72.0</tt></dd></dl>
<dl><dt><a name="RendererSVG-strip_math"><strong>strip_math</strong></a>(self, s)</dt></dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-FT2Font"><strong>FT2Font</strong></a>(...)</dt><dd><tt>FT2Font</tt></dd></dl>
<dl><dt><a name="-new_figure_manager"><strong>new_figure_manager</strong></a>(num, *args, **kwargs)</dt></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>__version__</strong> = '0.90.0'<br>
<strong>backend_version</strong> = '0.90.0'<br>
<strong>division</strong> = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)<br>
<strong>fontManager</strong> = <matplotlib.font_manager.FontManager instance at 0x85b6d4c><br>
<strong>math_parse_s_ft2font_svg</strong> = <matplotlib.mathtext.math_parse_s_ft2font_common instance at 0x8800fec><br>
<strong>rcParams</strong> = {'axes.axisbelow': False, 'axes.edgecolor': 'k', 'axes.facecolor': 'w', 'axes.formatter.limits': (-7, 7), 'axes.grid': False, 'axes.hold': True, 'axes.labelcolor': 'k', 'axes.labelsize': 12, 'axes.linewidth': 1.0, 'axes.titlesize': 14, ...}<br>
<strong>svgProlog</strong> = '<?xml version="1.0" standalone="no"?><font color="#c040c0">\n</font><!DOCTYPE ...3.org/1999/xlink"<font color="#c040c0">\n</font> version="1.1"<font color="#c040c0">\n</font> id="svg1"><font color="#c040c0">\n</font>'<br>
<strong>verbose</strong> = <matplotlib.Verbose instance at 0x82508ec></td></tr></table>
@footer@