987 lines (891 with data), 103.6 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>.figure</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/figure.py">/home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/figure.py</a></font></td></tr></table>
<p><tt>The figure module provides the top-level<br>
:class:`~matplotlib.artist.<a href="matplotlib.artist.html#Artist">Artist</a>`, the :class:`<a href="#Figure">Figure</a>`, which<br>
contains all the plot elements. The following classes are defined<br>
<br>
:class:`<a href="#SubplotParams">SubplotParams</a>`<br>
control the default spacing of the subplots<br>
<br>
:class:`<a href="#Figure">Figure</a>`<br>
top level container for all plot elements</tt></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="matplotlib._image.html">matplotlib._image</a><br>
<a href="matplotlib.artist.html">matplotlib.artist</a><br>
</td><td width="25%" valign=top><a href="matplotlib.colorbar.html">matplotlib.colorbar</a><br>
<a href="matplotlib.cbook.html">matplotlib.cbook</a><br>
</td><td width="25%" valign=top><a href="numpy.html">numpy</a><br>
<a href="time.html">time</a><br>
</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> <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.artist.html#Artist">matplotlib.artist.Artist</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.figure.html#Figure">Figure</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="matplotlib.figure.html#SubplotParams">SubplotParams</a>
</font></dt></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="Figure">class <strong>Figure</strong></a>(<a href="matplotlib.artist.html#Artist">matplotlib.artist.Artist</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>The <a href="#Figure">Figure</a> instance supports callbacks through a *callbacks*<br>
attribute which is a :class:`matplotlib.cbook.CallbackRegistry`<br>
instance. The events you can connect to are 'dpi_changed', and<br>
the callback will be called with ``func(fig)`` where fig is the<br>
:class:`<a href="#Figure">Figure</a>` instance.<br>
<br>
The figure patch is drawn by a the attribute<br>
<br>
*patch*<br>
a :class:`matplotlib.patches.Rectangle` instance<br>
<br>
*suppressComposite*<br>
for multiple figure images, the figure will make composite<br>
images depending on the renderer option_image_nocomposite<br>
function. If suppressComposite is True|False, this will<br>
override the renderer<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="matplotlib.figure.html#Figure">Figure</a></dd>
<dd><a href="matplotlib.artist.html#Artist">matplotlib.artist.Artist</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Figure-__init__"><strong>__init__</strong></a>(self, figsize<font color="#909090">=None</font>, dpi<font color="#909090">=None</font>, facecolor<font color="#909090">=None</font>, edgecolor<font color="#909090">=None</font>, linewidth<font color="#909090">=1.0</font>, frameon<font color="#909090">=True</font>, subplotpars<font color="#909090">=None</font>)</dt><dd><tt>*figsize*<br>
w,h tuple in inches<br>
*dpi*<br>
dots per inch<br>
*facecolor*<br>
the figure patch facecolor; defaults to rc ``figure.facecolor``<br>
*edgecolor*<br>
the figure patch edge color; defaults to rc ``figure.edgecolor``<br>
*linewidth*<br>
the figure patch edge linewidth; the default linewidth of the frame<br>
*frameon*<br>
if False, suppress drawing the figure frame<br>
*subplotpars*<br>
a :class:`<a href="#SubplotParams">SubplotParams</a>` instance, defaults to rc</tt></dd></dl>
<dl><dt><a name="Figure-__str__"><strong>__str__</strong></a>(self)</dt></dl>
<dl><dt><a name="Figure-add_axes"><strong>add_axes</strong></a>(self, *args, **kwargs)</dt><dd><tt>Add an a axes with axes rect [*left*, *bottom*, *width*,<br>
*height*] where all quantities are in fractions of figure<br>
width and height. kwargs are legal<br>
:class:`~matplotlib.axes.Axes` kwargs plus *projection* which<br>
sets the projection type of the axes. (For backward<br>
compatibility, ``polar=True`` may also be provided, which is<br>
equivalent to ``projection='polar'``). Valid values for<br>
*projection* are: aitoff, hammer, lambert, polar, rectilinear. Some of these projections support<br>
additional kwargs, which may be provided to :meth:`add_axes`::<br>
<br>
rect = l,b,w,h<br>
fig.<a href="#Figure-add_axes">add_axes</a>(rect)<br>
fig.<a href="#Figure-add_axes">add_axes</a>(rect, frameon=False, axisbg='g')<br>
fig.<a href="#Figure-add_axes">add_axes</a>(rect, polar=True)<br>
fig.<a href="#Figure-add_axes">add_axes</a>(rect, projection='polar')<br>
fig.<a href="#Figure-add_axes">add_axes</a>(ax) # add an Axes instance<br>
<br>
If the figure already has an axes with the same parameters,<br>
then it will simply make that axes current and return it. If<br>
you do not want this behavior, eg. you want to force the<br>
creation of a new axes, you must use a unique set of args and<br>
kwargs. The axes :attr:`~matplotlib.axes.Axes.label`<br>
attribute has been exposed for this purpose. Eg., if you want<br>
two axes that are otherwise identical to be added to the<br>
figure, make sure you give them unique labels::<br>
<br>
fig.<a href="#Figure-add_axes">add_axes</a>(rect, label='axes1')<br>
fig.<a href="#Figure-add_axes">add_axes</a>(rect, label='axes2')<br>
<br>
The :class:`~matplotlib.axes.Axes` instance will be returned.<br>
<br>
The following kwargs are supported:<br>
<br>
<br>
============= ===============================================<br>
Property Description <br>
============= ===============================================<br>
adjustable [ 'box' | 'datalim' ] <br>
alpha float <br>
anchor unknown <br>
animated [True | False] <br>
aspect unknown <br>
autoscale_on unknown <br>
axes an axes instance <br>
axis_bgcolor any matplotlib color - see <br>
axis_off unknown <br>
axis_on unknown <br>
axisbelow [ *True* | *False* ] <br>
clip_box a :class:`matplotlib.transform.Bbox` instance <br>
clip_on [True | False] <br>
clip_path a :class:`~matplotlib.path.Path` instance and a<br>
color_cycle unknown <br>
contains unknown <br>
cursor_props a (*float*, *color*) tuple <br>
figure unknown <br>
frame_on [ *True* | *False* ] <br>
label any string <br>
lod [True | False] <br>
navigate [ True | False ] <br>
navigate_mode unknown <br>
picker [None|float|boolean|callable] <br>
position unknown <br>
title unknown <br>
transform unknown <br>
visible [True | False] <br>
xbound unknown <br>
xlabel unknown <br>
xlim len(2) sequence of floats <br>
xscale ['linear' | 'log' | 'symlog'] <br>
xticklabels unknown <br>
xticks sequence of floats <br>
ybound unknown <br>
ylabel unknown <br>
ylim len(2) sequence of floats <br>
yscale ['linear' | 'log' | 'symlog'] <br>
yticklabels unknown <br>
yticks sequence of floats <br>
zorder any number <br>
============= ===============================================</tt></dd></dl>
<dl><dt><a name="Figure-add_axobserver"><strong>add_axobserver</strong></a>(self, func)</dt><dd><tt>whenever the axes state change, func(self) will be called</tt></dd></dl>
<dl><dt><a name="Figure-add_subplot"><strong>add_subplot</strong></a>(self, *args, **kwargs)</dt></dl>
<dl><dt><a name="Figure-autofmt_xdate"><strong>autofmt_xdate</strong></a>(self, bottom<font color="#909090">=0.20000000000000001</font>, rotation<font color="#909090">=30</font>, ha<font color="#909090">='right'</font>)</dt><dd><tt>Date ticklabels often overlap, so it is useful to rotate them<br>
and right align them. Also, a common use case is a number of<br>
subplots with shared xaxes where the x-axis is date data. The<br>
ticklabels are often long, and it helps to rotate them on the<br>
bottom subplot and turn them off on other subplots, as well as<br>
turn off xlabels.<br>
<br>
*bottom*<br>
the bottom of the subplots for :meth:`subplots_adjust`<br>
*rotation*<br>
the rotation of the xtick labels<br>
*ha*<br>
the horizontal alignment of the xticklabels</tt></dd></dl>
<dl><dt><a name="Figure-clear"><strong>clear</strong></a>(self)</dt><dd><tt>Clear the figure</tt></dd></dl>
<dl><dt><a name="Figure-clf"><strong>clf</strong></a>(self)</dt><dd><tt>Clear the figure</tt></dd></dl>
<dl><dt><a name="Figure-colorbar"><strong>colorbar</strong></a>(self, mappable, cax<font color="#909090">=None</font>, ax<font color="#909090">=None</font>, **kw)</dt><dd><tt> Create a colorbar for a ScalarMappable instance.<br>
<br>
Documentation for the pylab thin wrapper:<br>
<br>
<br>
Add a colorbar to a plot.<br>
<br>
Function signatures for the :mod:`~matplotlib.pyplot` interface; all<br>
but the first are also method signatures for the<br>
:meth:`matplotlib.<a href="#Figure">Figure</a>.colorbar` method::<br>
<br>
<a href="#Figure-colorbar">colorbar</a>(**kwargs)<br>
<a href="#Figure-colorbar">colorbar</a>(mappable, **kwargs)<br>
<a href="#Figure-colorbar">colorbar</a>(mappable, cax=cax, **kwargs)<br>
<a href="#Figure-colorbar">colorbar</a>(mappable, ax=ax, **kwargs)<br>
<br>
arguments:<br>
<br>
*mappable*<br>
the image, :class:`~matplotlib.contours.ContourSet`, etc. to<br>
which the colorbar applies; this argument is mandatory for the<br>
:meth:`matplotlib.<a href="#Figure">Figure</a>.colorbar` method but optional for the<br>
:func:`matplotlib.pyplot.colorbar` function, which sets the<br>
default to the current image.<br>
<br>
keyword arguments:<br>
<br>
*cax*<br>
None | axes object into which the colorbar will be drawn<br>
*ax*<br>
None | parent axes object from which space for a new<br>
colorbar axes will be stolen<br>
<br>
<br>
Additional keyword arguments are of two kinds:<br>
<br>
axes properties:<br>
<br>
<br>
========== ====================================================<br>
Property Description<br>
========== ====================================================<br>
*fraction* 0.15; fraction of original axes to use for colorbar<br>
*pad* 0.05 if vertical, 0.15 if horizontal; fraction<br>
of original axes between colorbar and new image axes<br>
*shrink* 1.0; fraction by which to shrink the colorbar<br>
*aspect* 20; ratio of long to short dimensions<br>
========== ====================================================<br>
<br>
<br>
colorbar properties:<br>
<br>
<br>
=========== ====================================================<br>
Property Description<br>
=========== ====================================================<br>
*extend* [ 'neither' | 'both' | 'min' | 'max' ]<br>
If not 'neither', make pointed end(s) for out-of-<br>
range values. These are set for a given colormap<br>
using the colormap set_under and set_over methods.<br>
*spacing* [ 'uniform' | 'proportional' ]<br>
Uniform spacing gives each discrete color the same<br>
space; proportional makes the space proportional to<br>
the data interval.<br>
*ticks* [ None | list of ticks | Locator object ]<br>
If None, ticks are determined automatically from the<br>
input.<br>
*format* [ None | format string | Formatter object ]<br>
If None, the<br>
:class:`~matplotlib.ticker.ScalarFormatter` is used.<br>
If a format string is given, e.g. '%.3f', that is<br>
used. An alternative<br>
:class:`~matplotlib.ticker.Formatter` object may be<br>
given instead.<br>
*drawedges* [ False | True ] If true, draw lines at color<br>
boundaries.<br>
=========== ====================================================<br>
<br>
The following will probably be useful only in the context of<br>
indexed colors (that is, when the mappable has norm=NoNorm()),<br>
or other unusual circumstances.<br>
<br>
============ ===================================================<br>
Property Description<br>
============ ===================================================<br>
*boundaries* None or a sequence<br>
*values* None or a sequence which must be of length 1 less<br>
than the sequence of *boundaries*. For each region<br>
delimited by adjacent entries in *boundaries*, the<br>
color mapped to the corresponding value in values<br>
will be used.<br>
============ ===================================================<br>
<br>
<br>
<br>
If mappable is a :class:`~matplotlib.contours.ContourSet`, its *extend*<br>
kwarg is included automatically.<br>
<br>
Note that the *shrink* kwarg provides a simple way to keep a vertical<br>
colorbar, for example, from being taller than the axes of the mappable<br>
to which the colorbar is attached; but it is a manual method requiring<br>
some trial and error. If the colorbar is too tall (or a horizontal<br>
colorbar is too wide) use a smaller value of *shrink*.<br>
<br>
For more precise control, you can manually specify the positions of<br>
the axes objects in which the mappable and the colorbar are drawn. In<br>
this case, do not use any of the axes properties kwargs.</tt></dd></dl>
<dl><dt><a name="Figure-contains"><strong>contains</strong></a>(self, mouseevent)</dt><dd><tt>Test whether the mouse event occurred on the figure.<br>
<br>
Returns True,{}</tt></dd></dl>
<dl><dt><a name="Figure-delaxes"><strong>delaxes</strong></a>(self, a)</dt><dd><tt>remove a from the figure and update the current axes</tt></dd></dl>
<dl><dt><a name="Figure-draw"><strong>draw</strong></a>(self, renderer)</dt><dd><tt>Render the figure using :class:`matplotlib.backend_bases.RendererBase` instance renderer</tt></dd></dl>
<dl><dt><a name="Figure-draw_artist"><strong>draw_artist</strong></a>(self, a)</dt><dd><tt>draw :class:`matplotlib.artist.<a href="matplotlib.artist.html#Artist">Artist</a>` instance *a* only --<br>
this is available only after the figure is drawn</tt></dd></dl>
<dl><dt><a name="Figure-figimage"><strong>figimage</strong></a>(self, X, xo<font color="#909090">=0</font>, yo<font color="#909090">=0</font>, alpha<font color="#909090">=1.0</font>, norm<font color="#909090">=None</font>, cmap<font color="#909090">=None</font>, vmin<font color="#909090">=None</font>, vmax<font color="#909090">=None</font>, origin<font color="#909090">=None</font>)</dt><dd><tt>call signatures::<br>
<br>
<a href="#Figure-figimage">figimage</a>(X, **kwargs)<br>
<br>
adds a non-resampled array *X* to the figure.<br>
<br>
::<br>
<br>
<a href="#Figure-figimage">figimage</a>(X, xo, yo)<br>
<br>
with pixel offsets *xo*, *yo*,<br>
<br>
*X* must be a float array:<br>
<br>
* If *X* is MxN, assume luminance (grayscale)<br>
* If *X* is MxNx3, assume RGB<br>
* If *X* is MxNx4, assume RGBA<br>
<br>
Optional keyword arguments:<br>
<br>
========= ==========================================================<br>
Keyword Description<br>
========= ==========================================================<br>
xo or yo An integer, the *x* and *y* image offset in pixels<br>
cmap a :class:`matplotlib.cm.ColorMap` instance, eg cm.jet.<br>
If None, default to the rc ``image.cmap`` value<br>
norm a :class:`matplotlib.colors.Normalize` instance. The<br>
default is normalization(). This scales luminance -> 0-1<br>
vmin|vmax are used to scale a luminance image to 0-1. If either is<br>
None, the min and max of the luminance values will be<br>
used. Note if you pass a norm instance, the settings for<br>
*vmin* and *vmax* will be ignored.<br>
alpha the alpha blending value, default is 1.0<br>
origin [ 'upper' | 'lower' ] Indicates where the [0,0] index of<br>
the array is in the upper left or lower left corner of<br>
the axes. Defaults to the rc image.origin value<br>
========= ==========================================================<br>
<br>
figimage complements the axes image<br>
(:meth:`~matplotlib.axes.Axes.imshow`) which will be resampled<br>
to fit the current axes. If you want a resampled image to<br>
fill the entire figure, you can define an<br>
:class:`~matplotlib.axes.Axes` with size [0,1,0,1].<br>
<br>
An :class:`matplotlib.image.FigureImage` instance is returned.<br>
<br>
.. plot:: ../mpl_examples/pylab_examples/figimage_demo.py</tt></dd></dl>
<dl><dt><a name="Figure-gca"><strong>gca</strong></a>(self, **kwargs)</dt><dd><tt>Return the current axes, creating one if necessary<br>
<br>
The following kwargs are supported<br>
<br>
============= ===============================================<br>
Property Description <br>
============= ===============================================<br>
adjustable [ 'box' | 'datalim' ] <br>
alpha float <br>
anchor unknown <br>
animated [True | False] <br>
aspect unknown <br>
autoscale_on unknown <br>
axes an axes instance <br>
axis_bgcolor any matplotlib color - see <br>
axis_off unknown <br>
axis_on unknown <br>
axisbelow [ *True* | *False* ] <br>
clip_box a :class:`matplotlib.transform.Bbox` instance <br>
clip_on [True | False] <br>
clip_path a :class:`~matplotlib.path.Path` instance and a<br>
color_cycle unknown <br>
contains unknown <br>
cursor_props a (*float*, *color*) tuple <br>
figure unknown <br>
frame_on [ *True* | *False* ] <br>
label any string <br>
lod [True | False] <br>
navigate [ True | False ] <br>
navigate_mode unknown <br>
picker [None|float|boolean|callable] <br>
position unknown <br>
title unknown <br>
transform unknown <br>
visible [True | False] <br>
xbound unknown <br>
xlabel unknown <br>
xlim len(2) sequence of floats <br>
xscale ['linear' | 'log' | 'symlog'] <br>
xticklabels unknown <br>
xticks sequence of floats <br>
ybound unknown <br>
ylabel unknown <br>
ylim len(2) sequence of floats <br>
yscale ['linear' | 'log' | 'symlog'] <br>
yticklabels unknown <br>
yticks sequence of floats <br>
zorder any number <br>
============= ===============================================</tt></dd></dl>
<dl><dt><a name="Figure-get_axes"><strong>get_axes</strong></a>(self)</dt></dl>
<dl><dt><a name="Figure-get_children"><strong>get_children</strong></a>(self)</dt><dd><tt>get a list of artists contained in the figure</tt></dd></dl>
<dl><dt><a name="Figure-get_dpi"><strong>get_dpi</strong></a>(self)</dt><dd><tt>Return the dpi as a float</tt></dd></dl>
<dl><dt><a name="Figure-get_edgecolor"><strong>get_edgecolor</strong></a>(self)</dt><dd><tt>Get the edge color of the <a href="#Figure">Figure</a> rectangle</tt></dd></dl>
<dl><dt><a name="Figure-get_facecolor"><strong>get_facecolor</strong></a>(self)</dt><dd><tt>Get the face color of the <a href="#Figure">Figure</a> rectangle</tt></dd></dl>
<dl><dt><a name="Figure-get_figheight"><strong>get_figheight</strong></a>(self)</dt><dd><tt>Return the figheight as a float</tt></dd></dl>
<dl><dt><a name="Figure-get_figwidth"><strong>get_figwidth</strong></a>(self)</dt><dd><tt>Return the figwidth as a float</tt></dd></dl>
<dl><dt><a name="Figure-get_frameon"><strong>get_frameon</strong></a>(self)</dt><dd><tt>get the boolean indicating frameon</tt></dd></dl>
<dl><dt><a name="Figure-get_size_inches"><strong>get_size_inches</strong></a>(self)</dt></dl>
<dl><dt><a name="Figure-get_window_extent"><strong>get_window_extent</strong></a>(self, *args, **kwargs)</dt><dd><tt>get the figure bounding box in display space; kwargs are void</tt></dd></dl>
<dl><dt><a name="Figure-ginput"><strong>ginput</strong></a>(self, n<font color="#909090">=1</font>, timeout<font color="#909090">=30</font>, show_clicks<font color="#909090">=True</font>)</dt><dd><tt>call signature::<br>
<br>
<a href="#Figure-ginput">ginput</a>(self, n=1, timeout=30, show_clicks=True)<br>
<br>
Blocking call to interact with the figure.<br>
<br>
This will wait for *n* clicks from the user and return a list of the<br>
coordinates of each click.<br>
<br>
If *timeout* is negative, does not timeout.<br>
<br>
If *n* is negative, accumulate clicks until a middle click<br>
terminates the input.<br>
<br>
Right clicking cancels last input.</tt></dd></dl>
<dl><dt><a name="Figure-hold"><strong>hold</strong></a>(self, b<font color="#909090">=None</font>)</dt><dd><tt>Set the hold state. If hold is None (default), toggle the<br>
hold state. Else set the hold state to boolean value b.<br>
<br>
Eg::<br>
<br>
<a href="#Figure-hold">hold</a>() # toggle hold<br>
<a href="#Figure-hold">hold</a>(True) # hold is on<br>
<a href="#Figure-hold">hold</a>(False) # hold is off</tt></dd></dl>
<dl><dt><a name="Figure-legend"><strong>legend</strong></a>(self, handles, labels, *args, **kwargs)</dt><dd><tt>Place a legend in the figure. Labels are a sequence of<br>
strings, handles is a sequence of<br>
:class:`~matplotlib.lines.Line2D` or<br>
:class:`~matplotlib.patches.Patch` instances, and loc can be a<br>
string or an integer specifying the legend location<br>
<br>
USAGE::<br>
<br>
<a href="#Figure-legend">legend</a>( (line1, line2, line3),<br>
('label1', 'label2', 'label3'),<br>
'upper right')<br>
<br>
The *loc* location codes are::<br>
<br>
'best' : 0, (currently not supported for figure legends)<br>
'upper right' : 1,<br>
'upper left' : 2,<br>
'lower left' : 3,<br>
'lower right' : 4,<br>
'right' : 5,<br>
'center left' : 6,<br>
'center right' : 7,<br>
'lower center' : 8,<br>
'upper center' : 9,<br>
'center' : 10,<br>
<br>
*loc* can also be an (x,y) tuple in figure coords, which<br>
specifies the lower left of the legend box. figure coords are<br>
(0,0) is the left, bottom of the figure and 1,1 is the right,<br>
top.<br>
<br>
The legend instance is returned. The following kwargs are supported<br>
<br>
*loc*<br>
the location of the legend<br>
*numpoints*<br>
the number of points in the legend line<br>
*prop*<br>
a :class:`matplotlib.font_manager.FontProperties` instance<br>
*pad*<br>
the fractional whitespace inside the legend border<br>
*markerscale*<br>
the relative size of legend markers vs. original<br>
*shadow*<br>
if True, draw a shadow behind legend<br>
*labelsep*<br>
the vertical space between the legend entries<br>
*handlelen*<br>
the length of the legend lines<br>
*handletextsep*<br>
the space between the legend line and legend text<br>
*axespad*<br>
the border between the axes and legend edge<br>
<br>
.. plot:: ../mpl_examples/pylab_examples/figlegend_demo.py</tt></dd></dl>
<dl><dt><a name="Figure-savefig"><strong>savefig</strong></a>(self, *args, **kwargs)</dt><dd><tt>call signature::<br>
<br>
<a href="#Figure-savefig">savefig</a>(fname, dpi=None, facecolor='w', edgecolor='w',<br>
orientation='portrait', papertype=None, format=None,<br>
transparent=False):<br>
<br>
Save the current figure.<br>
<br>
The output formats available depend on the backend being used.<br>
<br>
Arguments:<br>
<br>
*fname*:<br>
A string containing a path to a filename, or a Python file-like object.<br>
<br>
If *format* is *None* and *fname* is a string, the output<br>
format is deduced from the extension of the filename.<br>
<br>
Keyword arguments:<br>
<br>
*dpi*: [ None | scalar > 0 ]<br>
The resolution in dots per inch. If *None* it will default to<br>
the value ``savefig.dpi`` in the matplotlibrc file.<br>
<br>
*facecolor*, *edgecolor*:<br>
the colors of the figure rectangle<br>
<br>
*orientation*: [ 'landscape' | 'portrait' ]<br>
not supported on all backends; currently only on postscript output<br>
<br>
*papertype*:<br>
One of 'letter', 'legal', 'executive', 'ledger', 'a0' through<br>
'a10', 'b0' through 'b10'. Only supported for postscript<br>
output.<br>
<br>
*format*:<br>
One of the file extensions supported by the active<br>
backend. Most backends support png, pdf, ps, eps and svg.<br>
<br>
*transparent*:<br>
If *True*, the figure patch and axes patches will all be<br>
transparent. This is useful, for example, for displaying<br>
a plot on top of a colored background on a web page. The<br>
transparency of these patches will be restored to their<br>
original values upon exit of this function.</tt></dd></dl>
<dl><dt><a name="Figure-sca"><strong>sca</strong></a>(self, a)</dt><dd><tt>Set the current axes to be a and return a</tt></dd></dl>
<dl><dt><a name="Figure-set_canvas"><strong>set_canvas</strong></a>(self, canvas)</dt><dd><tt>Set the canvas the contains the figure<br>
<br>
ACCEPTS: a FigureCanvas instance</tt></dd></dl>
<dl><dt><a name="Figure-set_dpi"><strong>set_dpi</strong></a>(self, val)</dt><dd><tt>Set the dots-per-inch of the figure<br>
<br>
ACCEPTS: float</tt></dd></dl>
<dl><dt><a name="Figure-set_edgecolor"><strong>set_edgecolor</strong></a>(self, color)</dt><dd><tt>Set the edge color of the <a href="#Figure">Figure</a> rectangle<br>
<br>
ACCEPTS: any matplotlib color - see help(colors)</tt></dd></dl>
<dl><dt><a name="Figure-set_facecolor"><strong>set_facecolor</strong></a>(self, color)</dt><dd><tt>Set the face color of the <a href="#Figure">Figure</a> rectangle<br>
<br>
ACCEPTS: any matplotlib color - see help(colors)</tt></dd></dl>
<dl><dt><a name="Figure-set_figheight"><strong>set_figheight</strong></a>(self, val)</dt><dd><tt>Set the height of the figure in inches<br>
<br>
ACCEPTS: float</tt></dd></dl>
<dl><dt><a name="Figure-set_figsize_inches"><strong>set_figsize_inches</strong></a>(self, *args, **kwargs)</dt></dl>
<dl><dt><a name="Figure-set_figwidth"><strong>set_figwidth</strong></a>(self, val)</dt><dd><tt>Set the width of the figure in inches<br>
<br>
ACCEPTS: float</tt></dd></dl>
<dl><dt><a name="Figure-set_frameon"><strong>set_frameon</strong></a>(self, b)</dt><dd><tt>Set whether the figure frame (background) is displayed or invisible<br>
<br>
ACCEPTS: boolean</tt></dd></dl>
<dl><dt><a name="Figure-set_size_inches"><strong>set_size_inches</strong></a>(self, *args, **kwargs)</dt><dd><tt><a href="#Figure-set_size_inches">set_size_inches</a>(w,h, forward=False)<br>
<br>
Set the figure size in inches<br>
<br>
Usage::<br>
<br>
fig.<a href="#Figure-set_size_inches">set_size_inches</a>(w,h) # OR<br>
fig.<a href="#Figure-set_size_inches">set_size_inches</a>((w,h) )<br>
<br>
optional kwarg *forward=True* will cause the canvas size to be<br>
automatically updated; eg you can resize the figure window<br>
from the shell<br>
<br>
WARNING: forward=True is broken on all backends except GTK*<br>
and WX*<br>
<br>
ACCEPTS: a w,h tuple with w,h in inches</tt></dd></dl>
<dl><dt><a name="Figure-subplots_adjust"><strong>subplots_adjust</strong></a>(self, *args, **kwargs)</dt><dd><tt>fig.<a href="#Figure-subplots_adjust">subplots_adjust</a>(left=None, bottom=None, right=None, wspace=None, hspace=None)<br>
<br>
Update the :class:`<a href="#SubplotParams">SubplotParams</a>` with *kwargs* (defaulting to rc where<br>
None) and update the subplot locations</tt></dd></dl>
<dl><dt><a name="Figure-suptitle"><strong>suptitle</strong></a>(self, t, **kwargs)</dt><dd><tt>Add a centered title to the figure.<br>
<br>
kwargs are :class:`matplotlib.text.Text` properties. Using figure<br>
coordinates, the defaults are::<br>
<br>
*x* = 0.5<br>
the x location of text in figure coords<br>
*y* = 0.98<br>
the y location of the text in figure coords<br>
*horizontalalignment* = 'center'<br>
the horizontal alignment of the text<br>
*verticalalignment* = 'top'<br>
the vertical alignment of the text<br>
<br>
A :class:`matplotlib.text.Text` instance is returned.<br>
<br>
Example::<br>
<br>
fig.subtitle('this is the figure title', fontsize=12)</tt></dd></dl>
<dl><dt><a name="Figure-text"><strong>text</strong></a>(self, x, y, s, *args, **kwargs)</dt><dd><tt>Call signature::<br>
<br>
figtext(x, y, s, fontdict=None, **kwargs)<br>
<br>
Add text to figure at location *x*, *y* (relative 0-1<br>
coords). See :func:`~matplotlib.pyplot.text` for the meaning<br>
of the other arguments.<br>
<br>
kwargs control the :class:`~matplotlib.text.Text` properties:<br>
<br>
<br>
========================= =====================================================================<br>
Property Description <br>
========================= =====================================================================<br>
alpha float <br>
animated [True | False] <br>
axes an axes instance <br>
backgroundcolor any matplotlib color <br>
bbox rectangle prop dict plus key 'pad' which is a pad in points <br>
clip_box a :class:`matplotlib.transform.Bbox` instance <br>
clip_on [True | False] <br>
clip_path a :class:`~matplotlib.path.Path` instance and a <br>
color any matplotlib color <br>
contains unknown <br>
family [ 'serif' | 'sans-serif' | 'cursive' | 'fantasy' | 'monospace' ] <br>
figure a :class:`matplotlib.figure.<a href="#Figure">Figure</a>` instance <br>
fontproperties a matplotlib.font_manager.FontProperties instance <br>
horizontalalignment or ha [ 'center' | 'right' | 'left' ] <br>
label any string <br>
linespacing float <br>
lod [True | False] <br>
multialignment ['left' | 'right' | 'center' ] <br>
name or fontname string eg, ['Sans' | 'Courier' | 'Helvetica' ...] <br>
picker [None|float|boolean|callable] <br>
position (x,y) <br>
rotation [ angle in degrees 'vertical' | 'horizontal' <br>
size or fontsize [ size in points | relative size eg 'smaller', 'x-large' ] <br>
style or fontstyle [ 'normal' | 'italic' | 'oblique'] <br>
text string or anything printable with '%s' conversion <br>
transform unknown <br>
variant [ 'normal' | 'small-caps' ] <br>
verticalalignment or va [ 'center' | 'top' | 'bottom' | 'baseline' ] <br>
visible [True | False] <br>
weight or fontweight [ 'normal' | 'bold' | 'heavy' | 'light' | 'ultrabold' | 'ultralight']<br>
x float <br>
y float <br>
zorder any number <br>
========================= =====================================================================</tt></dd></dl>
<dl><dt><a name="Figure-waitforbuttonpress"><strong>waitforbuttonpress</strong></a>(self, timeout<font color="#909090">=-1</font>)</dt><dd><tt>call signature::<br>
<br>
<a href="#Figure-waitforbuttonpress">waitforbuttonpress</a>(self, timeout=-1)<br>
<br>
Blocking call to interact with the figure.<br>
<br>
This will return True is a key was pressed, False if a mouse<br>
button was pressed and None if *timeout* was reached without<br>
either being pressed.<br>
<br>
If *timeout* is negative, does not timeout.</tt></dd></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>dpi</strong></dt>
</dl>
<hr>
Methods inherited from <a href="matplotlib.artist.html#Artist">matplotlib.artist.Artist</a>:<br>
<dl><dt><a name="Figure-add_callback"><strong>add_callback</strong></a>(self, func)</dt></dl>
<dl><dt><a name="Figure-convert_xunits"><strong>convert_xunits</strong></a>(self, x)</dt><dd><tt>for artists in an axes, if the xaxis as units support,<br>
convert *x* using xaxis unit type</tt></dd></dl>
<dl><dt><a name="Figure-convert_yunits"><strong>convert_yunits</strong></a>(self, y)</dt><dd><tt>for artists in an axes, if the yaxis as units support,<br>
convert *y* using yaxis unit type</tt></dd></dl>
<dl><dt><a name="Figure-findobj"><strong>findobj</strong></a>(self, match<font color="#909090">=None</font>)</dt><dd><tt>pyplot signature:<br>
<a href="#Figure-findobj">findobj</a>(o=gcf(), match=None) <br>
<br>
recursively find all :class:matplotlib.artist.<a href="matplotlib.artist.html#Artist">Artist</a> instances<br>
contained in self<br>
<br>
*match* can be<br>
<br>
- None: return all objects contained in artist (including artist)<br>
<br>
- function with signature ``boolean = match(artist)`` used to filter matches<br>
<br>
- class instance: eg Line2D. Only return artists of class type<br>
<br>
.. plot:: ../mpl_examples/pylab_examples/findobj_demo.py</tt></dd></dl>
<dl><dt><a name="Figure-get_alpha"><strong>get_alpha</strong></a>(self)</dt><dd><tt>Return the alpha value used for blending - not supported on all<br>
backends</tt></dd></dl>
<dl><dt><a name="Figure-get_animated"><strong>get_animated</strong></a>(self)</dt><dd><tt>return the artist's animated state</tt></dd></dl>
<dl><dt><a name="Figure-get_clip_box"><strong>get_clip_box</strong></a>(self)</dt><dd><tt>Return artist clipbox</tt></dd></dl>
<dl><dt><a name="Figure-get_clip_on"><strong>get_clip_on</strong></a>(self)</dt><dd><tt>Return whether artist uses clipping</tt></dd></dl>
<dl><dt><a name="Figure-get_clip_path"><strong>get_clip_path</strong></a>(self)</dt><dd><tt>Return artist clip path</tt></dd></dl>
<dl><dt><a name="Figure-get_contains"><strong>get_contains</strong></a>(self)</dt><dd><tt>return the _contains test used by the artist, or *None* for default.</tt></dd></dl>
<dl><dt><a name="Figure-get_figure"><strong>get_figure</strong></a>(self)</dt><dd><tt>Return the :class:`~matplotlib.figure.<a href="#Figure">Figure</a>` instance the<br>
artist belongs to.</tt></dd></dl>
<dl><dt><a name="Figure-get_label"><strong>get_label</strong></a>(self)</dt></dl>
<dl><dt><a name="Figure-get_picker"><strong>get_picker</strong></a>(self)</dt><dd><tt>return the Pickeration instance used by this artist</tt></dd></dl>
<dl><dt><a name="Figure-get_transform"><strong>get_transform</strong></a>(self)</dt><dd><tt>Return the :class:`~matplotlib.transforms.Transform`<br>
instance used by this artist.</tt></dd></dl>
<dl><dt><a name="Figure-get_transformed_clip_path_and_affine"><strong>get_transformed_clip_path_and_affine</strong></a>(self)</dt><dd><tt>Return the clip path with the non-affine part of its<br>
transformation applied, and the remaining affine part of its<br>
transformation.</tt></dd></dl>
<dl><dt><a name="Figure-get_visible"><strong>get_visible</strong></a>(self)</dt><dd><tt>return the artist's visiblity</tt></dd></dl>
<dl><dt><a name="Figure-get_zorder"><strong>get_zorder</strong></a>(self)</dt></dl>
<dl><dt><a name="Figure-have_units"><strong>have_units</strong></a>(self)</dt><dd><tt>return *True* if units are set on the x or y axes</tt></dd></dl>
<dl><dt><a name="Figure-hitlist"><strong>hitlist</strong></a>(self, event)</dt><dd><tt>List the children of the artist which contain the mouse event</tt></dd></dl>
<dl><dt><a name="Figure-is_figure_set"><strong>is_figure_set</strong></a>(self)</dt></dl>
<dl><dt><a name="Figure-is_transform_set"><strong>is_transform_set</strong></a>(self)</dt><dd><tt><a href="matplotlib.artist.html#Artist">Artist</a> has transform explicity let</tt></dd></dl>
<dl><dt><a name="Figure-pchanged"><strong>pchanged</strong></a>(self)</dt><dd><tt>fire event when property changed</tt></dd></dl>
<dl><dt><a name="Figure-pick"><strong>pick</strong></a>(self, mouseevent)</dt><dd><tt>call signature::<br>
<br>
<a href="#Figure-pick">pick</a>(mouseevent)<br>
<br>
each child artist will fire a pick event if *mouseevent* is over<br>
the artist and the artist has picker set</tt></dd></dl>
<dl><dt><a name="Figure-pickable"><strong>pickable</strong></a>(self)</dt><dd><tt>return *True* if self is pickable</tt></dd></dl>
<dl><dt><a name="Figure-remove"><strong>remove</strong></a>(self)</dt><dd><tt>Remove the artist from the figure if possible. The effect<br>
will not be visible until the figure is redrawn, e.g., with<br>
:meth:`matplotlib.axes.Axes.draw_idle`. Call<br>
:meth:`matplotlib.axes.Axes.relim` to update the axes limits<br>
if desired.<br>
<br>
Note: :meth:`~matplotlib.axes.Axes.relim` will not see<br>
collections even if the collection was added to axes with<br>
*autolim* = True.<br>
<br>
Note: there is no support for removing the artist's legend entry.</tt></dd></dl>
<dl><dt><a name="Figure-remove_callback"><strong>remove_callback</strong></a>(self, oid)</dt></dl>
<dl><dt><a name="Figure-set"><strong>set</strong></a>(self, **kwargs)</dt><dd><tt>A tkstyle set command, pass *kwargs* to set properties</tt></dd></dl>
<dl><dt><a name="Figure-set_alpha"><strong>set_alpha</strong></a>(self, alpha)</dt><dd><tt>Set the alpha value used for blending - not supported on<br>
all backends<br>
<br>
ACCEPTS: float</tt></dd></dl>
<dl><dt><a name="Figure-set_animated"><strong>set_animated</strong></a>(self, b)</dt><dd><tt>set the artist's animation state<br>
<br>
ACCEPTS: [True | False]</tt></dd></dl>
<dl><dt><a name="Figure-set_axes"><strong>set_axes</strong></a>(self, axes)</dt><dd><tt>set the axes instance in which the artist resides, if any<br>
<br>
ACCEPTS: an axes instance</tt></dd></dl>
<dl><dt><a name="Figure-set_clip_box"><strong>set_clip_box</strong></a>(self, clipbox)</dt><dd><tt>Set the artist's clip Bbox<br>
<br>
ACCEPTS: a :class:`matplotlib.transform.Bbox` instance</tt></dd></dl>
<dl><dt><a name="Figure-set_clip_on"><strong>set_clip_on</strong></a>(self, b)</dt><dd><tt>Set whether artist uses clipping<br>
<br>
ACCEPTS: [True | False]</tt></dd></dl>
<dl><dt><a name="Figure-set_clip_path"><strong>set_clip_path</strong></a>(self, path, transform<font color="#909090">=None</font>)</dt><dd><tt>Set the artist's clip path, which may be:<br>
<br>
* a :class:`~matplotlib.patches.Patch` (or subclass) instance<br>
<br>
* a :class:`~matplotlib.path.Path` instance, in which case<br>
an optional :class:`~matplotlib.transforms.Transform`<br>
instance may be provided, which will be applied to the<br>
path before using it for clipping.<br>
<br>
* *None*, to remove the clipping path<br>
<br>
For efficiency, if the path happens to be an axis-aligned<br>
rectangle, this method will set the clipping box to the<br>
corresponding rectangle and set the clipping path to *None*.<br>
<br>
ACCEPTS: a :class:`~matplotlib.path.Path` instance and a<br>
:class:`~matplotlib.transforms.Transform` instance, a<br>
:class:`~matplotlib.patches.Patch` instance, or *None*.</tt></dd></dl>
<dl><dt><a name="Figure-set_contains"><strong>set_contains</strong></a>(self, picker)</dt><dd><tt>Replace the contains test used by this artist. The new picker should<br>
be a callable function which determines whether the artist is hit by the<br>
mouse event::<br>
<br>
hit, props = picker(artist, mouseevent)<br>
<br>
If the mouse event is over the artist, return *hit=True* and *props*<br>
is a dictionary of properties you want returned with the contains test.</tt></dd></dl>
<dl><dt><a name="Figure-set_figure"><strong>set_figure</strong></a>(self, fig)</dt><dd><tt>Set the :class:`~matplotlib.figure.<a href="#Figure">Figure</a>` instance the artist<br>
belongs to.<br>
<br>
ACCEPTS: a :class:`matplotlib.figure.<a href="#Figure">Figure</a>` instance</tt></dd></dl>
<dl><dt><a name="Figure-set_label"><strong>set_label</strong></a>(self, s)</dt><dd><tt>Set the line label to *s* for auto legend<br>
<br>
ACCEPTS: any string</tt></dd></dl>
<dl><dt><a name="Figure-set_lod"><strong>set_lod</strong></a>(self, on)</dt><dd><tt>Set Level of Detail on or off. If on, the artists may examine<br>
things like the pixel width of the axes and draw a subset of<br>
their contents accordingly<br>
<br>
ACCEPTS: [True | False]</tt></dd></dl>
<dl><dt><a name="Figure-set_picker"><strong>set_picker</strong></a>(self, picker)</dt><dd><tt>set the epsilon for picking used by this artist<br>
<br>
*picker* can be one of the following:<br>
<br>
* *None*: picking is disabled for this artist (default)<br>
<br>
* A boolean: if *True* then picking will be enabled and the<br>
artist will fire a pick event if the mouse event is over<br>
the artist<br>
<br>
* A float: if picker is a number it is interpreted as an<br>
epsilon tolerance in points and the artist will fire<br>
off an event if it's data is within epsilon of the mouse<br>
event. For some artists like lines and patch collections,<br>
the artist may provide additional data to the pick event<br>
that is generated, e.g. the indices of the data within<br>
epsilon of the pick event<br>
<br>
* A function: if picker is callable, it is a user supplied<br>
function which determines whether the artist is hit by the<br>
mouse event::<br>
<br>
hit, props = picker(artist, mouseevent)<br>
<br>
to determine the hit test. if the mouse event is over the<br>
artist, return *hit=True* and props is a dictionary of<br>
properties you want added to the PickEvent attributes.<br>
<br>
ACCEPTS: [None|float|boolean|callable]</tt></dd></dl>
<dl><dt><a name="Figure-set_transform"><strong>set_transform</strong></a>(self, t)</dt><dd><tt>Set the :class:`~matplotlib.transforms.Transform` instance<br>
used by this artist.</tt></dd></dl>
<dl><dt><a name="Figure-set_visible"><strong>set_visible</strong></a>(self, b)</dt><dd><tt>set the artist's visiblity<br>
<br>
ACCEPTS: [True | False]</tt></dd></dl>
<dl><dt><a name="Figure-set_zorder"><strong>set_zorder</strong></a>(self, level)</dt><dd><tt>Set the zorder for the artist<br>
<br>
ACCEPTS: any number</tt></dd></dl>
<dl><dt><a name="Figure-update"><strong>update</strong></a>(self, props)</dt></dl>
<dl><dt><a name="Figure-update_from"><strong>update_from</strong></a>(self, other)</dt><dd><tt>Copy properties from *other* to *self*.</tt></dd></dl>
<hr>
Data descriptors inherited from <a href="matplotlib.artist.html#Artist">matplotlib.artist.Artist</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</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>
<dl><dt><strong>zorder</strong> = 0</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="SubplotParams">class <strong>SubplotParams</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A class to hold the parameters for a subplot<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="SubplotParams-__init__"><strong>__init__</strong></a>(self, left<font color="#909090">=None</font>, bottom<font color="#909090">=None</font>, right<font color="#909090">=None</font>, top<font color="#909090">=None</font>, wspace<font color="#909090">=None</font>, hspace<font color="#909090">=None</font>)</dt><dd><tt>All dimensions are fraction of the figure width or height.<br>
All values default to their rc params<br>
<br>
The following attributes are available<br>
<br>
*left* = 0.125<br>
the left side of the subplots of the figure<br>
*right* = 0.9<br>
the right side of the subplots of the figure<br>
*bottom* = 0.1<br>
the bottom of the subplots of the figure<br>
*top* = 0.9<br>
the top of the subplots of the figure<br>
*wspace* = 0.2<br>
the amount of width reserved for blank space between subplots<br>
*hspace* = 0.2<br>
the amount of height reserved for white space between subplots<br>
*validate*<br>
make sure the params are in a legal state (*left*<*right*, etc)</tt></dd></dl>
<dl><dt><a name="SubplotParams-update"><strong>update</strong></a>(self, left<font color="#909090">=None</font>, bottom<font color="#909090">=None</font>, right<font color="#909090">=None</font>, top<font color="#909090">=None</font>, wspace<font color="#909090">=None</font>, hspace<font color="#909090">=None</font>)</dt><dd><tt>Update the current values. If any kwarg is None, default to<br>
the current value, if set, otherwise to rc</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> <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="-figaspect"><strong>figaspect</strong></a>(arg)</dt><dd><tt>Create a figure with specified aspect ratio. If *arg* is a number,<br>
use that aspect ratio. If *arg* is an array, figaspect will<br>
determine the width and height for a figure that would fit array<br>
preserving aspect ratio. The figure width, height in inches are<br>
returned. Be sure to create an axes with equal with and height,<br>
eg<br>
<br>
Example usage::<br>
<br>
# make a figure twice as tall as it is wide<br>
w, h = <a href="#-figaspect">figaspect</a>(2.)<br>
fig = <a href="#Figure">Figure</a>(figsize=(w,h))<br>
ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])<br>
ax.imshow(A, **kwargs)<br>
<br>
<br>
# make a figure with the proper aspect for an array<br>
A = rand(5,3)<br>
w, h = <a href="#-figaspect">figaspect</a>(A)<br>
fig = <a href="#Figure">Figure</a>(figsize=(w,h))<br>
ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])<br>
ax.imshow(A, **kwargs)<br>
<br>
Thanks to Fernando Perez for this function</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> <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>rcParams</strong> = {'figure.subplot.right': 0.90000000000000002, 'm...persize': 'letter', 'svg.embed_char_paths': True}</td></tr></table>
@footer@