)Uc @sgdZddlZddlZddljZddlZddlj Z ddl j Z ddl jZddlmZddljZddljZddlmZddljZddljZddljZdejejfdYZejj dddefd YZ!d efd YZ"d e"fd YZ#defdYZ$de$fdYZ%de$fdYZ&defdYZ'defdYZ(defdYZ)defdYZ*defdYZ+ej,eZ-x@dd d ddddddf D]Z.ejj ie-e.6q&Wejj dej,e'dS(su Classes for the efficient drawing of large collections of objects that share most properties, e.g. a large number of line segments or polygons. The classes are not meant to be as flexible as their single element counterparts (e.g. you may not be able to select all line styles) but they are meant to be fast for common use cases (e.g. a large set of solid line segemnts) iN(t docstring(tallow_rasterizationt Collectionc BseZdZejgejZejZ gZ dZ d)d)d)dd)d)d)d)d)dd)d Z edZedZdZdZd Zd Zd Zd Zed ZdZdZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)dZ*d Z+e+Z,d!Z-e-Z.d"Z/d#Z0d$Z1d%Z2e2Z3d&Z4e4Z5Z6d'Z7d(Z8RS(*s Base class for Collections. Must be subclassed to be usable. All properties in a collection must be sequences or scalars; if scalars, they will be converted to sequences. The property of the ith element of the collection is:: prop[i % len(props)] Keyword arguments and default values: * *edgecolors*: None * *facecolors*: None * *linewidths*: None * *antialiaseds*: None * *offsets*: None * *transOffset*: transforms.IdentityTransform() * *norm*: None (optional for :class:`matplotlib.cm.ScalarMappable`) * *cmap*: None (optional for :class:`matplotlib.cm.ScalarMappable`) *offsets* and *transOffset* are used to translate the patch after rendering (default no offsets). If any of *edgecolors*, *facecolors*, *linewidths*, *antialiaseds* are None, they default to their :data:`matplotlib.rcParams` patch setting, in sequence form. The use of :class:`~matplotlib.cm.ScalarMappable` is optional. If the :class:`~matplotlib.cm.ScalarMappable` matrix _A is not None (ie a call to set_array has been made), at draw time a call to scalar mappable will be made to set the face colors. itsolidg@c Ks1tjj|tjj||| |j||j||j||j||j ||j | d|_ t jgt j|_|dk rt j|}t|jdkr|t jddf}n|dk r||_||_q||_ n| |_|j| d|_dS(s= Create a Collection %(Collection)s iN(tartisttArtistt__init__tcmtScalarMappablet set_edgecolort set_facecolort set_linewidtht set_linestyletset_antialiasedtset_urlstNonet_uniform_offsetstnptarraytfloat_t_offsetstasarraytlentshapetnewaxist _transOffsett _pickradiustupdatet_paths( tselft edgecolorst facecolorst linewidthst linestylest antialiasedstoffsetst transOffsettnormtcmapt pickradiusturlstkwargs((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRBs*              cCsyt|fSWn_tk rrtj|rst|rsyt|dWnttfk rgqoX|SqsnXtddS(Nis1val must be a float or nonzero sequence of floats(tfloatt TypeErrortcbooktiterableRt ValueError(tval((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyt _get_valueps  cCsWtj|s|f}nyt|dWn#ttfk rRtdnX|S(Nis.val must be a bool or nonzero sequence of them(R,R-tboolR+t IndexError(R/((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyt _get_bools cCs|jS(N(R(R((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyt get_pathsscCs tdS(N(tNotImplementedError(R((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyt set_pathsscCs|jS(N(t _transforms(R((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pytget_transformsscCs|j}|j}|j}|j}|jsdg|D]}|j|^q:}|j}n|js|j|}|j}ntj |tj }t j |j ||j||j }|j|}|S(N(t get_transformRRR4t is_affinettransform_path_non_affinet get_affinettransform_non_affineRRRtmpathtget_path_collection_extentstfrozenR8tinverse_transformed(Rt transDatat transformR$R#tpathstptresult((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyt get_datalims      " cCs|jtj}|S(N(RGt transformstIdentityTransform(Rtrenderertbbox((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pytget_window_extentsc Cs|j}|j}|j}|j}|jr4g}x|jD]}|j}|dddf|dddf}}|j|}|j|}|jt j t |||j qIWt |jr4|j|jdddf}|j|jdddf}t ||}q4ntj|tj}|jsg|D]}|j|^qY}|j}n|js|j|}|j}n||||fS(s&Point prep for drawing and hit testingNii(R9RRR4t have_unitstverticestconvert_xunitstconvert_yunitstappendR>tPathtziptcodesRRRRR:R;R<R=( RRCR$R#RDtpathRNtxstys((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyt_prepare_pointss0      -)"" " c Cs|jsdS|j|jj|j|j\}}}}|j}|j||j|j |j ||j ||j |||j |j|j|j|j|j |j|j|jjdS(N(t get_visiblet open_groupt __class__t__name__tupdate_scalarmappableRXtnew_gct _set_gc_cliptset_snaptget_snaptdraw_path_collectionR@R8t get_facecolort get_edgecolort _linewidthst _linestylest _antialiasedst_urlstrestoret close_group(RRJRCR$R#RDtgc((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pytdraws     c Cst|jr|j||S|js5tifS|j\}}}}tj|j|j|j |j ||j ||t |j dk }t |dktd|fS(s Test whether the mouse event occurred in the collection. Returns True | False, ``dict(ind=itemlist)``, where every item in itemlist contains the event. itind(tcallablet _containsRYtFalseRXR>tpoint_in_path_collectiontxtyRR@R8Rt _facecolorstdict(Rt mouseeventRCR$R#RDRm((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pytcontainss cCs d|_dS(Ni(R'(RR'((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pytset_pickradiusscCs|jS(N(R'(R((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pytget_pickradiusscCs(|dkrdg|_n ||_dS(N(RRh(RR(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRs cCs|jS(N(Rh(R((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pytget_urlsscCsntj|tj}t|jdkrF|tjddf}n|jdkra||_n ||_dS(s Set the offsets for the collection. *offsets* can be a scalar or a sequence. ACCEPTS: float or sequence of floats iN( RRRRRRRRR(RR#((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyt set_offsetss  cCs!|jdkr|jS|jSdS(s8 Return the offsets for the collection. N(RRR(R((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyt get_offsets scCs2|dkrtjd}n|j||_dS(s Set the linewidth(s) for the collection. *lw* can be a scalar or a sequence; if it is a sequence the patches will cycle through the sequence ACCEPTS: float or sequence of floats spatch.linewidthN(RtmpltrcParamsR0Re(Rtlw((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyR s cCs |j|S(salias for set_linewidth(R (RR((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pytset_linewidths"scCs |j|S(salias for set_linewidth(R (RR((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pytset_lw&scCsyztjj}tj|rl||kr:||g}qy|tjkr`|tj|g}qytn tj|rpyg}x|D]}tj|r||kr|j||q0|tjkr|j|tj|q0tqtj|r't |dkr'|j|qtqWWqytk rlt |dkr`|}qmtqyXn tWn!tk rtd|nX||_ dS(s Set the linestyle(s) for the collection. ACCEPTS: ['solid' | 'dashed', 'dashdot', 'dotted' | (offset, on-off-dash-seq) ] is'Do not know how to convert %s to dashesN( t backend_basestGraphicsContextBasetdashdR,tis_string_liket ls_mapperR.R-RQRRf(RtlsRtdashesRr((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyR *s:      !    cCs |j|S(salias for set_linestyle(R (RR((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pytset_linestylesTscCs |j|S(salias for set_linestyle(R (RR((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyt set_dashesXscCs2|dkrtjd}n|j||_dS(sm Set the antialiasing state for rendering. ACCEPTS: Boolean or sequence of booleans spatch.antialiasedN(RR}R~R3Rg(Rtaa((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyR \s cCs |j|S(salias for set_antialiased(R (RR((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pytset_antialiasedsfscCs|j||j|dS(s  Set both the edgecolor and the facecolor. ACCEPTS: matplotlib color arg or sequence of rgba tuples .. seealso:: :meth:`set_facecolor`, :meth:`set_edgecolor` For setting the edge or face color individually. N(R R (Rtc((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyt set_colorjs cCst|_y"|jdkr*t|_nWntk r>nX|dkr[tjd}n||_t j j ||j |_ dS(sm Set the facecolor(s) of the collection. *c* can be a matplotlib color arg (all patches have same color), or a sequence of rgba tuples; if it is a sequence the patches will cycle through the sequence. If *c* is 'none', the patch will not be filled. ACCEPTS: matplotlib color arg or sequence of rgba tuples tnonespatch.facecolorN(tTruet _is_filledtlowerRptAttributeErrorRR}R~t_facecolors_originaltmcolorstcolorConvertert to_rgba_arrayt_alphaRt(RR((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyR xs    cCs |j|S(salias for set_facecolor(R (RR((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pytset_facecolorsscCs|jS(N(Rt(R((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRcscCs$|jdkr|jS|jSdS(Ntface(t _edgecolorstget_facecolors(R((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRds cCst|_y"|jdkr*t|_nWntk r>nX|dkr`d|_d|_n@|dkr|tj d}n||_t j j ||j |_dS(s Set the edgecolor(s) of the collection. *c* can be a matplotlib color arg (all patches have same color), or a sequence of rgba tuples; if it is a sequence the patches will cycle through the sequence. If *c* is 'face', the edge color will always be the same as the face color. If it is 'none', the patch boundary will not be drawn. ACCEPTS: matplotlib color arg or sequence of rgba tuples RRspatch.edgecolorN(Rt _is_strokedRRpRRt_edgecolors_originalRR}R~RRRR(RR((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyR s       cCs |j|S(salias for set_edgecolor(R (RR((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pytset_edgecolorsscCs|dk r=yt|Wq=tk r9tdq=Xntjj||y"tjj|j |j |_ Wnt tt fk rnXy4|jdkrtjj|j|j |_nWnt tt fk rnXdS(s Set the alpha tranparencies of the collection. *alpha* must be a float or *None*. ACCEPTS: float or None salpha must be a float or NoneRN(RR*R+RRt set_alphaRRRRRRtRR2RR(Rtalpha((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRs"    cCs|jS(N(Re(R((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pytget_linewidthsscCs|jS(N(Rf(R((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pytget_linestylesscCs|jdkrdS|jjdkr4tdn|jr[|j|j|j|_n'|jr|j|j|j|_ ndS(sb If the scalar mappable array is not none, update colors from scalar data Nis&Collections can only map rank 1 arrays( t_ARtndimR.Rtto_rgbaRRtRR(R((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyR]s  cCstjj|||j|_|j|_|j|_|j|_|j|_|j|_|j |_ |j |_ |j |_ |j |_ |j |_ dS(s"copy properties from other to selfN(RRt update_fromRgRRRRtReRfRRR%R&(Rtother((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRs          N(9R\t __module__t__doc__RRRRRHRIRR7tzorderRRt staticmethodR0R3R4R6R8RGRLRXRRlRwRxRyRRzR{R|R RRR RRR RRR RRcRRdtget_edgecolorsR RRRt get_linewidthRt get_dashest get_linestyleR]R(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRsp"  #               *               s Valid Collection keyword arguments: * *edgecolors*: None * *facecolors*: None * *linewidths*: None * *antialiaseds*: None * *offsets*: None * *transOffset*: transforms.IdentityTransform() * *norm*: None (optional for :class:`matplotlib.cm.ScalarMappable`) * *cmap*: None (optional for :class:`matplotlib.cm.ScalarMappable`) *offsets* and *transOffset* are used to translate the patch after rendering (default no offsets) If any of *edgecolors*, *facecolors*, *linewidths*, *antialiaseds* are None, they default to their :data:`matplotlib.rcParams` patch setting, in sequence form. tPathCollectioncBs)eZdZejdZdZRS(s> This is the most basic :class:`Collection` subclass. cKs!tj|||j|dS(ss *paths* is a sequence of :class:`matplotlib.path.Path` instances. %(Collection)s N(RRR6(RRDR)((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRs cCs ||_dS(N(R(RRD((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyR6's(R\RRRtdedent_interpdRR6(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRs tPolyCollectioncBsAeZejdedZedZeZe dZ RS(cKs-tj||||_|j||dS(s *verts* is a sequence of ( *verts0*, *verts1*, ...) where *verts_i* is a sequence of *xy* tuples of vertices, or an equivalent :mod:`numpy` array of shape (*nv*, 2). *sizes* is *None* (default) or a sequence of floats that scale the corresponding *verts_i*. The scaling is applied before the Artist master transform; if the latter is an identity transform, then the overall scaling is such that if *verts_i* specify a unit square, then *sizes_i* is the area of that square in points^2. If len(*sizes*) < *nv*, the additional values will be taken cyclically from the array. *closed*, when *True*, will explicitly close the polygon. %(Collection)s N(RRt_sizest set_verts(RtvertstsizestclosedR)((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyR,s cCsutjj|r3|jtjjtj}n|rLg|_x,|D]}t|r,tjj|rtjj |tj dg}n-tj |}tj |tj dg}tj |j ddtjj}tjj|(tjj|dRRt code_typetLINETOtMOVETOt CLOSEPOLYRQ(RRRtxyRT((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRDs"!   $"  cCsg|jdk rWg|jD]2}tjjtj||jjd^q|_ nt j ||S(NgR@( RRRHtAffine2DtscaleRtsqrttfiguretdpiR7RRl(RRJRr((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRl^sEN( R\RRRRRRRR6RRl(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyR+s  tBrokenBarHCollectioncBs/eZdZejdZedZRS(s] A collection of horizontal bars spanning *yrange* with a sequence of *xranges*. c Ks|\}}||}g|D]G\}}||f||f|||f|||f||fg^q} tj|| |dS(s *xranges* sequence of (*xmin*, *xwidth*) *yrange* *ymin*, *ywidth* %(Collection)s N(RR( RtxrangestyrangeR)tymintywidthtymaxtxmintxwidthR((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRms  Tc Ksg}x_tj|D]N\}}|||!}t|sAqn|j|d|d|dfqWt||||g|} | S(s( Create a BrokenBarHCollection to plot horizontal bars from over the regions in *x* where *where* is True. The bars range on the y-axis from *ymin* to *ymax* A :class:`BrokenBarHCollection` is returned. *kwargs* are passed on to the collection. ii(tmlabtcontiguous_regionsRRQR( RrRRtwhereR)Rtind0tind1txslicet collection((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyt span_where~s   '(R\RRRRRRR(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRhstRegularPolyCollectioncBs\eZdZejjZejdddZ e dZ dZ dZ dZRS( s6Draw a collection of regular polygons with *numsides*.iicKsWtj||||_||_|j|g|_||_|jtj dS(s] *numsides* the number of sides of the polygon *rotation* the rotation of the polygon in radians *sizes* gives the area of the circle circumscribing the regular polygon in points^2 %(Collection)s Example: see :file:`examples/dynamic_collection.py` for complete example:: offsets = np.random.rand(20,2) facecolors = [cm.jet(x) for x in np.random.rand(20)] black = (0,0,0,1) collection = RegularPolyCollection( numsides=5, # a pentagon rotation=0, sizes=(50,), facecolors = facecolors, edgecolors = (black,), linewidths = (1,), offsets = offsets, transOffset = ax.transData, ) N( RRRt _numsidest_path_generatorRt _rotationt set_transformRHRI(RtnumsidestrotationRR)((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRs $   cCsrg|jD]O}tjj|j jtj||jj dtjtj ^q |_ t j ||S(NgR@(RRHRtrotateRRRRRRtpiR7RRl(RRJRr((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRls_cCs|jS(N(R(R((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyt get_numsidesscCs|jS(N(R(R((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyt get_rotationscCs|jS(N(R(R((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyt get_sizess(i(R\RRR>RRtunit_regular_polygonRRRRRRlRRR(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRs '  tStarPolygonCollectioncBseZdZejjZRS(s? Draw a collection of regular stars with *numsides* points.(R\RRR>RRtunit_regular_starR(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRstAsteriskPolygonCollectioncBseZdZejjZRS(sC Draw a collection of regular asterisks with *numsides* points.(R\RRR>RRtunit_regular_asteriskR(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRstLineCollectionc BsweZdZdZd d d dd d d d dd ZdZeZeZdZ dZ dZ d Z e Z RS( s All parameters must be sequences or scalars; if scalars, they will be converted to sequences. The property of the ith line segment is:: prop[i % len(props)] i.e., the properties cycle if the ``len`` of props is less than the number of segments. iRic Ks|dkrtjd}n|dkr;tjdf}n|dkrZtjdf}n|j|tjj|}tj|d|ddd|d|d |d |d |d |d | d| |  |j |dS(s *segments* a sequence of (*line0*, *line1*, *line2*), where:: linen = (x0, y0), (x1, y1), ... (xm, ym) or the equivalent numpy array with two columns. Each line can be a different length. *colors* must be a sequence of RGBA tuples (eg arbitrary color strings, etc, not allowed). *antialiaseds* must be a sequence of ones or zeros *linestyles* [ 'solid' | 'dashed' | 'dashdot' | 'dotted' ] a string or dash tuple. The dash tuple is:: (offset, onoffseq), where *onoffseq* is an even length tuple of on and off ink in points. If *linewidths*, *colors*, or *antialiaseds* is None, they default to their rcParams setting, in sequence form. If *offsets* and *transOffset* are not None, then *offsets* are transformed by *transOffset* and applied after the segments have been transformed to display coordinates. If *offsets* is not None but *transOffset* is None, then the *offsets* are added to the segments before any transformation. In this case, a single offset can be specified as:: offsets=(xo,yo) and this value will be added cumulatively to each successive segment, so as to produce a set of successively offset curves. *norm* None (optional for :class:`matplotlib.cm.ScalarMappable`) *cmap* None (optional for :class:`matplotlib.cm.ScalarMappable`) *pickradius* is the tolerance for mouse clicks picking a line. The default is 5 pt. The use of :class:`~matplotlib.cm.ScalarMappable` is optional. If the :class:`~matplotlib.cm.ScalarMappable` matrix :attr:`~matplotlib.cm.ScalarMappable._A` is not None (ie a call to :meth:`~matplotlib.cm.ScalarMappable.set_array` has been made), at draw time a call to scalar mappable will be made to set the colors. s lines.colorslines.linewidthslines.antialiasedRRRR R!R"R#R$R%R&R'N( RR}R~RRRRRRt set_segments( RtsegmentsR tcolorsR"R!R#R$R%R&R'R)((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRs,B    cCs|dkrdSg}xE|D]=}tjj|sMtj|tj}n|j|qW|jdk r|j|}ng|D]}t j |^q|_ dS(N( RRRRRRRQRt _add_offsetsR>RRR(RRt _segmentstseg((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRFs  cCs|j}t|}|jd}|dkr^xkt|D]}||||||x;t|D]-}||}|||||d!||RRt unit_circleR(RRR)((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRs cCs|jS(sreturn sizes of circles(R(R((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRscCseg|jD]B}tjjtj||jjdtjtj^q |_ t j ||S(NgR@( RRHRRRRRRRR7RRl(RRJRr((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRlsR( R\RRRRRRRRl(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyR~s tEllipseCollectioncBs;eZdZejddZdZedZRS(s8 A collection of ellipses, drawn using splines. tpointscKstj||dtj|j|_dtj|j|_tj|jtjd|_||_ |j t j g|_ tjjg|_dS(s *widths*: sequence lengths of first axes (e.g., major axis lengths) *heights*: sequence lengths of second axes *angles*: sequence angles of first axes, degrees CCW from the X-axis *units*: ['points' | 'inches' | 'dots' | 'width' | 'height' | 'x' | 'y' | 'xy'] units in which majors and minors are given; 'width' and 'height' refer to the dimensions of the axes, while 'x' and 'y' refer to the *offsets* data units. 'xy' differs from all others in that the angle as plotted varies with the aspect ratio, and equals the specified angle only when the aspect ratio is unity. Hence it behaves the same as the :class:`~matplotlib.patches.Ellipse` with axes.transData as its transform. Additional kwargs inherited from the base :class:`Collection`: %(Collection)s g?gf@N(RRRRtravelt_widthst_heightsRt_anglest_unitsRRHRIR7R>RRRR(RtwidthstheightstanglestunitsR)((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRs#  c Csg|_|j}|j}|jdkr3d}n|jdkr[|jj|jj}n|jdkr|jj|jj}n|jdkr|j}n|jdkr|jd}ng|jdkr|jj}nI|jd kr|jj}n+|jd krd }nt d |jt j }xbt |j |j|jD]E\}}}|j||||j|}|jj|qIW|jdkr|jjjj} d | ddddf<|j|| ndS(sB Calculate transforms immediately before drawing. RiRrRstinchesRgR@twidththeighttdotsg?sunrecognized units: %siNi(R7taxesRRRKR tviewLimRRR.RHRRSRRRRRRQRBR<t get_matrixtcopyR( Rtaxtfigtsct_affineRrRstattranstm((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyt_set_transformss8       +&cCs|jtj||dS(N(RRRl(RRJ((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRls ( R\RRRRRRRRl(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRs # %tPatchCollectioncBs#eZdZedZdZRS(s A generic collection of patches. This makes it easier to assign a color map to a heterogeneous collection of patches. This also may improve plotting speed, since PatchCollection will draw faster than a large number of patches. c Ks|rd}g|D]}||^q}g|D]}|j^q5}g|D]}|j^qT}g|D]}|j^qs} g|D]}|j^q} tj|d|d|d|d| d| ntj|||j|dS(s} *patches* a sequence of Patch objects. This list may include a heterogeneous assortment of different patch types. *match_original* If True, use the colors and linewidths of the original patches. If False, new colors may be assigned by providing the standard collection arguments, facecolor, edgecolor, linewidths, norm or cmap. If any of *edgecolors*, *facecolors*, *linewidths*, *antialiaseds* are None, they default to their :data:`matplotlib.rcParams` patch setting, in sequence form. The use of :class:`~matplotlib.cm.ScalarMappable` is optional. If the :class:`~matplotlib.cm.ScalarMappable` matrix _A is not None (ie a call to set_array has been made), at draw time a call to scalar mappable will be made to set the face colors. cSs&|jr|jSddddgS(Ni(tget_fillRc(tpatch((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pytdetermine_facecolors  RRR R!R"N(RdRRtget_antialiasedRRR6( Rtpatchestmatch_originalR)RRERRR R!R"((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRs   cCs;g|D]!}|jj|j^q}||_dS(N(R9ttransform_pathtget_pathR(RR!RERD((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyR6)s+(R\RRRpRR6(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRs  .tQuadMeshcBs_eZdZeddZdZdZedZdZ dZ e dZ RS( s Class for the efficient drawing of a quadrilateral mesh. A quadrilateral mesh consists of a grid of vertices. The dimensions of this array are (*meshWidth* + 1, *meshHeight* + 1). Each vertex in the mesh has a different set of "mesh coordinates" representing its position in the topology of the mesh. For any values (*m*, *n*) such that 0 <= *m* <= *meshWidth* and 0 <= *n* <= *meshHeight*, the vertices at mesh coordinates (*m*, *n*), (*m*, *n* + 1), (*m* + 1, *n* + 1), and (*m* + 1, *n*) form one of the quadrilaterals in the mesh. There are thus (*meshWidth* * *meshHeight*) quadrilaterals in the mesh. The mesh need not be regular and the polygons need not be convex. A quadrilateral mesh is represented by a (2 x ((*meshWidth* + 1) * (*meshHeight* + 1))) numpy array *coordinates*, where each row is the *x* and *y* coordinates of one of the vertices. To define the function that maps from a data point to its corresponding color, use the :meth:`set_cmap` method. Each of these arrays is indexed in row-major order by the mesh coordinates of the vertex (or the mesh coordinates of the lower left vertex, in the case of the colors). For example, the first entry in *coordinates* is the coordinates of the vertex at mesh coordinates (0, 0), then the one at (0, 1), then at (0, 2) .. (0, meshWidth), (1, 0), (1, 1), and so on. *shading* may be 'flat', 'faceted' or 'gouraud' tflatcKstj||||_||_||_||_||_||_tj j |_ |j j |j |d|ddf|jj |d|ddf|_tj|jtj|_dS(Nii(RRt _meshWidtht _meshHeightt _coordinatest _showedgest _antialiasedt_shadingRHtBboxtunitt_bboxtupdate_from_data_xytreshapeRRR(Rt meshWidtht meshHeightt coordinatest showedgest antialiasedtshadingR)((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRNs      &cCs#|jdkr|jn|jS(N(RRR6(R((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyR4`s cCs%|j|j|j|j|_dS(N(tconvert_mesh_to_pathsR'R(R)R(R((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyR6esc Cstj}tj|r$|j}n|}tj|ddddf|ddddf|ddddf|ddddf|ddddffdd}|j||ddf}g|D]}||^qS(s Converts a given mesh into a sequence of :class:`matplotlib.path.Path` objects for easier rendering by backends that do not directly support quadmeshes. This function is primarily of use to backend implementers. iiiNtaxisii(R>RRRRtdataRRR1(R2R3R4RRRRRr((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyR8is   c Cstj}tj|r$|j}n|}|ddddf}|ddddf}|ddddf}|ddddf} |||| d} tj||| ||| || | | || f dd} | j||dd df} |jj|d|ddf} | ddddf} | ddddf}| ddddf}| ddddf}| |||d}tj| |||||||||| |f dd}|j||dd df}| |fS( s Converts a given mesh into a sequence of triangles, each point with its own color. This is useful for experiments using `draw_qouraud_triangle`. iiiNg@R9iii( R>RRRRR:RRR1Rc(RR2R3R4RRREtp_atp_btp_ctp_dtp_centert trianglesRtc_atc_btc_ctc_dtc_centerR((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pytconvert_mesh_to_triangless<       &     cCs|jS(N(R/(RRB((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRGsc CsJ|jsdS|j|jj|j}|j}|j}|jrt|jr|j |jd }|j |jd }t ||}qnt j |t j}|jdr|jn|js:|jj|jjd|jjddf}|j|}|j|jj}tj}n |j}|jsj|j|}|j}n|j}|j||j|jd|jdkr|j|j |j!|\} } |j"|| | |j#n@|j$||j#|j |j!||||j%|j&|j' |j(|j)|jjdS(NiiRitgouraud(*RYRZR[R\R9RRRMRRORPRSRRRt check_updateR]R:R)R1RRCRHRIR=R<R^R_R RR,RFR'R(tdraw_gouraud_trianglesR@tdraw_quad_meshRcR+R*RiRj( RRJRCR$R#RVRWR4RkR@R((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyRlsN               ( R\RRRRR4R6RR8RFRGRRl(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyR%/s   , (/RRtnumpyRtnumpy.maRt matplotlibR}tmatplotlib.cbookR,tmatplotlib.colorsRRt matplotlib.cmRRtmatplotlib.transformsRHtmatplotlib.artistRRtmatplotlib.backend_basesRtmatplotlib.pathRUR>tmatplotlib.mlabRRRRtinterpdRRRRRRRRRRRR%tkwdoctpatchstrtk(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/collections.pyt sH    =*A R?