511 lines (462 with data), 48.0 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>.transforms</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/lib/python2.5/site-packages/matplotlib/transforms.py">/home/jdhunter/dev/lib/python2.5/site-packages/matplotlib/transforms.py</a></font></td></tr></table>
<p><tt>The transforms module is broken into two parts, a collection of<br>
classes written in the extension module _transforms to handle<br>
efficient transformation of data, and some helper functions in<br>
transforms to make it easy to instantiate and use those objects.<br>
Hence the core of this module lives in _transforms.<br>
<br>
The transforms class is built around the idea of a LazyValue. A<br>
LazyValue is a base class that defines a method get that returns the<br>
value. The concrete derived class Value wraps a float, and simply<br>
returns the value of that float. The concrete derived class BinOp<br>
allows binary operations on LazyValues, so you can add them, multiply<br>
them, etc. When you do something like<br>
<br>
inches = <a href="#-Value">Value</a>(8)<br>
dpi = <a href="#-Value">Value</a>(72)<br>
width = inches * dpi<br>
<br>
width is a BinOp instance (that tells you the width of the figure in<br>
pixels). Later, if the figure size in changed, ie we call<br>
<br>
inches.set(10)<br>
<br>
The width variable is automatically updated because it stores a<br>
pointer to the inches variable, not the value. Since a BinOp is also<br>
a lazy value, you can define binary operations on BinOps as well, such<br>
as<br>
<br>
middle = <a href="#-Value">Value</a>(0.5) * width<br>
<br>
Pairs of LazyValue instances can occur as instances of two classes:<br>
<br>
pt = <a href="#-Point">Point</a>( <a href="#-Value">Value</a>(x), <a href="#-Value">Value</a>(y)) # where x, y are numbers<br>
pt.x(), pt.y() return <a href="#-Value">Value</a>(x), <a href="#-Value">Value</a>(y))<br>
<br>
iv = <a href="#-Interval">Interval</a>( <a href="#-Value">Value</a>(x), <a href="#-Value">Value</a>(y))<br>
iv.contains(z) returns True if z is in the closed interval<br>
iv.contains_open(z): same for open interval<br>
iv.span() returns y-x as a float<br>
iv.get_bounds() returns (x,y) as a tuple of floats<br>
iv.set_bounds(x, y) allows input of new floats<br>
iv.update(seq) updates the bounds to include all elements<br>
in a sequence of floats<br>
iv.shift(s) shifts the interval by s, a float<br>
<br>
The bounding box class Bbox is also heavily used, and is defined by a<br>
lower left point ll and an upper right point ur. The points ll and ur<br>
are given by <a href="#-Point">Point</a>(x, y) instances, where x and y are LazyValues. So<br>
you can represent a point such as<br>
<br>
ll = <a href="#-Point">Point</a>( <a href="#-Value">Value</a>(0), <a href="#-Value">Value</a>(0) ) # the origin<br>
ur = <a href="#-Point">Point</a>( width, height ) # the upper right of the figure<br>
<br>
where width and height are defined as above, using the product of the<br>
figure width in inches and the dpi. This is, in face, how the Figure<br>
bbox is defined<br>
<br>
bbox = <a href="#-Bbox">Bbox</a>(ll, ur)<br>
<br>
A bbox basically defines an x,y coordinate system, with ll giving the<br>
lower left of the coordinate system and ur giving the upper right.<br>
<br>
The bbox methods are<br>
<br>
ll() - return the lower left Point<br>
ur() - return the upper right Point<br>
contains(x,y) - return True if self contains point<br>
overlaps(bbox) - return True if self overlaps bbox<br>
overlapsx(bbox) - return True if self overlaps bbox in the x interval<br>
overlapsy(bbox) - return True if self overlaps bbox in the y interval<br>
intervalx() - return the x Interval instance<br>
intervaly() - return the y interval instance<br>
get_bounds() - get the left, bottom, width, height bounding tuple<br>
update(xys, ignore) - update the bbox to bound all the xy tuples in<br>
xys; if ignore is true ignore the current contents of bbox and<br>
just bound the tuples. If ignore is false, bound self + tuples<br>
width() - return the width of the bbox<br>
height() - return the height of the bbox<br>
xmax() - return the x coord of upper right<br>
ymax() - return the y coord of upper right<br>
xmin() - return the x coord of lower left<br>
ymin() - return the y coord of lower left<br>
scale(sx,sy) - scale the bbox by sx, sy<br>
deepcopy() - return a deep copy of self (pointers are lost)<br>
<br>
<br>
The basic transformation maps one bbox to another, with an optional<br>
nonlinear transformation of one of coordinates (eg log scaling).<br>
<br>
The base class for transformations is Transformation, and the concrete<br>
derived classes are SeparableTransformation and Affine. Earlier<br>
versions of matplotlib handled transformation of x and y separately<br>
(ie we assumed all transformations were separable) but this makes it<br>
difficult to do rotations or polar transformations, for example. All<br>
artists contain their own transformation, defaulting to the identity<br>
transform.<br>
<br>
The signature of a separable transformation instance is<br>
<br>
trans = <a href="#-SeparableTransformation">SeparableTransformation</a>(bbox1, bbox2, funcx, funcy)<br>
<br>
where funcx and funcy operate on x and y. The typical linear<br>
coordinate transformation maps one bounding box to another, with funcx<br>
and funcy both identity. Eg,<br>
<br>
transData = Transformation(viewLim, displayLim,<br>
<a href="#-Func">Func</a>(IDENTITY), <a href="#-Func">Func</a>(IDENTITY))<br>
<br>
maps the axes view limits to display limits. If the xaxis scaling is<br>
changed to log, one simply calls<br>
<br>
transData.get_funcx().set_type(LOG10)<br>
<br>
For more general transformations including rotation, the Affine class<br>
is provided, which is constructed with 6 LazyValue instances:<br>
a, b, c, d, tx, ty. These give the values of the matrix transformation<br>
<br>
[xo = |a c| [xi + [tx<br>
yo] |b d| yi] ty]<br>
<br>
where if sx, sy are the scaling components, tx, y are the translation<br>
components, and alpha is the rotation<br>
<br>
a = sx*cos(alpha);<br>
b = -sx*sin(alpha);<br>
c = sy*sin(alpha);<br>
d = sy*cos(alpha);<br>
<br>
The affine transformation can be accomplished for row vectors with a<br>
single matrix multiplication<br>
X_new = X_old * M<br>
where<br>
M = [ a b 0<br>
c d 0<br>
tx ty 1]<br>
and each X is the row vector [x, y, 1]. Hence M is<br>
the transpose of the matrix representation given in<br>
<a href="http://en.wikipedia.org/wiki/Affine_transformation">http://en.wikipedia.org/wiki/Affine_transformation</a>,<br>
which is for the more usual column-vector representation<br>
of the position.)<br>
<br>
<br>
<br>
From a user perspective, the most important Tranformation methods are<br>
<br>
All transformations<br>
-------------------<br>
freeze() - eval and freeze the lazy objects<br>
thaw() - release the lazy objects<br>
<br>
xy_tup(xy) - transform the tuple (x,y)<br>
seq_x_y(x, y) - transform the python sequences x and y<br>
numerix_x_y(x, y) - x and y are numerix 1D arrays<br>
numerix_xy(xy) - xy is a numerix array of shape (N,2)<br>
inverse_numerix_xy(xy)- inverse of the above<br>
seq_xy_tups(seq) - seq is a sequence of xy tuples or a (N,2) array<br>
inverse_xy_tup(xy) - apply the inverse transformation to tuple xy<br>
<br>
set_offset(xy, trans) - xy is an x,y tuple and trans is a<br>
Transformation instance. This will apply a post transformational<br>
offset of all future transformations by xt,yt = trans.xy_tup(xy[0], xy[1])<br>
<br>
deepcopy() - returns a deep copy; references are lost<br>
shallowcopy() - returns a shallow copy excluding the offset<br>
<br>
Separable transformations<br>
-------------------------<br>
<br>
get_bbox1() - return the input bbox<br>
get_bbox2() - return the output bbox<br>
set_bbox1() - set the input bbox<br>
set_bbox2() - set the output bbox<br>
get_funcx() - return the Func instance on x<br>
get_funcy() - return the Func instance on y<br>
set_funcx() - set the Func instance on x<br>
set_funcy() - set the Func instance on y<br>
<br>
<br>
Affine transformations<br>
----------------------<br>
<br>
as_vec6() - return the affine as length 6 <a href="__builtin__.html#list">list</a> of Values<br>
<br>
<br>
In general, you shouldn't need to construct your own transformations,<br>
but should use the helper functions defined in this module.<br>
<br>
<br>
zero - return <a href="#-Value">Value</a>(0)<br>
one - return <a href="#-Value">Value</a>(1)<br>
origin - return <a href="#-Point">Point</a>(<a href="#-zero">zero</a>(), <a href="#-zero">zero</a>())<br>
unit_bbox - return the 0,0 to 1,1 bounding box<br>
identity_affine - An affine identity transformation<br>
identity_transform - An identity separable transformation<br>
translation_transform - a pure translational affine<br>
scale_transform - a pure scale affine<br>
scale_sep_transform - a pure scale separable transformation<br>
scale_translation_transform - a scale and translate affine<br>
bound_vertices - return the bbox that bounds all the xy tuples<br>
bbox_all - return the bbox that bounds all the bboxes<br>
lbwh_to_bbox - build a bbox from tuple<br>
left, bottom, width, height tuple<br>
<br>
multiply_affines - return the affine that is the matrix product of<br>
the two affines<br>
<br>
get_bbox_transform - return a SeparableTransformation instance that<br>
transforms one bbox to another<br>
<br>
blend_xy_sep_transform - mix the x and y components of two separable<br>
transformations into a new transformation.<br>
This allows you to specify x and y in<br>
different coordinate systems<br>
<br>
transform_bbox - apply a transformation to a bbox and return the<br>
transformed bbox<br>
<br>
inverse_transform_bbox - apply the inverse transformation of a bbox<br>
and return the inverse transformed bbox<br>
<br>
offset_copy - make a copy with an offset<br>
<br>
<br>
The units/transform_unit.py code has many examples.<br>
<br>
A related and partly overlapping class, <a href="#PBox">PBox</a>, has been added to the<br>
original transforms module to facilitate Axes repositioning and resizing.<br>
At present, the differences between Bbox and <a href="#PBox">PBox</a> include:<br>
<br>
Bbox works with the bounding box, the coordinates of the lower-left<br>
and upper-right corners; <a href="#PBox">PBox</a> works with the lower-left coordinates<br>
and the width, height pair (left, bottom, width, height, or 'lbwh').<br>
Obviously, these are equivalent, but lbwh is what is used by<br>
Axes._position, and it is the natural specification for the types of<br>
manipulations for which the <a href="#PBox">PBox</a> class was made.<br>
<br>
Bbox uses LazyValues grouped in pairs as 'll' and 'ur' Point objects;<br>
<a href="#PBox">PBox</a> uses a 4-element <a href="__builtin__.html#list">list</a>, subclassed from the python <a href="__builtin__.html#list">list</a>.<br>
<br>
Bbox and <a href="#PBox">PBox</a> methods are mostly quite different, reflecting their<br>
different original purposes. Similarly, the CXX implementation of<br>
Bbox is good for methods such as update and for lazy evaluation, but<br>
for <a href="#PBox">PBox</a> intended uses, involving very little calculation, pure<br>
python probably is adequate.<br>
<br>
In the future we may reimplement the <a href="#PBox">PBox</a> using Bbox<br>
and transforms, or eliminate it entirely by adding its methods<br>
and attributes to Bbox and/or putting them elsewhere in this module.</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="math.html">math</a><br>
</td><td width="25%" valign=top><a href="numpy.html">numpy</a><br>
</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> <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="__builtin__.html#list">__builtin__.list</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.transforms.html#PBox">PBox</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="PBox">class <strong>PBox</strong></a>(<a href="__builtin__.html#list">__builtin__.list</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A left-bottom-width-height (lbwh) specification of a bounding box,<br>
such as is used to specify the position of an Axes object within<br>
a Figure.<br>
It is a 4-element <a href="__builtin__.html#list">list</a> with methods for changing the size, shape,<br>
and position relative to its container.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="matplotlib.transforms.html#PBox">PBox</a></dd>
<dd><a href="__builtin__.html#list">__builtin__.list</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="PBox-__init__"><strong>__init__</strong></a>(self, box, container<font color="#909090">=None</font>, llur<font color="#909090">=False</font>)</dt></dl>
<dl><dt><a name="PBox-anchor"><strong>anchor</strong></a>(self, c, container<font color="#909090">=None</font>)</dt><dd><tt>Shift to position c within its container.<br>
<br>
c can be a sequence (cx, cy) where cx, cy range from 0 to 1,<br>
where 0 is left or bottom and 1 is right or top.<br>
<br>
Alternatively, c can be a string: C for centered,<br>
S for bottom-center, SE for bottom-left, E for left, etc.<br>
<br>
Optional arg container is the lbwh box within which the<br>
<a href="#PBox">PBox</a> is positioned; it defaults to the initial<br>
<a href="#PBox">PBox</a>.</tt></dd></dl>
<dl><dt><a name="PBox-as_llur"><strong>as_llur</strong></a>(self)</dt></dl>
<dl><dt><a name="PBox-get_container"><strong>get_container</strong></a>(self, box)</dt></dl>
<dl><dt><a name="PBox-set_container"><strong>set_container</strong></a>(self, box<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="PBox-shrink"><strong>shrink</strong></a>(self, mx, my)</dt><dd><tt>Shrink the box by mx in the x direction and my in the y direction.<br>
The lower left corner of the box remains unchanged.<br>
Normally mx and my will be <= 1, but this is not enforced.</tt></dd></dl>
<dl><dt><a name="PBox-shrink_to_aspect"><strong>shrink_to_aspect</strong></a>(self, box_aspect, fig_aspect<font color="#909090">=1</font>)</dt><dd><tt>Shrink the box so that it is as large as it can be while<br>
having the desired aspect ratio, box_aspect.<br>
If the box coordinates are relative--that is, fractions of<br>
a larger box such as a figure--then the physical aspect<br>
ratio of that figure is specified with fig_aspect, so<br>
that box_aspect can also be given as a ratio of the<br>
absolute dimensions, not the relative dimensions.</tt></dd></dl>
<dl><dt><a name="PBox-splitx"><strong>splitx</strong></a>(self, *args)</dt><dd><tt>e.g., PB.<a href="#PBox-splitx">splitx</a>(f1, f2, ...)<br>
<br>
Returns a <a href="__builtin__.html#list">list</a> of new PBoxes formed by<br>
splitting the original one (PB) with vertical lines<br>
at fractional positions f1, f2, ...</tt></dd></dl>
<dl><dt><a name="PBox-splity"><strong>splity</strong></a>(self, *args)</dt><dd><tt>e.g., PB.<a href="#PBox-splity">splity</a>(f1, f2, ...)<br>
<br>
Returns a <a href="__builtin__.html#list">list</a> of new PBoxes formed by<br>
splitting the original one (PB) with horizontal lines<br>
at fractional positions f1, f2, ..., with y measured<br>
positive up.</tt></dd></dl>
<hr>
Data descriptors defined here:<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 defined here:<br>
<dl><dt><strong>coefs</strong> = {'C': (0.5, 0.5), 'E': (1.0, 0.5), 'N': (0.5, 1.0), 'NE': (1.0, 1.0), 'NW': (0, 1.0), 'S': (0.5, 0), 'SE': (1.0, 0), 'SW': (0, 0), 'W': (0, 0.5)}</dl>
<hr>
Methods inherited from <a href="__builtin__.html#list">__builtin__.list</a>:<br>
<dl><dt><a name="PBox-__add__"><strong>__add__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__add__">__add__</a>(y) <==> x+y</tt></dd></dl>
<dl><dt><a name="PBox-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__contains__">__contains__</a>(y) <==> y in x</tt></dd></dl>
<dl><dt><a name="PBox-__delitem__"><strong>__delitem__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__delitem__">__delitem__</a>(y) <==> del x[y]</tt></dd></dl>
<dl><dt><a name="PBox-__delslice__"><strong>__delslice__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__delslice__">__delslice__</a>(i, j) <==> del x[i:j]<br>
<br>
Use of negative indices is not supported.</tt></dd></dl>
<dl><dt><a name="PBox-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__eq__">__eq__</a>(y) <==> x==y</tt></dd></dl>
<dl><dt><a name="PBox-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__ge__">__ge__</a>(y) <==> x>=y</tt></dd></dl>
<dl><dt><a name="PBox-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
<dl><dt><a name="PBox-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
<dl><dt><a name="PBox-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br>
<br>
Use of negative indices is not supported.</tt></dd></dl>
<dl><dt><a name="PBox-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__gt__">__gt__</a>(y) <==> x>y</tt></dd></dl>
<dl><dt><a name="PBox-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__hash__">__hash__</a>() <==> hash(x)</tt></dd></dl>
<dl><dt><a name="PBox-__iadd__"><strong>__iadd__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__iadd__">__iadd__</a>(y) <==> x+=y</tt></dd></dl>
<dl><dt><a name="PBox-__imul__"><strong>__imul__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__imul__">__imul__</a>(y) <==> x*=y</tt></dd></dl>
<dl><dt><a name="PBox-__iter__"><strong>__iter__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__iter__">__iter__</a>() <==> iter(x)</tt></dd></dl>
<dl><dt><a name="PBox-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__le__">__le__</a>(y) <==> x<=y</tt></dd></dl>
<dl><dt><a name="PBox-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__len__">__len__</a>() <==> len(x)</tt></dd></dl>
<dl><dt><a name="PBox-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__lt__">__lt__</a>(y) <==> x<y</tt></dd></dl>
<dl><dt><a name="PBox-__mul__"><strong>__mul__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__mul__">__mul__</a>(n) <==> x*n</tt></dd></dl>
<dl><dt><a name="PBox-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__ne__">__ne__</a>(y) <==> x!=y</tt></dd></dl>
<dl><dt><a name="PBox-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl>
<dl><dt><a name="PBox-__reversed__"><strong>__reversed__</strong></a>(...)</dt><dd><tt>L.<a href="#PBox-__reversed__">__reversed__</a>() -- return a reverse iterator over the <a href="__builtin__.html#list">list</a></tt></dd></dl>
<dl><dt><a name="PBox-__rmul__"><strong>__rmul__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__rmul__">__rmul__</a>(n) <==> n*x</tt></dd></dl>
<dl><dt><a name="PBox-__setitem__"><strong>__setitem__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__setitem__">__setitem__</a>(i, y) <==> x[i]=y</tt></dd></dl>
<dl><dt><a name="PBox-__setslice__"><strong>__setslice__</strong></a>(...)</dt><dd><tt>x.<a href="#PBox-__setslice__">__setslice__</a>(i, j, y) <==> x[i:j]=y<br>
<br>
Use of negative indices is not supported.</tt></dd></dl>
<dl><dt><a name="PBox-append"><strong>append</strong></a>(...)</dt><dd><tt>L.<a href="#PBox-append">append</a>(object) -- append object to end</tt></dd></dl>
<dl><dt><a name="PBox-count"><strong>count</strong></a>(...)</dt><dd><tt>L.<a href="#PBox-count">count</a>(value) -> integer -- return number of occurrences of value</tt></dd></dl>
<dl><dt><a name="PBox-extend"><strong>extend</strong></a>(...)</dt><dd><tt>L.<a href="#PBox-extend">extend</a>(iterable) -- extend <a href="__builtin__.html#list">list</a> by appending elements from the iterable</tt></dd></dl>
<dl><dt><a name="PBox-index"><strong>index</strong></a>(...)</dt><dd><tt>L.<a href="#PBox-index">index</a>(value, [start, [stop]]) -> integer -- return first index of value</tt></dd></dl>
<dl><dt><a name="PBox-insert"><strong>insert</strong></a>(...)</dt><dd><tt>L.<a href="#PBox-insert">insert</a>(index, object) -- insert object before index</tt></dd></dl>
<dl><dt><a name="PBox-pop"><strong>pop</strong></a>(...)</dt><dd><tt>L.<a href="#PBox-pop">pop</a>([index]) -> item -- remove and return item at index (default last)</tt></dd></dl>
<dl><dt><a name="PBox-remove"><strong>remove</strong></a>(...)</dt><dd><tt>L.<a href="#PBox-remove">remove</a>(value) -- remove first occurrence of value</tt></dd></dl>
<dl><dt><a name="PBox-reverse"><strong>reverse</strong></a>(...)</dt><dd><tt>L.<a href="#PBox-reverse">reverse</a>() -- reverse *IN PLACE*</tt></dd></dl>
<dl><dt><a name="PBox-sort"><strong>sort</strong></a>(...)</dt><dd><tt>L.<a href="#PBox-sort">sort</a>(cmp=None, key=None, reverse=False) -- stable sort *IN PLACE*;<br>
cmp(x, y) -> -1, 0, 1</tt></dd></dl>
<hr>
Data and other attributes inherited from <a href="__builtin__.html#list">__builtin__.list</a>:<br>
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x8144360><dd><tt>T.<a href="#PBox-__new__">__new__</a>(S, ...) -> a new object with type S, a subtype of T</tt></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="-Affine"><strong>Affine</strong></a>(...)</dt><dd><tt><a href="#-Affine">Affine</a>(a,b,c,d,tx,ty)</tt></dd></dl>
<dl><dt><a name="-Bbox"><strong>Bbox</strong></a>(...)</dt><dd><tt><a href="#-Bbox">Bbox</a>(ll, ur)</tt></dd></dl>
<dl><dt><a name="-Func"><strong>Func</strong></a>(...)</dt><dd><tt><a href="#-Func">Func</a>(typecode)</tt></dd></dl>
<dl><dt><a name="-FuncXY"><strong>FuncXY</strong></a>(...)</dt><dd><tt><a href="#-FuncXY">FuncXY</a>(funcx, funcy)</tt></dd></dl>
<dl><dt><a name="-Interval"><strong>Interval</strong></a>(...)</dt><dd><tt><a href="#-Interval">Interval</a>(val1, val2)</tt></dd></dl>
<dl><dt><a name="-NonseparableTransformation"><strong>NonseparableTransformation</strong></a>(...)</dt><dd><tt><a href="#-NonseparableTransformation">NonseparableTransformation</a>(box1, box2, funcxy))</tt></dd></dl>
<dl><dt><a name="-Point"><strong>Point</strong></a>(...)</dt><dd><tt><a href="#-Point">Point</a>(x, y)</tt></dd></dl>
<dl><dt><a name="-SeparableTransformation"><strong>SeparableTransformation</strong></a>(...)</dt><dd><tt><a href="#-SeparableTransformation">SeparableTransformation</a>(box1, box2, funcx, funcy))</tt></dd></dl>
<dl><dt><a name="-Value"><strong>Value</strong></a>(...)</dt><dd><tt><a href="#-Value">Value</a>(x)</tt></dd></dl>
<dl><dt><a name="-bbox_all"><strong>bbox_all</strong></a>(bboxes)</dt><dd><tt>Return the Bbox that bounds all bboxes</tt></dd></dl>
<dl><dt><a name="-blend_xy_sep_transform"><strong>blend_xy_sep_transform</strong></a>(trans1, trans2)</dt><dd><tt>If trans1 and trans2 are SeparableTransformation instances, you can<br>
build a new SeparableTransformation from them by extracting the x and y<br>
bounding points and functions and recomposing a new SeparableTransformation<br>
<br>
This function extracts all the relevant bits from trans1 and<br>
trans2 and returns the new Transformation instance. This is<br>
useful, for example, if you want to specify x in data coordinates<br>
and y in axes coordinates.</tt></dd></dl>
<dl><dt><a name="-bound_vertices"><strong>bound_vertices</strong></a>(verts)</dt><dd><tt>Return the Bbox of the sequence of x,y tuples in verts</tt></dd></dl>
<dl><dt><a name="-get_bbox_transform"><strong>get_bbox_transform</strong></a>(boxin, boxout)</dt><dd><tt>return the transform that maps transform one bounding box to<br>
another</tt></dd></dl>
<dl><dt><a name="-get_vec6_rotation"><strong>get_vec6_rotation</strong></a>(v)</dt><dd><tt>v is an affine vec6 a,b,c,d,tx,ty; return rotation in degrees</tt></dd></dl>
<dl><dt><a name="-get_vec6_scales"><strong>get_vec6_scales</strong></a>(v)</dt><dd><tt>v is an affine vec6 a,b,c,d,tx,ty; return sx, sy</tt></dd></dl>
<dl><dt><a name="-identity_affine"><strong>identity_affine</strong></a>()</dt><dd><tt>Get an affine transformation that maps x,y -> x,y</tt></dd></dl>
<dl><dt><a name="-identity_transform"><strong>identity_transform</strong></a>()</dt><dd><tt>Get an affine transformation that maps x,y -> x,y</tt></dd></dl>
<dl><dt><a name="-inverse_transform_bbox"><strong>inverse_transform_bbox</strong></a>(trans, bbox)</dt><dd><tt>inverse transform the bbox</tt></dd></dl>
<dl><dt><a name="-invert_vec6"><strong>invert_vec6</strong></a>(v)</dt><dd><tt>v is a,b,c,d,tx,ty vec6 repr of an affine transformation.<br>
Return the inverse of v as a vec6</tt></dd></dl>
<dl><dt><a name="-lbwh_to_bbox"><strong>lbwh_to_bbox</strong></a>(l, b, w, h)</dt></dl>
<dl><dt><a name="-multiply_affines"><strong>multiply_affines</strong></a>(v1, v2)</dt><dd><tt>v1 and v2 are Affine instances</tt></dd></dl>
<dl><dt><a name="-nonsingular"><strong>nonsingular</strong></a>(vmin, vmax, expander<font color="#909090">=0.001</font>, tiny<font color="#909090">=1.0000000000000001e-15</font>, increasing<font color="#909090">=True</font>)</dt><dd><tt>Ensure the endpoints of a range are not too close together.<br>
<br>
"too close" means the interval is smaller than 'tiny' times<br>
the maximum absolute value.<br>
<br>
If they are too close, each will be moved by the 'expander'.<br>
If 'increasing' is True and vmin > vmax, they will be swapped,<br>
regardless of whether they are too close.</tt></dd></dl>
<dl><dt><a name="-offset_copy"><strong>offset_copy</strong></a>(trans, fig<font color="#909090">=None</font>, x<font color="#909090">=0</font>, y<font color="#909090">=0</font>, units<font color="#909090">='inches'</font>)</dt><dd><tt>Return a shallow copy of a transform with an added offset.<br>
args:<br>
trans is any transform<br>
kwargs:<br>
fig is the current figure; it can be None if units are 'dots'<br>
x, y give the offset<br>
units is 'inches', 'points' or 'dots'</tt></dd></dl>
<dl><dt><a name="-one"><strong>one</strong></a>()</dt></dl>
<dl><dt><a name="-origin"><strong>origin</strong></a>()</dt></dl>
<dl><dt><a name="-scale_sep_transform"><strong>scale_sep_transform</strong></a>(sx, sy)</dt><dd><tt>Return a pure scale transformation as a SeparableTransformation;<br>
sx and sy are LazyValue instances (Values or binary opertations on<br>
values)</tt></dd></dl>
<dl><dt><a name="-scale_transform"><strong>scale_transform</strong></a>(sx, sy)</dt><dd><tt>Return a pure scale transformation as an Affine instance; sx and<br>
sy are LazyValue instances (Values or binary opertations on<br>
values)</tt></dd></dl>
<dl><dt><a name="-transform_bbox"><strong>transform_bbox</strong></a>(trans, bbox)</dt><dd><tt>transform the bbox to a new bbox</tt></dd></dl>
<dl><dt><a name="-translation_transform"><strong>translation_transform</strong></a>(tx, ty)</dt><dd><tt>return a pure tranlational transformation tx and ty are LazyValue<br>
instances (Values or binary operations on values)</tt></dd></dl>
<dl><dt><a name="-unit_bbox"><strong>unit_bbox</strong></a>()</dt><dd><tt>Get a 0,0 -> 1,1 Bbox instance</tt></dd></dl>
<dl><dt><a name="-zero"><strong>zero</strong></a>()</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>IDENTITY</strong> = 0<br>
<strong>LOG10</strong> = 1<br>
<strong>POLAR</strong> = 0<br>
<strong>division</strong> = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)</td></tr></table>
@footer@