Menu

[r91]: / trunk / htdocs / matplotlib.backends.backend_template.html.template  Maximize  Restore  History

Download this file

567 lines (427 with data), 44.8 kB

@header@
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<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_template</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="/matplotlib/backends/backend_template.py">/matplotlib/backends/backend_template.py</a></font></td></tr></table>
    <p><tt>This&nbsp;is&nbsp;a&nbsp;fully&nbsp;functional&nbsp;do&nbsp;nothing&nbsp;backend&nbsp;to&nbsp;provide&nbsp;a&nbsp;template&nbsp;to<br>
backend&nbsp;writers.&nbsp;&nbsp;It&nbsp;is&nbsp;fully&nbsp;functional&nbsp;in&nbsp;that&nbsp;you&nbsp;can&nbsp;select&nbsp;it&nbsp;as<br>
a&nbsp;backend&nbsp;with<br>
&nbsp;<br>
&nbsp;&nbsp;import&nbsp;matplotlib<br>
&nbsp;&nbsp;matplotlib.use('Template')<br>
&nbsp;<br>
and&nbsp;your&nbsp;matplotlib&nbsp;scripts&nbsp;will&nbsp;(should!)&nbsp;run&nbsp;without&nbsp;error,&nbsp;though<br>
no&nbsp;output&nbsp;is&nbsp;produced.&nbsp;&nbsp;This&nbsp;provides&nbsp;a&nbsp;nice&nbsp;starting&nbsp;points&nbsp;for<br>
backend&nbsp;writers&nbsp;because&nbsp;you&nbsp;can&nbsp;selectively&nbsp;start&nbsp;implementing&nbsp;methods<br>
(draw_rectangle,&nbsp;draw_lines,&nbsp;etc...)&nbsp;and&nbsp;slowly&nbsp;see&nbsp;your&nbsp;figure&nbsp;come<br>
to&nbsp;life&nbsp;w/o&nbsp;having&nbsp;to&nbsp;have&nbsp;a&nbsp;full&nbsp;blown&nbsp;implementation&nbsp;before&nbsp;getting<br>
any&nbsp;results.<br>
&nbsp;<br>
Copy&nbsp;this&nbsp;to&nbsp;backend_xxx.py&nbsp;and&nbsp;replace&nbsp;all&nbsp;instances&nbsp;of&nbsp;'template'<br>
with&nbsp;'xxx'.&nbsp;&nbsp;Then&nbsp;implement&nbsp;the&nbsp;class&nbsp;methods&nbsp;and&nbsp;functions&nbsp;below,&nbsp;and<br>
add&nbsp;'xxx'&nbsp;to&nbsp;the&nbsp;switchyard&nbsp;in&nbsp;matplotlib/backends/__init__.py&nbsp;and<br>
'xxx'&nbsp;to&nbsp;the&nbsp;_knownBackends&nbsp;dict&nbsp;in&nbsp;matplotlib/__init__.py&nbsp;and&nbsp;you're<br>
off.&nbsp;&nbsp;You&nbsp;can&nbsp;use&nbsp;your&nbsp;backend&nbsp;with<br>
&nbsp;<br>
&nbsp;&nbsp;import&nbsp;matplotlib<br>
&nbsp;&nbsp;matplotlib.use('xxx')<br>
&nbsp;&nbsp;from&nbsp;matplotlib.matlab&nbsp;import&nbsp;*<br>
&nbsp;&nbsp;plot([1,2,3])<br>
&nbsp;&nbsp;<a href="#-show">show</a>()<br>
&nbsp;<br>
The&nbsp;files&nbsp;that&nbsp;are&nbsp;most&nbsp;relevant&nbsp;to&nbsp;backend_writers&nbsp;are<br>
&nbsp;<br>
&nbsp;&nbsp;matplotlib/backends/backend_your_backend.py<br>
&nbsp;&nbsp;matplotlib/backend_bases.py<br>
&nbsp;&nbsp;matplotlib/backends/__init__.py<br>
&nbsp;&nbsp;matplotlib/__init__.py<br>
&nbsp;&nbsp;matplotlib/_matlab_helpers.py<br>
&nbsp;&nbsp;<br>
Naming&nbsp;Conventions<br>
&nbsp;<br>
&nbsp;&nbsp;*&nbsp;classes&nbsp;MixedUpperCase<br>
&nbsp;<br>
&nbsp;&nbsp;*&nbsp;varables&nbsp;lowerUpper<br>
&nbsp;<br>
&nbsp;&nbsp;*&nbsp;functions&nbsp;underscore_separated<br>
&nbsp;<br>
REQUIREMENTS<br>
&nbsp;<br>
&nbsp;&nbsp;matplotlib&nbsp;requires&nbsp;python2.2&nbsp;and&nbsp;Numeric,&nbsp;and&nbsp;I&nbsp;don't&nbsp;yet&nbsp;want&nbsp;to<br>
&nbsp;&nbsp;make&nbsp;python2.3&nbsp;a&nbsp;requirement.&nbsp;&nbsp;I&nbsp;provide&nbsp;the&nbsp;Python&nbsp;Cookbook&nbsp;version<br>
&nbsp;&nbsp;of&nbsp;enumerate&nbsp;in&nbsp;cbook.py&nbsp;and&nbsp;define&nbsp;the&nbsp;constants&nbsp;True&nbsp;and&nbsp;False&nbsp;if<br>
&nbsp;&nbsp;version&nbsp;&lt;=2.3.&nbsp;&nbsp;Of&nbsp;course&nbsp;as&nbsp;a&nbsp;backend&nbsp;writer,&nbsp;you&nbsp;are&nbsp;free&nbsp;to&nbsp;make<br>
&nbsp;&nbsp;additional&nbsp;requirements,&nbsp;but&nbsp;the&nbsp;less&nbsp;required&nbsp;the&nbsp;better.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="sys.html">sys</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></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>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#AxisTextBase">matplotlib.backend_bases.AxisTextBase</a>(<a href="matplotlib.artist.html#Artist">matplotlib.artist.Artist</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.backends.backend_template.html#AxisTextTemplate">AxisTextTemplate</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.backends.backend_template.html#AxisTextTemplate">AxisTextTemplate</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#FigureBase">matplotlib.backend_bases.FigureBase</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.backends.backend_template.html#FigureTemplate">FigureTemplate</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.backends.backend_template.html#FigureTemplate">FigureTemplate</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_template.html#FigureManagerTemplate">FigureManagerTemplate</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.backends.backend_template.html#FigureManagerTemplate">FigureManagerTemplate</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#GraphicsContextBase">matplotlib.backend_bases.GraphicsContextBase</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.backends.backend_template.html#GraphicsContextTemplate">GraphicsContextTemplate</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_template.html#RendererTemplate">RendererTemplate</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>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><strong>AxisText</strong> = <a name="AxisText">class AxisTextTemplate</a>(<a href="matplotlib.backend_bases.html#AxisTextBase">matplotlib.backend_bases.AxisTextBase</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Handle&nbsp;storing&nbsp;and&nbsp;drawing&nbsp;of&nbsp;text<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="matplotlib.backends.backend_template.html#AxisTextTemplate">AxisTextTemplate</a></dd>
<dd><a href="matplotlib.backend_bases.html#AxisTextBase">matplotlib.backend_bases.AxisTextBase</a></dd>
<dd><a href="matplotlib.artist.html#Artist">matplotlib.artist.Artist</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="AxisTextTemplate-__init__"><strong>__init__</strong></a>(self, *args, **kwargs)</dt></dl>

<dl><dt><a name="AxisTextTemplate-get_window_extent"><strong>get_window_extent</strong></a>(self)</dt><dd><tt>Return&nbsp;the&nbsp;ink&nbsp;extent&nbsp;of&nbsp;the&nbsp;text&nbsp;as&nbsp;Bound2D&nbsp;instance</tt></dd></dl>

<hr>
Methods inherited from <a href="matplotlib.backend_bases.html#AxisTextBase">matplotlib.backend_bases.AxisTextBase</a>:<br>
<dl><dt><a name="AxisTextTemplate-__del__"><strong>__del__</strong></a>(self)</dt><dd><tt>Bye&nbsp;bye</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-erase"><strong>erase</strong></a>(self)</dt></dl>

<dl><dt><a name="AxisTextTemplate-get_fontangle"><strong>get_fontangle</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;font&nbsp;angle&nbsp;as&nbsp;string</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-get_fontname"><strong>get_fontname</strong></a>(self)</dt><dd><tt>Return&nbsp;the&nbsp;font&nbsp;name&nbsp;as&nbsp;string</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-get_fontsize"><strong>get_fontsize</strong></a>(self)</dt><dd><tt>Return&nbsp;the&nbsp;font&nbsp;size&nbsp;as&nbsp;integer</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-get_fontweight"><strong>get_fontweight</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;font&nbsp;weight&nbsp;as&nbsp;string</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-get_horizontalalignment"><strong>get_horizontalalignment</strong></a>(self)</dt><dd><tt>Return&nbsp;the&nbsp;horizontal&nbsp;alignment&nbsp;as&nbsp;string</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-get_position"><strong>get_position</strong></a>(self)</dt><dd><tt>Return&nbsp;x,&nbsp;y&nbsp;as&nbsp;tuple</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-get_text"><strong>get_text</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;text&nbsp;as&nbsp;string</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-get_verticalalignment"><strong>get_verticalalignment</strong></a>(self)</dt><dd><tt>Return&nbsp;the&nbsp;vertical&nbsp;alignment&nbsp;as&nbsp;string</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_backgroundcolor"><strong>set_backgroundcolor</strong></a>(self, color)</dt><dd><tt>Set&nbsp;the&nbsp;background&nbsp;color&nbsp;of&nbsp;the&nbsp;text</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_color"><strong>set_color</strong></a>(self, color)</dt><dd><tt>Set&nbsp;the&nbsp;foreground&nbsp;color&nbsp;of&nbsp;the&nbsp;text</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_fontangle"><strong>set_fontangle</strong></a>(self, angle)</dt><dd><tt>Set&nbsp;the&nbsp;font&nbsp;angle,&nbsp;one&nbsp;of&nbsp;'normal',&nbsp;'italic',&nbsp;'oblique'</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_fontname"><strong>set_fontname</strong></a>(self, fontname)</dt><dd><tt>Set&nbsp;the&nbsp;font&nbsp;name,&nbsp;eg,&nbsp;'Sans',&nbsp;'Courier',&nbsp;'Helvetica'</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_fontsize"><strong>set_fontsize</strong></a>(self, fontsize)</dt><dd><tt>Set&nbsp;the&nbsp;font&nbsp;size,&nbsp;eg,&nbsp;8,&nbsp;10,&nbsp;12,&nbsp;14...</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_fontweight"><strong>set_fontweight</strong></a>(self, weight)</dt><dd><tt>Set&nbsp;the&nbsp;font&nbsp;weight,&nbsp;one&nbsp;of:<br>
'normal',&nbsp;'bold',&nbsp;'heavy',&nbsp;'light',&nbsp;'ultrabold',&nbsp;&nbsp;'ultralight'</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_horizontalalignment"><strong>set_horizontalalignment</strong></a>(self, align)</dt><dd><tt>Set&nbsp;the&nbsp;horizontal&nbsp;alignment&nbsp;to&nbsp;one&nbsp;of<br>
'center',&nbsp;'right',&nbsp;or&nbsp;'left'</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_position"><strong>set_position</strong></a>(self, xy)</dt></dl>

<dl><dt><a name="AxisTextTemplate-set_rotation"><strong>set_rotation</strong></a>(self, s)</dt><dd><tt>Currently&nbsp;only&nbsp;s='vertical',&nbsp;or&nbsp;s='horizontal'&nbsp;are&nbsp;supported</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_text"><strong>set_text</strong></a>(self, text)</dt><dd><tt>Set&nbsp;the&nbsp;text</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_verticalalignment"><strong>set_verticalalignment</strong></a>(self, align)</dt><dd><tt>Set&nbsp;the&nbsp;vertical&nbsp;alignment&nbsp;to&nbsp;one&nbsp;of<br>
'center',&nbsp;'top',&nbsp;or&nbsp;'bottom'</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_x"><strong>set_x</strong></a>(self, x)</dt></dl>

<dl><dt><a name="AxisTextTemplate-set_y"><strong>set_y</strong></a>(self, y)</dt></dl>

<dl><dt><a name="AxisTextTemplate-update_properties"><strong>update_properties</strong></a>(self, d)</dt><dd><tt>Update&nbsp;the&nbsp;font&nbsp;attributes&nbsp;with&nbsp;the&nbsp;dictionary&nbsp;in&nbsp;d</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-wash_brushes"><strong>wash_brushes</strong></a>(self)</dt><dd><tt>Flush&nbsp;all&nbsp;state&nbsp;vars&nbsp;and&nbsp;prepare&nbsp;for&nbsp;a&nbsp;clean&nbsp;redraw</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="matplotlib.backend_bases.html#AxisTextBase">matplotlib.backend_bases.AxisTextBase</a>:<br>
<dl><dt><strong>fontangles</strong> = {'italic': None, 'normal': None, 'oblique': None}</dl>

<dl><dt><strong>fontweights</strong> = {'bold': None, 'heavy': None, 'light': None, 'normal': None, 'ultrabold': None, 'ultralight': None}</dl>

<hr>
Methods inherited from <a href="matplotlib.artist.html#Artist">matplotlib.artist.Artist</a>:<br>
<dl><dt><a name="AxisTextTemplate-draw"><strong>draw</strong></a>(self, drawable<font color="#909090">=None</font>, *args, **kwargs)</dt><dd><tt>Derived&nbsp;classes&nbsp;drawing&nbsp;method</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-get_child_artists"><strong>get_child_artists</strong></a>(self)</dt><dd><tt>Return&nbsp;all&nbsp;artists&nbsp;contained&nbsp;in&nbsp;self</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-get_dpi"><strong>get_dpi</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;DPI&nbsp;of&nbsp;the&nbsp;display</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_child_attr"><strong>set_child_attr</strong></a>(self, attr, val)</dt><dd><tt>Set&nbsp;attribute&nbsp;attr&nbsp;for&nbsp;self,&nbsp;and&nbsp;all&nbsp;child&nbsp;artists</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_clip_on"><strong>set_clip_on</strong></a>(self, b)</dt><dd><tt>Set&nbsp;whether&nbsp;artist&nbsp;is&nbsp;clipped&nbsp;to&nbsp;bbox</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_lod"><strong>set_lod</strong></a>(self, on)</dt><dd><tt>Set&nbsp;Level&nbsp;of&nbsp;Detail&nbsp;on&nbsp;or&nbsp;off.&nbsp;&nbsp;If&nbsp;on,&nbsp;the&nbsp;artists&nbsp;may&nbsp;examine<br>
things&nbsp;like&nbsp;the&nbsp;pixel&nbsp;width&nbsp;of&nbsp;the&nbsp;axes&nbsp;and&nbsp;draw&nbsp;a&nbsp;subset&nbsp;of<br>
their&nbsp;contents&nbsp;accordingly</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_renderer"><strong>set_renderer</strong></a>(self, renderer)</dt><dd><tt>Set&nbsp;the&nbsp;renderer</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_transform"><strong>set_transform</strong></a>(self, transform)</dt><dd><tt>Set&nbsp;the&nbsp;artist&nbsp;transform&nbsp;for&nbsp;self&nbsp;and&nbsp;all&nbsp;children</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="matplotlib.artist.html#Artist">matplotlib.artist.Artist</a>:<br>
<dl><dt><strong>aname</strong> = 'Artist'</dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="AxisTextTemplate">class <strong>AxisTextTemplate</strong></a>(<a href="matplotlib.backend_bases.html#AxisTextBase">matplotlib.backend_bases.AxisTextBase</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Handle&nbsp;storing&nbsp;and&nbsp;drawing&nbsp;of&nbsp;text<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="matplotlib.backends.backend_template.html#AxisTextTemplate">AxisTextTemplate</a></dd>
<dd><a href="matplotlib.backend_bases.html#AxisTextBase">matplotlib.backend_bases.AxisTextBase</a></dd>
<dd><a href="matplotlib.artist.html#Artist">matplotlib.artist.Artist</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="AxisTextTemplate-__init__"><strong>__init__</strong></a>(self, *args, **kwargs)</dt></dl>

<dl><dt><a name="AxisTextTemplate-get_window_extent"><strong>get_window_extent</strong></a>(self)</dt><dd><tt>Return&nbsp;the&nbsp;ink&nbsp;extent&nbsp;of&nbsp;the&nbsp;text&nbsp;as&nbsp;Bound2D&nbsp;instance</tt></dd></dl>

<hr>
Methods inherited from <a href="matplotlib.backend_bases.html#AxisTextBase">matplotlib.backend_bases.AxisTextBase</a>:<br>
<dl><dt><a name="AxisTextTemplate-__del__"><strong>__del__</strong></a>(self)</dt><dd><tt>Bye&nbsp;bye</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-erase"><strong>erase</strong></a>(self)</dt></dl>

<dl><dt><a name="AxisTextTemplate-get_fontangle"><strong>get_fontangle</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;font&nbsp;angle&nbsp;as&nbsp;string</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-get_fontname"><strong>get_fontname</strong></a>(self)</dt><dd><tt>Return&nbsp;the&nbsp;font&nbsp;name&nbsp;as&nbsp;string</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-get_fontsize"><strong>get_fontsize</strong></a>(self)</dt><dd><tt>Return&nbsp;the&nbsp;font&nbsp;size&nbsp;as&nbsp;integer</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-get_fontweight"><strong>get_fontweight</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;font&nbsp;weight&nbsp;as&nbsp;string</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-get_horizontalalignment"><strong>get_horizontalalignment</strong></a>(self)</dt><dd><tt>Return&nbsp;the&nbsp;horizontal&nbsp;alignment&nbsp;as&nbsp;string</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-get_position"><strong>get_position</strong></a>(self)</dt><dd><tt>Return&nbsp;x,&nbsp;y&nbsp;as&nbsp;tuple</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-get_text"><strong>get_text</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;text&nbsp;as&nbsp;string</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-get_verticalalignment"><strong>get_verticalalignment</strong></a>(self)</dt><dd><tt>Return&nbsp;the&nbsp;vertical&nbsp;alignment&nbsp;as&nbsp;string</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_backgroundcolor"><strong>set_backgroundcolor</strong></a>(self, color)</dt><dd><tt>Set&nbsp;the&nbsp;background&nbsp;color&nbsp;of&nbsp;the&nbsp;text</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_color"><strong>set_color</strong></a>(self, color)</dt><dd><tt>Set&nbsp;the&nbsp;foreground&nbsp;color&nbsp;of&nbsp;the&nbsp;text</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_fontangle"><strong>set_fontangle</strong></a>(self, angle)</dt><dd><tt>Set&nbsp;the&nbsp;font&nbsp;angle,&nbsp;one&nbsp;of&nbsp;'normal',&nbsp;'italic',&nbsp;'oblique'</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_fontname"><strong>set_fontname</strong></a>(self, fontname)</dt><dd><tt>Set&nbsp;the&nbsp;font&nbsp;name,&nbsp;eg,&nbsp;'Sans',&nbsp;'Courier',&nbsp;'Helvetica'</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_fontsize"><strong>set_fontsize</strong></a>(self, fontsize)</dt><dd><tt>Set&nbsp;the&nbsp;font&nbsp;size,&nbsp;eg,&nbsp;8,&nbsp;10,&nbsp;12,&nbsp;14...</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_fontweight"><strong>set_fontweight</strong></a>(self, weight)</dt><dd><tt>Set&nbsp;the&nbsp;font&nbsp;weight,&nbsp;one&nbsp;of:<br>
'normal',&nbsp;'bold',&nbsp;'heavy',&nbsp;'light',&nbsp;'ultrabold',&nbsp;&nbsp;'ultralight'</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_horizontalalignment"><strong>set_horizontalalignment</strong></a>(self, align)</dt><dd><tt>Set&nbsp;the&nbsp;horizontal&nbsp;alignment&nbsp;to&nbsp;one&nbsp;of<br>
'center',&nbsp;'right',&nbsp;or&nbsp;'left'</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_position"><strong>set_position</strong></a>(self, xy)</dt></dl>

<dl><dt><a name="AxisTextTemplate-set_rotation"><strong>set_rotation</strong></a>(self, s)</dt><dd><tt>Currently&nbsp;only&nbsp;s='vertical',&nbsp;or&nbsp;s='horizontal'&nbsp;are&nbsp;supported</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_text"><strong>set_text</strong></a>(self, text)</dt><dd><tt>Set&nbsp;the&nbsp;text</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_verticalalignment"><strong>set_verticalalignment</strong></a>(self, align)</dt><dd><tt>Set&nbsp;the&nbsp;vertical&nbsp;alignment&nbsp;to&nbsp;one&nbsp;of<br>
'center',&nbsp;'top',&nbsp;or&nbsp;'bottom'</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_x"><strong>set_x</strong></a>(self, x)</dt></dl>

<dl><dt><a name="AxisTextTemplate-set_y"><strong>set_y</strong></a>(self, y)</dt></dl>

<dl><dt><a name="AxisTextTemplate-update_properties"><strong>update_properties</strong></a>(self, d)</dt><dd><tt>Update&nbsp;the&nbsp;font&nbsp;attributes&nbsp;with&nbsp;the&nbsp;dictionary&nbsp;in&nbsp;d</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-wash_brushes"><strong>wash_brushes</strong></a>(self)</dt><dd><tt>Flush&nbsp;all&nbsp;state&nbsp;vars&nbsp;and&nbsp;prepare&nbsp;for&nbsp;a&nbsp;clean&nbsp;redraw</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="matplotlib.backend_bases.html#AxisTextBase">matplotlib.backend_bases.AxisTextBase</a>:<br>
<dl><dt><strong>fontangles</strong> = {'italic': None, 'normal': None, 'oblique': None}</dl>

<dl><dt><strong>fontweights</strong> = {'bold': None, 'heavy': None, 'light': None, 'normal': None, 'ultrabold': None, 'ultralight': None}</dl>

<hr>
Methods inherited from <a href="matplotlib.artist.html#Artist">matplotlib.artist.Artist</a>:<br>
<dl><dt><a name="AxisTextTemplate-draw"><strong>draw</strong></a>(self, drawable<font color="#909090">=None</font>, *args, **kwargs)</dt><dd><tt>Derived&nbsp;classes&nbsp;drawing&nbsp;method</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-get_child_artists"><strong>get_child_artists</strong></a>(self)</dt><dd><tt>Return&nbsp;all&nbsp;artists&nbsp;contained&nbsp;in&nbsp;self</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-get_dpi"><strong>get_dpi</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;DPI&nbsp;of&nbsp;the&nbsp;display</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_child_attr"><strong>set_child_attr</strong></a>(self, attr, val)</dt><dd><tt>Set&nbsp;attribute&nbsp;attr&nbsp;for&nbsp;self,&nbsp;and&nbsp;all&nbsp;child&nbsp;artists</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_clip_on"><strong>set_clip_on</strong></a>(self, b)</dt><dd><tt>Set&nbsp;whether&nbsp;artist&nbsp;is&nbsp;clipped&nbsp;to&nbsp;bbox</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_lod"><strong>set_lod</strong></a>(self, on)</dt><dd><tt>Set&nbsp;Level&nbsp;of&nbsp;Detail&nbsp;on&nbsp;or&nbsp;off.&nbsp;&nbsp;If&nbsp;on,&nbsp;the&nbsp;artists&nbsp;may&nbsp;examine<br>
things&nbsp;like&nbsp;the&nbsp;pixel&nbsp;width&nbsp;of&nbsp;the&nbsp;axes&nbsp;and&nbsp;draw&nbsp;a&nbsp;subset&nbsp;of<br>
their&nbsp;contents&nbsp;accordingly</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_renderer"><strong>set_renderer</strong></a>(self, renderer)</dt><dd><tt>Set&nbsp;the&nbsp;renderer</tt></dd></dl>

<dl><dt><a name="AxisTextTemplate-set_transform"><strong>set_transform</strong></a>(self, transform)</dt><dd><tt>Set&nbsp;the&nbsp;artist&nbsp;transform&nbsp;for&nbsp;self&nbsp;and&nbsp;all&nbsp;children</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="matplotlib.artist.html#Artist">matplotlib.artist.Artist</a>:<br>
<dl><dt><strong>aname</strong> = 'Artist'</dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><strong>Figure</strong> = <a name="Figure">class FigureTemplate</a>(<a href="matplotlib.backend_bases.html#FigureBase">matplotlib.backend_bases.FigureBase</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>The&nbsp;figure&nbsp;is&nbsp;the&nbsp;main&nbsp;object&nbsp;--&nbsp;it&nbsp;contains&nbsp;the&nbsp;Axes&nbsp;and&nbsp;Text,<br>
which&nbsp;in&nbsp;turn&nbsp;contain&nbsp;lines,&nbsp;patches,&nbsp;and&nbsp;more&nbsp;text<br>
&nbsp;<br>
GUI&nbsp;implementers&nbsp;will&nbsp;probably&nbsp;want&nbsp;to&nbsp;look&nbsp;at&nbsp;FigureGTK&nbsp;in<br>
backend_gtk.py&nbsp;for&nbsp;examples&nbsp;of&nbsp;handling&nbsp;events&nbsp;with&nbsp;respect&nbsp;to<br>
matplotlib.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="FigureTemplate-__init__"><strong>__init__</strong></a>(self, figsize, dpi)</dt></dl>

<dl><dt><a name="FigureTemplate-draw"><strong>draw</strong></a>(self, drawable<font color="#909090">=None</font>, *args, **kwargs)</dt><dd><tt>Render&nbsp;the&nbsp;figure&nbsp;using&nbsp;<a href="#RendererTemplate">RendererTemplate</a>&nbsp;instance&nbsp;drawable</tt></dd></dl>

<dl><dt><a name="FigureTemplate-print_figure"><strong>print_figure</strong></a>(self, filename, dpi<font color="#909090">=300</font>)</dt><dd><tt>Render&nbsp;the&nbsp;figure&nbsp;to&nbsp;hardcopy&nbsp;using&nbsp;self.<strong>drawable</strong>&nbsp;as&nbsp;the<br>
renderer&nbsp;if&nbsp;neccessary</tt></dd></dl>

<dl><dt><a name="FigureTemplate-realize"><strong>realize</strong></a>(self, *args)</dt><dd><tt>This&nbsp;method&nbsp;will&nbsp;be&nbsp;called&nbsp;when&nbsp;the&nbsp;system&nbsp;is&nbsp;ready&nbsp;to&nbsp;draw,<br>
eg&nbsp;when&nbsp;a&nbsp;GUI&nbsp;window&nbsp;is&nbsp;realized</tt></dd></dl>

<dl><dt><a name="FigureTemplate-text"><strong>text</strong></a>(self, x, y, s, *args, **kwargs)</dt><dd><tt>Add&nbsp;text&nbsp;to&nbsp;figure&nbsp;at&nbsp;location&nbsp;x,y&nbsp;(relative&nbsp;0-1&nbsp;coords)&nbsp;See<br>
the&nbsp;help&nbsp;for&nbsp;Axis&nbsp;text&nbsp;for&nbsp;the&nbsp;meaning&nbsp;of&nbsp;the&nbsp;other&nbsp;arguments</tt></dd></dl>

<hr>
Methods inherited from <a href="matplotlib.backend_bases.html#FigureBase">matplotlib.backend_bases.FigureBase</a>:<br>
<dl><dt><a name="FigureTemplate-add_axis"><strong>add_axis</strong></a>(self, a)</dt></dl>

<dl><dt><a name="FigureTemplate-clear"><strong>clear</strong></a>(self)</dt></dl>

<dl><dt><a name="FigureTemplate-get_axes"><strong>get_axes</strong></a>(self)</dt></dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><strong>FigureManager</strong> = <a name="FigureManager">class FigureManagerTemplate</a>(<a href="matplotlib.backend_bases.html#FigureManagerBase">matplotlib.backend_bases.FigureManagerBase</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>GUIs&nbsp;need&nbsp;to&nbsp;override<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods inherited from <a href="matplotlib.backend_bases.html#FigureManagerBase">matplotlib.backend_bases.FigureManagerBase</a>:<br>
<dl><dt><a name="FigureManagerTemplate-__init__"><strong>__init__</strong></a>(self, figure, num)</dt></dl>

<dl><dt><a name="FigureManagerTemplate-add_axes"><strong>add_axes</strong></a>(self, rect, axisbg)</dt><dd><tt>Add&nbsp;an&nbsp;axes&nbsp;to&nbsp;the&nbsp;current&nbsp;figure</tt></dd></dl>

<dl><dt><a name="FigureManagerTemplate-add_subplot"><strong>add_subplot</strong></a>(self, *args, **kwargs)</dt><dd><tt>Add&nbsp;a&nbsp;subplot&nbsp;to&nbsp;the&nbsp;current&nbsp;figure</tt></dd></dl>

<dl><dt><a name="FigureManagerTemplate-destroy"><strong>destroy</strong></a>(self)</dt></dl>

<dl><dt><a name="FigureManagerTemplate-get_current_axis"><strong>get_current_axis</strong></a>(self)</dt><dd><tt>Return&nbsp;the&nbsp;current&nbsp;axes</tt></dd></dl>

<dl><dt><a name="FigureManagerTemplate-set_current_axes"><strong>set_current_axes</strong></a>(self, a)</dt><dd><tt>Set&nbsp;the&nbsp;current&nbsp;axes&nbsp;to&nbsp;be&nbsp;a</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>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="FigureManagerTemplate">class <strong>FigureManagerTemplate</strong></a>(<a href="matplotlib.backend_bases.html#FigureManagerBase">matplotlib.backend_bases.FigureManagerBase</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>GUIs&nbsp;need&nbsp;to&nbsp;override<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods inherited from <a href="matplotlib.backend_bases.html#FigureManagerBase">matplotlib.backend_bases.FigureManagerBase</a>:<br>
<dl><dt><a name="FigureManagerTemplate-__init__"><strong>__init__</strong></a>(self, figure, num)</dt></dl>

<dl><dt><a name="FigureManagerTemplate-add_axes"><strong>add_axes</strong></a>(self, rect, axisbg)</dt><dd><tt>Add&nbsp;an&nbsp;axes&nbsp;to&nbsp;the&nbsp;current&nbsp;figure</tt></dd></dl>

<dl><dt><a name="FigureManagerTemplate-add_subplot"><strong>add_subplot</strong></a>(self, *args, **kwargs)</dt><dd><tt>Add&nbsp;a&nbsp;subplot&nbsp;to&nbsp;the&nbsp;current&nbsp;figure</tt></dd></dl>

<dl><dt><a name="FigureManagerTemplate-destroy"><strong>destroy</strong></a>(self)</dt></dl>

<dl><dt><a name="FigureManagerTemplate-get_current_axis"><strong>get_current_axis</strong></a>(self)</dt><dd><tt>Return&nbsp;the&nbsp;current&nbsp;axes</tt></dd></dl>

<dl><dt><a name="FigureManagerTemplate-set_current_axes"><strong>set_current_axes</strong></a>(self, a)</dt><dd><tt>Set&nbsp;the&nbsp;current&nbsp;axes&nbsp;to&nbsp;be&nbsp;a</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>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="FigureTemplate">class <strong>FigureTemplate</strong></a>(<a href="matplotlib.backend_bases.html#FigureBase">matplotlib.backend_bases.FigureBase</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>The&nbsp;figure&nbsp;is&nbsp;the&nbsp;main&nbsp;object&nbsp;--&nbsp;it&nbsp;contains&nbsp;the&nbsp;Axes&nbsp;and&nbsp;Text,<br>
which&nbsp;in&nbsp;turn&nbsp;contain&nbsp;lines,&nbsp;patches,&nbsp;and&nbsp;more&nbsp;text<br>
&nbsp;<br>
GUI&nbsp;implementers&nbsp;will&nbsp;probably&nbsp;want&nbsp;to&nbsp;look&nbsp;at&nbsp;FigureGTK&nbsp;in<br>
backend_gtk.py&nbsp;for&nbsp;examples&nbsp;of&nbsp;handling&nbsp;events&nbsp;with&nbsp;respect&nbsp;to<br>
matplotlib.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="FigureTemplate-__init__"><strong>__init__</strong></a>(self, figsize, dpi)</dt></dl>

<dl><dt><a name="FigureTemplate-draw"><strong>draw</strong></a>(self, drawable<font color="#909090">=None</font>, *args, **kwargs)</dt><dd><tt>Render&nbsp;the&nbsp;figure&nbsp;using&nbsp;<a href="#RendererTemplate">RendererTemplate</a>&nbsp;instance&nbsp;drawable</tt></dd></dl>

<dl><dt><a name="FigureTemplate-print_figure"><strong>print_figure</strong></a>(self, filename, dpi<font color="#909090">=300</font>)</dt><dd><tt>Render&nbsp;the&nbsp;figure&nbsp;to&nbsp;hardcopy&nbsp;using&nbsp;self.<strong>drawable</strong>&nbsp;as&nbsp;the<br>
renderer&nbsp;if&nbsp;neccessary</tt></dd></dl>

<dl><dt><a name="FigureTemplate-realize"><strong>realize</strong></a>(self, *args)</dt><dd><tt>This&nbsp;method&nbsp;will&nbsp;be&nbsp;called&nbsp;when&nbsp;the&nbsp;system&nbsp;is&nbsp;ready&nbsp;to&nbsp;draw,<br>
eg&nbsp;when&nbsp;a&nbsp;GUI&nbsp;window&nbsp;is&nbsp;realized</tt></dd></dl>

<dl><dt><a name="FigureTemplate-text"><strong>text</strong></a>(self, x, y, s, *args, **kwargs)</dt><dd><tt>Add&nbsp;text&nbsp;to&nbsp;figure&nbsp;at&nbsp;location&nbsp;x,y&nbsp;(relative&nbsp;0-1&nbsp;coords)&nbsp;See<br>
the&nbsp;help&nbsp;for&nbsp;Axis&nbsp;text&nbsp;for&nbsp;the&nbsp;meaning&nbsp;of&nbsp;the&nbsp;other&nbsp;arguments</tt></dd></dl>

<hr>
Methods inherited from <a href="matplotlib.backend_bases.html#FigureBase">matplotlib.backend_bases.FigureBase</a>:<br>
<dl><dt><a name="FigureTemplate-add_axis"><strong>add_axis</strong></a>(self, a)</dt></dl>

<dl><dt><a name="FigureTemplate-clear"><strong>clear</strong></a>(self)</dt></dl>

<dl><dt><a name="FigureTemplate-get_axes"><strong>get_axes</strong></a>(self)</dt></dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="GraphicsContextTemplate">class <strong>GraphicsContextTemplate</strong></a>(<a href="matplotlib.backend_bases.html#GraphicsContextBase">matplotlib.backend_bases.GraphicsContextBase</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>The&nbsp;graphics&nbsp;context&nbsp;provides&nbsp;the&nbsp;color,&nbsp;line&nbsp;styles,&nbsp;etc...&nbsp;&nbsp;See<br>
the&nbsp;gtk&nbsp;and&nbsp;postscript&nbsp;backends&nbsp;for&nbsp;examples&nbsp;of&nbsp;mapping&nbsp;the<br>
graphics&nbsp;context&nbsp;attributes&nbsp;(cap&nbsp;styles,&nbsp;join&nbsp;styles,&nbsp;line&nbsp;widths,<br>
colors)&nbsp;to&nbsp;a&nbsp;particular&nbsp;backend.&nbsp;&nbsp;In&nbsp;GTK&nbsp;this&nbsp;is&nbsp;done&nbsp;by&nbsp;wrapping<br>
a&nbsp;gtk.gdk.GC&nbsp;object&nbsp;and&nbsp;forwarding&nbsp;the&nbsp;appropriate&nbsp;calls&nbsp;to&nbsp;it<br>
using&nbsp;a&nbsp;dictionary&nbsp;mapping&nbsp;styles&nbsp;to&nbsp;gdk&nbsp;constants.&nbsp;&nbsp;In<br>
Postscript,&nbsp;all&nbsp;the&nbsp;work&nbsp;is&nbsp;done&nbsp;by&nbsp;the&nbsp;renderer,&nbsp;mapping&nbsp;line<br>
styles&nbsp;to&nbsp;postscript&nbsp;calls.<br>
&nbsp;<br>
The&nbsp;base&nbsp;GraphicsContext&nbsp;stores&nbsp;colors&nbsp;as&nbsp;a&nbsp;RGB&nbsp;tuple&nbsp;on&nbsp;the&nbsp;unit<br>
interval,&nbsp;eg,&nbsp;(0.5,&nbsp;0.0,&nbsp;1.0).&nbsp;&nbsp;You&nbsp;will&nbsp;probably&nbsp;need&nbsp;to&nbsp;map&nbsp;this<br>
to&nbsp;colors&nbsp;appropriate&nbsp;for&nbsp;your&nbsp;backend.&nbsp;&nbsp;Eg,&nbsp;see&nbsp;the&nbsp;ColorManager<br>
class&nbsp;for&nbsp;the&nbsp;GTK&nbsp;backend.&nbsp;&nbsp;If&nbsp;it's&nbsp;more&nbsp;appropriate&nbsp;to&nbsp;do&nbsp;the<br>
mapping&nbsp;at&nbsp;the&nbsp;renderer&nbsp;level&nbsp;(as&nbsp;in&nbsp;the&nbsp;postscript&nbsp;backend),&nbsp;you<br>
don't&nbsp;need&nbsp;to&nbsp;override&nbsp;any&nbsp;of&nbsp;the&nbsp;GC&nbsp;methods.&nbsp;&nbsp;If&nbsp;it's&nbsp;more<br>
approritate&nbsp;to&nbsp;wrap&nbsp;an&nbsp;instance&nbsp;(as&nbsp;in&nbsp;the&nbsp;GTK&nbsp;backend)&nbsp;and&nbsp;do&nbsp;the<br>
mapping&nbsp;here,&nbsp;you'll&nbsp;need&nbsp;to&nbsp;override&nbsp;several&nbsp;of&nbsp;the&nbsp;setter<br>
methods.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods inherited from <a href="matplotlib.backend_bases.html#GraphicsContextBase">matplotlib.backend_bases.GraphicsContextBase</a>:<br>
<dl><dt><a name="GraphicsContextTemplate-__init__"><strong>__init__</strong></a>(self)</dt></dl>

<dl><dt><a name="GraphicsContextTemplate-copy_properties"><strong>copy_properties</strong></a>(self, gc)</dt><dd><tt>Copy&nbsp;properties&nbsp;from&nbsp;gc&nbsp;to&nbsp;self</tt></dd></dl>

<dl><dt><a name="GraphicsContextTemplate-get_capstyle"><strong>get_capstyle</strong></a>(self)</dt><dd><tt>Return&nbsp;the&nbsp;capstyle&nbsp;as&nbsp;a&nbsp;string&nbsp;in&nbsp;('butt',&nbsp;'round',&nbsp;'projecting')</tt></dd></dl>

<dl><dt><a name="GraphicsContextTemplate-get_clip_rectangle"><strong>get_clip_rectangle</strong></a>(self)</dt><dd><tt>Return&nbsp;the&nbsp;clip&nbsp;rectangle&nbsp;as&nbsp;(left,&nbsp;bottom,&nbsp;width,&nbsp;height)</tt></dd></dl>

<dl><dt><a name="GraphicsContextTemplate-get_dashes"><strong>get_dashes</strong></a>(self)</dt><dd><tt>Return&nbsp;the&nbsp;dash&nbsp;information&nbsp;as&nbsp;an&nbsp;offset&nbsp;dashlist&nbsp;tuple&nbsp;The<br>
dash&nbsp;list&nbsp;is&nbsp;a&nbsp;even&nbsp;size&nbsp;list&nbsp;that&nbsp;gives&nbsp;the&nbsp;ink&nbsp;on,&nbsp;ink&nbsp;off<br>
in&nbsp;pixels.&nbsp;&nbsp;See&nbsp;p107&nbsp;of&nbsp;to&nbsp;postscript&nbsp;BLUEBOOK&nbsp;for&nbsp;more&nbsp;info<br>
&nbsp;<br>
Default&nbsp;value&nbsp;is&nbsp;None</tt></dd></dl>

<dl><dt><a name="GraphicsContextTemplate-get_joinstyle"><strong>get_joinstyle</strong></a>(self)</dt><dd><tt>Return&nbsp;the&nbsp;line&nbsp;join&nbsp;style&nbsp;as&nbsp;one&nbsp;of&nbsp;('miter',&nbsp;'round',&nbsp;'bevel')</tt></dd></dl>

<dl><dt><a name="GraphicsContextTemplate-get_linestyle"><strong>get_linestyle</strong></a>(self, style)</dt><dd><tt>Return&nbsp;the&nbsp;linestyle:&nbsp;one&nbsp;of&nbsp;('solid',&nbsp;'dashed',&nbsp;'dashdot',<br>
'dotted').</tt></dd></dl>

<dl><dt><a name="GraphicsContextTemplate-get_linewidth"><strong>get_linewidth</strong></a>(self)</dt><dd><tt>Return&nbsp;the&nbsp;line&nbsp;width&nbsp;in&nbsp;points&nbsp;as&nbsp;a&nbsp;scalar</tt></dd></dl>

<dl><dt><a name="GraphicsContextTemplate-get_rgb"><strong>get_rgb</strong></a>(self)</dt><dd><tt>returns&nbsp;a&nbsp;tuple&nbsp;of&nbsp;three&nbsp;floats&nbsp;from&nbsp;0-1.&nbsp;&nbsp;color&nbsp;can&nbsp;be&nbsp;a<br>
matlab&nbsp;format&nbsp;string,&nbsp;a&nbsp;html&nbsp;hex&nbsp;color&nbsp;string,&nbsp;or&nbsp;a&nbsp;rgb&nbsp;tuple</tt></dd></dl>

<dl><dt><a name="GraphicsContextTemplate-set_capstyle"><strong>set_capstyle</strong></a>(self, cs)</dt><dd><tt>Set&nbsp;the&nbsp;capstyle&nbsp;as&nbsp;a&nbsp;string&nbsp;in&nbsp;('butt',&nbsp;'round',&nbsp;'projecting')</tt></dd></dl>

<dl><dt><a name="GraphicsContextTemplate-set_clip_rectangle"><strong>set_clip_rectangle</strong></a>(self, rectangle)</dt><dd><tt>Set&nbsp;the&nbsp;clip&nbsp;rectangle&nbsp;with&nbsp;sequence&nbsp;(left,&nbsp;bottom,&nbsp;width,&nbsp;height)</tt></dd></dl>

<dl><dt><a name="GraphicsContextTemplate-set_dashes"><strong>set_dashes</strong></a>(self, dash_offset, dash_list)</dt><dd><tt>Set&nbsp;the&nbsp;dash&nbsp;style&nbsp;for&nbsp;the&nbsp;gc.&nbsp;&nbsp;dash&nbsp;offset&nbsp;is&nbsp;the&nbsp;offset<br>
(usually&nbsp;0).&nbsp;&nbsp;Dash&nbsp;list&nbsp;specifies&nbsp;the&nbsp;on-off&nbsp;sequence&nbsp;as<br>
points</tt></dd></dl>

<dl><dt><a name="GraphicsContextTemplate-set_foreground"><strong>set_foreground</strong></a>(self, fg)</dt><dd><tt>Set&nbsp;the&nbsp;foreground&nbsp;color.&nbsp;&nbsp;fg&nbsp;can&nbsp;be&nbsp;a&nbsp;matlab&nbsp;format&nbsp;string,&nbsp;a<br>
html&nbsp;hex&nbsp;color&nbsp;string,&nbsp;an&nbsp;rgb&nbsp;unit&nbsp;tuple,&nbsp;or&nbsp;a&nbsp;float&nbsp;between&nbsp;0<br>
and&nbsp;1.&nbsp;&nbsp;In&nbsp;the&nbsp;latter&nbsp;case,&nbsp;grayscale&nbsp;is&nbsp;used.</tt></dd></dl>

<dl><dt><a name="GraphicsContextTemplate-set_graylevel"><strong>set_graylevel</strong></a>(self, frac)</dt><dd><tt>Set&nbsp;the&nbsp;foreground&nbsp;color&nbsp;to&nbsp;be&nbsp;a&nbsp;gray&nbsp;level&nbsp;with&nbsp;frac&nbsp;frac</tt></dd></dl>

<dl><dt><a name="GraphicsContextTemplate-set_joinstyle"><strong>set_joinstyle</strong></a>(self, js)</dt><dd><tt>Set&nbsp;the&nbsp;join&nbsp;style&nbsp;to&nbsp;be&nbsp;one&nbsp;of&nbsp;('miter',&nbsp;'round',&nbsp;'bevel')</tt></dd></dl>

<dl><dt><a name="GraphicsContextTemplate-set_linestyle"><strong>set_linestyle</strong></a>(self, style)</dt><dd><tt>Set&nbsp;the&nbsp;linestyle&nbsp;to&nbsp;be&nbsp;one&nbsp;of&nbsp;('solid',&nbsp;'dashed',&nbsp;'dashdot',<br>
'dotted').</tt></dd></dl>

<dl><dt><a name="GraphicsContextTemplate-set_linewidth"><strong>set_linewidth</strong></a>(self, w)</dt><dd><tt>Set&nbsp;the&nbsp;linewidth&nbsp;in&nbsp;points</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>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="RendererTemplate">class <strong>RendererTemplate</strong></a>(<a href="matplotlib.backend_bases.html#RendererBase">matplotlib.backend_bases.RendererBase</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>The&nbsp;renderer&nbsp;handles&nbsp;all&nbsp;the&nbsp;drawing&nbsp;primitives&nbsp;using&nbsp;a&nbsp;graphics<br>
context&nbsp;instance&nbsp;that&nbsp;controls&nbsp;the&nbsp;colors/styles<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="RendererTemplate-draw_arc"><strong>draw_arc</strong></a>(self, gcEdge, faceColor, x, y, width, height, angle1, angle2)</dt><dd><tt>Draw&nbsp;an&nbsp;arc&nbsp;centered&nbsp;at&nbsp;x,y&nbsp;with&nbsp;width&nbsp;and&nbsp;height&nbsp;and&nbsp;angles<br>
from&nbsp;0.0&nbsp;to&nbsp;360.0.<br>
&nbsp;<br>
If&nbsp;faceColor&nbsp;is&nbsp;not&nbsp;None,&nbsp;fill&nbsp;the&nbsp;rectangle&nbsp;with&nbsp;it.&nbsp;&nbsp;gcEdge<br>
is&nbsp;a&nbsp;GraphicsContext&nbsp;instance</tt></dd></dl>

<dl><dt><a name="RendererTemplate-draw_line"><strong>draw_line</strong></a>(self, gc, x1, y1, x2, y2)</dt><dd><tt>Draw&nbsp;a&nbsp;single&nbsp;line&nbsp;from&nbsp;x1,y1&nbsp;to&nbsp;x2,y2</tt></dd></dl>

<dl><dt><a name="RendererTemplate-draw_lines"><strong>draw_lines</strong></a>(self, gc, x, y)</dt><dd><tt>x&nbsp;and&nbsp;y&nbsp;are&nbsp;equal&nbsp;length&nbsp;arrays,&nbsp;draw&nbsp;lines&nbsp;connecting&nbsp;each<br>
point&nbsp;in&nbsp;x,&nbsp;y</tt></dd></dl>

<dl><dt><a name="RendererTemplate-draw_point"><strong>draw_point</strong></a>(self, gc, x, y)</dt><dd><tt>Draw&nbsp;a&nbsp;single&nbsp;point&nbsp;at&nbsp;x,y</tt></dd></dl>

<dl><dt><a name="RendererTemplate-draw_polygon"><strong>draw_polygon</strong></a>(self, gcEdge, faceColor, points)</dt><dd><tt>Draw&nbsp;a&nbsp;polygon.&nbsp;&nbsp;points&nbsp;is&nbsp;a&nbsp;len&nbsp;vertices&nbsp;tuple,&nbsp;each&nbsp;element<br>
giving&nbsp;the&nbsp;x,y&nbsp;coords&nbsp;a&nbsp;vertex.<br>
&nbsp;<br>
If&nbsp;faceColor&nbsp;is&nbsp;not&nbsp;None,&nbsp;fill&nbsp;the&nbsp;rectangle&nbsp;with&nbsp;it.&nbsp;&nbsp;gcEdge<br>
is&nbsp;a&nbsp;GraphicsContext&nbsp;instance</tt></dd></dl>

<dl><dt><a name="RendererTemplate-draw_rectangle"><strong>draw_rectangle</strong></a>(self, gcEdge, faceColor, x, y, width, height)</dt><dd><tt>Draw&nbsp;a&nbsp;rectangle&nbsp;at&nbsp;lower&nbsp;left&nbsp;x,y&nbsp;with&nbsp;width&nbsp;and&nbsp;height.<br>
&nbsp;<br>
If&nbsp;faceColor&nbsp;is&nbsp;not&nbsp;None,&nbsp;fill&nbsp;the&nbsp;rectangle&nbsp;with&nbsp;it.&nbsp;&nbsp;gcEdge<br>
is&nbsp;a&nbsp;GraphicsContext&nbsp;instance</tt></dd></dl>

<dl><dt><a name="RendererTemplate-new_gc"><strong>new_gc</strong></a>(self)</dt><dd><tt>Return&nbsp;an&nbsp;instance&nbsp;of&nbsp;a&nbsp;<a href="#GraphicsContextTemplate">GraphicsContextTemplate</a></tt></dd></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>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-draw_if_interactive"><strong>draw_if_interactive</strong></a>()</dt><dd><tt>This&nbsp;should&nbsp;be&nbsp;overriden&nbsp;in&nbsp;a&nbsp;windowing&nbsp;environment&nbsp;if&nbsp;drawing<br>
should&nbsp;be&nbsp;done&nbsp;in&nbsp;interactive&nbsp;python&nbsp;mode</tt></dd></dl>
 <dl><dt><a name="-error_msg"><strong>error_msg</strong></a> = error_msg_template(msg, *args)</dt><dd><tt>Signal&nbsp;an&nbsp;error&nbsp;condition&nbsp;--&nbsp;in&nbsp;a&nbsp;GUI,&nbsp;popup&nbsp;a&nbsp;error&nbsp;dialog</tt></dd></dl>
 <dl><dt><a name="-error_msg_template"><strong>error_msg_template</strong></a>(msg, *args)</dt><dd><tt>Signal&nbsp;an&nbsp;error&nbsp;condition&nbsp;--&nbsp;in&nbsp;a&nbsp;GUI,&nbsp;popup&nbsp;a&nbsp;error&nbsp;dialog</tt></dd></dl>
 <dl><dt><a name="-new_figure_manager"><strong>new_figure_manager</strong></a>(num, figsize, dpi)</dt><dd><tt>Create&nbsp;a&nbsp;new&nbsp;figure&nbsp;manager&nbsp;instance</tt></dd></dl>
 <dl><dt><a name="-show"><strong>show</strong></a>()</dt><dd><tt>This&nbsp;is&nbsp;usually&nbsp;the&nbsp;last&nbsp;line&nbsp;of&nbsp;a&nbsp;matlab&nbsp;script&nbsp;and&nbsp;tells&nbsp;the<br>
backend&nbsp;that&nbsp;it&nbsp;is&nbsp;time&nbsp;to&nbsp;draw.&nbsp;&nbsp;In&nbsp;interactive&nbsp;mode,&nbsp;this&nbsp;may&nbsp;be<br>
a&nbsp;do&nbsp;nothing&nbsp;func.&nbsp;&nbsp;See&nbsp;the&nbsp;GTK&nbsp;backend&nbsp;for&nbsp;an&nbsp;example&nbsp;of&nbsp;how&nbsp;to<br>
handle&nbsp;interactive&nbsp;versus&nbsp;batch&nbsp;mode</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>False</strong> = False<br>
<strong>True</strong> = True</td></tr></table>
@footer@
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.