)Uc @ sddlmZddlZddlZddlZddljZddl j Z ddl m Z ddl j Z ddlmZddljZddlmZejjddde jfdYZe jeZxLd d d d d ddddddddf D]Zejjiee6q WejejjdefdYZd efdYZd efdYZdefdYZ d efdYZ!d efdYZ"defdYZ#de!fdYZ$defdYZ%defd YZ&defd!YZ'd e'fd"YZ(de'fd#YZ)e*e+d$Z,d%e*d&Z-d'd(Z.d'd)Z/d*e0fd+YZ1d,e1fd-YZ2ejjd.e/e2j3defd/YZ4dd0l5m6Z6dd1l5m7Z7m8Z8m9Z9dd2l5m:Z:dd3l5m;Z;m<Z<dd4l5m=Z=m>Z>d5e1fd6YZ?d7e1fd8YZ@ejjd9e/e@j3d:e/e?j3d;efd<YZAd=eAfd>YZBdS(?i(tdivisionN(tallow_rasterization(t docstring(tPathtPatchs$ ================= ============================================== Property Description ================= ============================================== alpha float animated [True | False] antialiased or aa [True | False] clip_box a matplotlib.transform.Bbox instance clip_on [True | False] edgecolor or ec any matplotlib color facecolor or fc any matplotlib color figure a matplotlib.figure.Figure instance fill [True | False] hatch unknown label any string linewidth or lw float lod [True | False] transform a matplotlib.transform transformation instance visible [True | False] zorder any number ================= ============================================== c B seZdZdZdZd&d&d&d&d&d&d&ed&d ZdZdZ dZ dZ dZ d Z d Zd Zd ZeZd ZeZdZeZdZeZdZeZdZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'e(e'e&Z)dZ*d Z+d!Z,d"Z-e.d#Z/d$Z0d&d%Z1RS('s A patch is a 2D thingy with a face color and an edge color. If any of *edgecolor*, *facecolor*, *linewidth*, or *antialiased* are *None*, they default to their rc params setting. icC st|jjddS(Nt.i(tstrt __class__tsplit(tself((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt__str__4sc K sPtjj||dkr,tjd}n|dkrAd}n|dkr]tjd}nt|_|dk r|dk s|dk rddl} | j dn|j |n|j ||j ||j ||j||j||j||j|tj|_|j| t| rLtj|| ndS(sQ The following kwarg properties are supported %(Patch)s spatch.linewidthtsolidspatch.antialiasediNsQSetting the 'color' property will overridethe edgecolor or facecolor properties. (tartisttArtistt__init__tNonetmpltrcParamstTruet_filltwarningstwarnt set_colort set_edgecolort set_facecolort set_linewidtht set_linestyletset_antialiasedt set_hatchtset_fillt transformstIdentityTransformt_combined_transformtset_path_effectstlentsetp( R t edgecolort facecolortcolort linewidtht linestylet antialiasedthatchtfillt path_effectstkwargsR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR7s2                 cC s?|j}|j}|j|}t|r;|dSgS(s Return a copy of the vertices used in this patch If the patch contains Bezier curves, the curves will be interpolated by line segments. To access the curves as curves, use :meth:`get_path`. i(t get_transformtget_patht to_polygonsR"(R ttranstpathtpolygons((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt get_vertsds    cC sSt|jr|j||S|jj|j|jf|j}|ifS(sUTest whether the mouse event occurred in the patch. Returns T/F, {} (tcallablet _containsR/tcontains_pointtxtyR.(R t mouseeventtinside((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pytcontainsss  cC s|jj||jS(sz Returns *True* if the given point is inside the path (transformed with its transform attribute). (R/R7R.(R tpoint((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR7scC stjj|||j|j|j|j|j|j|j |j |j |j |j |j|j|j|j|j|j|jdS(sM Updates this :class:`Patch` from the properties of *other*. N(R R t update_fromRt get_edgecolorRt get_facecolorRtget_fillRt get_hatchRt get_linewidthRt get_linestylet set_transformtget_data_transformt set_figuret get_figuret set_alphat get_alpha(R tother((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR>scC s|jj|jS(s Return a :class:`~matplotlib.transforms.Bbox` object defining the axis-aligned extents of the :class:`Patch`. (R/t get_extentsR.(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRLscC s|jtjj|S(sm Return the :class:`~matplotlib.transforms.Transform` applied to the :class:`Patch`. (tget_patch_transformR R R.(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR.scC stjj|S(N(R R R.(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRFscC s tjS(N(RR(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRMscC s|jS(sV Returns True if the :class:`Patch` is to be drawn with antialiasing. (t _antialiased(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pytget_antialiasedscC s|jS(s> Return the edge color of the :class:`Patch`. (t _edgecolor(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR?scC s|jS(s> Return the face color of the :class:`Patch`. (t _facecolor(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR@scC s|jS(s2 Return the line width in points. (t _linewidth(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRCscC s|jS(sk Return the linestyle. Will be one of ['solid' | 'dashed' | 'dashdot' | 'dotted'] (t _linestyle(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRDscC s)|dkrtjd}n||_dS(sp Set whether to use antialiased rendering ACCEPTS: [True | False] or None for default spatch.antialiasedN(RRRRN(R taa((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs cC s |j|S(salias for set_antialiased(R(R RT((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pytset_aascC s;|dkrtjd}ntjj||j|_dS(sx Set the patch edge color ACCEPTS: mpl color spec, or None for default, or 'none' for no color spatch.edgecolorN(RRRtcolorstcolorConvertertto_rgbat_alphaRP(R R&((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs cC s |j|S(salias for set_edgecolor(R(R R&((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pytset_ecscC so|dkrtjd}n||_tjj||j|_|j skt |j|_d|jdscC s ||_dS(s Set the hatching pattern *hatch* can be one of:: / - diagonal hatching \ - back diagonal | - vertical - - horizontal + - crossed x - crossed diagonal o - small circle O - large circle . - dots * - stars Letters can be combined, in which case all the specified hatchings are done. If same letter repeats, it increases the density of hatching of that pattern. Hatching is supported in the PostScript, PDF, SVG and Agg backends only. ACCEPTS: [ '/' | '\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*' ] N(t_hatch(R R*((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRGscC s|jS(s#Return the current hatching pattern(Ri(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRBcscC s ||_dS(s set path_effects, which should be a list of instances of matplotlib.patheffect._Base class or its derivatives. N(t _path_effects(R R,((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR!gscC s|jS(N(Rj(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pytget_path_effectsnsc C s|jsdS|jd|j|j}|j|jdt|j}|jddkrmd}n|j||j |j |j |j |j ||jd|j|j|j|j|j}|ddkrd}n|j|jd|jddkr7|j|jdn|jrS|j|jn|j}|j}|j|}|j}|jrxF|jD]} | j|||||qWn|j|||||j|jddS(s0Draw the :class:`Patch` to the given *renderer*.NtpatchtisRGBiit projecting( t get_visiblet open_grouptget_gidtnew_gctset_foregroundRPRRRRRRSRRNt _set_gc_clipt set_capstyletset_urlt_urltset_snaptget_snapRQRRIRiRR/R.ttransform_path_non_affinet get_affineRkt draw_pathtrestoret close_group( R trenderertgcRctrgbFaceR2t transformttpathtaffinet path_effect((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pytdrawqsB                cC stddS(s/ Return the path of this patch sDerived must overrideN(tNotImplementedError(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR/scC s|jj|jS(N(R/RLR.(R R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pytget_window_extentsN(2t__name__t __module__t__doc__tzorderR RRRR4R<R7R>RLR.RFRMROtget_aaR?tget_ecR@tget_fcRCtget_lwRDtget_lsRRURRZRR]RRIRRdRRfRRAtpropertyR+RRBR!RkRRR/R(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR,sh  $                          / t RectangletCircletRegularPolygontPolygontWedgetArrowt FancyArrowtYAArrowt CirclePolygontEllipsetArctFancyBboxPatchtShadowcB sweZdZejd dZdZdZdZ dZ dZ dZ dZ d Zd ZRS( cC sdt|jS(Ns Shadow(%s)(RRl(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR scK sOtj|||_||_|||_|_tj|_|j dS(s Create a shadow of the given *patch* offset by *ox*, *oy*. *props*, if not *None*, is a patch property update dictionary. If *None*, the shadow will have have the same color as the face, but darkened. kwargs are %(Patch)s N( RRRltpropst_oxt_oyRtAffine2Dt_shadow_transformt_update(R RltoxtoyRR-((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs   cC s|j|j|jdk r2|j|jntjj|jj\}}}}d}||}||}||}|j |||df|j |||df|j ddS(Ng333333?g?( R>RlRRtupdateRVRWRXR@RRRI(R trtgRhtatrho((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs'   cC sA|j|j}|j|j}|jjj||dS(N(tpoints_to_pixelsRRRtcleart translate(R RRR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt_update_transformscC s|jS(N(R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt_get_oxscC s ||_dS(N(R(R R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt_set_oxscC s|jS(N(R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt_get_oyscC s ||_dS(N(R(R R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt_set_oyscC s |jjS(N(RlR/(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR/scC s|jj|jS(N(RlRMR(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRMscC s!|j|tj||dS(N(RRR(R R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs N(RRR Rtdedent_interpdRRRRRRRRR/RMR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs         cB seZdZdZejdZdZdZdZ dZ dZ dZ d Z d Zd Zd Zd ZdZdZdZdZdZee eZRS(sh Draw a rectangle with lower left at *xy* = (*x*, *y*) with specified *width* and *height*. cC s*|jjd|j|j|j|jfS(Ns (%g,%g;%gx%g)(RRt_xt_yt_widtht_height(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR s cK sOtj|||d|_|d|_||_||_tj|_dS(s| *fill* is a boolean indicating whether to fill the rectangle Valid kwargs are: %(Patch)s iiN( RRRRRRRRt_rect_transform(R txytwidththeightR-((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs     cC s tjS(s6 Return the vertices of the rectangle (Rtunit_rectangle(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR/ scC sy|j|j}|j|j}|j|j}|j|j}tjj||||}tj ||_ dS(sNOTE: This cannot be called until after this has been added to an Axes, otherwise unit conversion will fail. This maxes it very important to call the accessor method and not directly access the transformation member variable. N( tconvert_xunitsRtconvert_yunitsRRRRtBboxt from_boundstBboxTransformToR(R R8R9RRtbbox((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt_update_patch_transforms cC s|j|jS(N(RR(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRM s cC s|jdks|jdkr(tifS|jjj|j|jf\}}|dko|dko|dko|dkifS(Nigg?(RRtFalseR.tinvertedttransform_pointR8R9(R R:R8R9((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR<$s  cC s|jS(s&Return the left coord of the rectangle(R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pytget_x-scC s|jS(s(Return the bottom coord of the rectangle(R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pytget_y1scC s|j|jfS(s2Return the left and bottom coords of the rectangle(RR(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pytget_xy5scC s|jS(s"Return the width of the rectangle(R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt get_width9scC s|jS(s"Return the height of the rectangle(R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt get_height=scC s ||_dS(sM Set the left coord of the rectangle ACCEPTS: float N(R(R R8((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pytset_xAscC s ||_dS(sO Set the bottom coord of the rectangle ACCEPTS: float N(R(R R9((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pytset_yIscC s|\|_|_dS(sc Set the left and bottom coords of the rectangle ACCEPTS: 2-item sequence N(RR(R R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pytset_xyQscC s ||_dS(sA Set the width rectangle ACCEPTS: float N(R(R Rb((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt set_widthYscC s ||_dS(sA Set the width rectangle ACCEPTS: float N(R(R th((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt set_heightascG set|dkr+|d\}}}}n|\}}}}||_||_||_||_dS(sj Set the bounds of the rectangle: l,b,w,h ACCEPTS: (left, bottom, width, height) iN(R"RRRR(R targstlRhRbR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt set_boundsis   cC s%tjj|j|j|j|jS(N(RRRRRRR(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pytget_bboxxs(RRRR RRRR/RRMR<RRRRRRRRRRRRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs(               cB seZdZdZejdddZdZdZdZ e ee Z dZ d Z e e e Zd Zd Ze eeZd Zd Ze eeZdZdZRS(s" A regular polygon patch. cC s"d|j|jd|jdfS(Ns Poly%d(%g,%g)ii(t _numVerticest_xy(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR siicK sc||_||_||_||_tj||_tj|_ |j t j ||dS(sf Constructor arguments: *xy* A length 2 tuple (*x*, *y*) of the center. *numVertices* the number of vertices. *radius* The distance from the center to each of the vertices. *orientation* rotates the polygon (in radians). Valid kwargs are: %(Patch)s N( RRt _orientationt_radiusRtunit_regular_polygont_pathRRt_poly_transformRRR(R Rt numVerticestradiust orientationR-((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs     cC s5|jjj|jj|jj|jdS(N(RRtscaleRtrotateRRR(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs  cC s|jS(N(R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt_get_xyscC s||_|jdS(N(RR(R R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt_set_xys cC s|jS(N(R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt_get_orientationscC s||_|jdS(N(RR(R R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt_set_orientations cC s|jS(N(R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt _get_radiusscC s||_|jdS(N(RR(R R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt _set_radiuss cC s|jS(N(R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt_get_numverticesscC s ||_dS(N(R(R R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt_set_numverticesscC s|jS(N(R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR/scC s|j|jS(N(RR(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRMs (RRRR RRRRRRRRRRRRRRRRt numverticesR/RM(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR}s&           t PathPatchcB s2eZdZdZejdZdZRS(s) A general polycurve path patch. cC sdt|jjdS(NsPoly((%g, %g) ...)i(ttupleRtvertices(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR scK stj||||_dS(s *path* is a :class:`matplotlib.path.Path` object. Valid kwargs are: %(Patch)s .. seealso:: :class:`Patch` For additional kwargs N(RRR(R R2R-((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRscC s|jS(N(R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR/s(RRRR RRRR/(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs cB szeZdZdZejedZdZdZ dZ dZ dZ e Z e Zee e d dZRS( s" A general polygon patch. cC sdt|jjdS(NsPoly((%g, %g) ...)i(RRR(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR scK sEtj||tj|tj}t||_|j|dS(s0 *xy* is a numpy array with shape Nx2. If *closed* is *True*, the polygon will be closed so the starting and ending points are the same. Valid kwargs are: %(Patch)s .. seealso:: :class:`Patch` For additional kwargs N(RRtnptasarraytfloat_RRt set_closed(R RtclosedR-((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRscC s|jS(N(R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR/scC s|jS(N(t_closed(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt get_closedscC s||_|j}|rct|r|d|dkjrtj||dgg}qn<t|dkr|d|dkjr|dd!}n|j|dS(Niii(RRR"tanyRt concatenatetallR(R RR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR s  &",cC s |jjS(N(RR(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRscC st||_dS(N(RR(R R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRssSet/get the vertices of the polygon. This property is provided for backward compatibility with matplotlib 0.91.x only. New code should use :meth:`~matplotlib.patches.Polygon.get_xy` and :meth:`~matplotlib.patches.Polygon.set_xy` instead.N(RRRR RRRRR/RRRRRRRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs      cB s5eZdZdZejddZdZRS(s Wedge shaped patch. cC sd|j|jfS(Ns Wedge(%g,%g)(ttheta1ttheta2(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR &scK stj||||_|||_|_|||_|_||}t||ddkr{d\}}tj }n tj }tj ||} |dk r8| j } | j dddt|||} tj| | | dddfdg} tj| j| j|tjg} || t| jeZdZdZejdeddddedZRS(sP Like Arrow, but lets you set head width and head height independently. cC sdS(Ns FancyArrow()((R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR sgMbP?tfullic K s"|d krd|}n|d kr2d|}ntj|d|d} |r\| }n | |}|sug}n||| |f\}}}}tjddg| | dg| d|| dg| | dg| dgg}|s||dg7}n| r ||ddg7}n| dkr5|}ng|dd g}| d krZ|}nB| d krtj|d |d d d g}n td| t|| }t|| }tj||g| |gg}tj||||||f}tj |t t || d S(s Constructor arguments *length_includes_head*: *True* if head is counted in calculating the length. *shape*: ['full', 'left', 'right'] *overhang*: distance that the arrow is swept back (0 overhang means triangular shape). *head_starts_at_zero*: If *True*, the head starts being drawn at coordinate 0 instead of ending at coordinate 0. Valid kwargs are: %(Patch)s ig?igg@iitleftitrightRiNsGot unknown shape: %s( RRR tarrayRt ValueErrorR_tdotRRtmapR(R R8R9RRRtlength_includes_headt head_widtht head_lengthtshapetoverhangthead_starts_at_zeroR-tdistancetlengthtvertsthwthlthsRctleft_half_arrowtcoordstright_half_arrowRRtM((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRsF               "$N( RRRR RRRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs   cB sMeZdZdZejddddZdZdZdZ RS( s Yet another arrow class. This is an arrow that is defined in display space and has a tip at *x1*, *y1* and a base at *x2*, *y2*. cC sdS(Ns YAArrow()((R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR sig?i cK sJ||_||_||_||_||_||_tj||dS(s Constructor arguments: *xytip* (*x*, *y*) location of arrow tip *xybase* (*x*, *y*) location the arrow base mid point *figure* The :class:`~matplotlib.figure.Figure` instance (fig.dpi) *width* The width of the arrow in points *frac* The fraction of the arrow length occupied by the head *headwidth* The width of the base of the arrow head in points Valid kwargs are: %(Patch)s N(tfiguretxytiptxybaseRtfract headwidthRR(R R-R.R/RR0R1R-((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs      c C s|j\}}|j\}}|j|jjdd}|j|jjdd}|j|||||\}}} } tj||||} tj ||d||d} ||j | tj | } ||j | tj | }|j||| ||\}}}}|j||| ||\}}}}|j || ||||||g}|j|| ||||||g}tt||S(NgR@g@(R.R/RR-tdpiR1t getpointstmathtatan2R R0tcostsinRRRtzip(R tx1ty1tx2ty2tk1tk2txb1tyb1txb2tyb2tthetaRtxmtymtxc1tyc1txc2tyc2txd1tyd1txd2tyd2txstys((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR/s'#''''cC s tjS(N(RR(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRMscC s[tt|||||f\}}}}}||dkrU||||||fS||dkr}||||||fS||||}d|}d}d|} |d|d|dd|d} | tj| dd|| d|} | |||} | tj| dd|| d|} | |||}| | || fS(s For line segment defined by (*x1*, *y1*) and (*x2*, *y2*) return the points on the line that is perpendicular to the line and intersects (*x2*, *y2*) and the distance from (*x2*, *y2*) of the returned points is *k*. igiig@g?i(RR_R4R (R R9R:R;R<tktmtpmRRhR^ty3atx3aty3btx3b((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR3s-  &,,( RRRR RRRR/RMR3(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs #  cB s/eZdZdZejdddZRS(s4 A polygon-approximation of a circle patch. cC s d|jS(NsCirclePolygon(%d,%d)(R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR ?siicK s#tj||||dd|dS(s/ Create a circle at *xy* = (*x*, *y*) with given *radius*. This circle is approximated by a regular polygon with *resolution* sides. For a smoother circle drawn with splines, see :class:`~matplotlib.patches.Circle`. Valid kwargs are: %(Patch)s RiN(RR(R RRt resolutionR-((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRBs  (RRRR RRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR;s  cB sPeZdZdZejddZdZdZdZ dZ RS(s A scale-free ellipse. cC s(d|jd|jd|j|jfS(NsEllipse(%s,%s;%sx%s)ii(RRR(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR [sgcK sWtj||||_|||_|_||_tj|_t j |_ dS(s* *xy* center of ellipse *width* total length (diameter) of horizontal axis *height* total length (diameter) of vertical axis *angle* rotation in degrees (anti-clockwise) Valid kwargs are: %(Patch)s N( RRRRRtangleRt unit_circleRRRR(R RRRRXR-((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR^s   cC s|j|jd|j|jdf}|j|j}|j|j}tjj|d|dj|j j ||_ dS(sNOTE: This cannot be called until after this has been added to an Axes, otherwise unit conversion will fail. This maxes it very important to call the accessor method and not directly access the transformation member variable. iig?N( RRRRRRRRt rotate_degRXRR(R RRR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt_recompute_transformys  cC s|jS(s6 Return the vertices of the rectangle (R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR/scC s|j|jS(N(R[R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRMs cC sq|jdks|jdkr(tifS|jjj|j|jf\}}||||dkifS(Ng?(R8RR9RR.RR(R tevR8R9((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR<s -( RRRR RRRR[R/RMR<(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRWs    cB sMeZdZdZejddZdZdZe eeZ RS(s A circle patch. cC s"d|jd|jd|jfS(NsCircle((%g,%g),r=%g)ii(RR(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR sicK sfd|kr8ddl}|jdt|jdn||_tj|||d|d|dS(s7 Create true circle at center *xy* = (*x*, *y*) with given *radius*. Unlike :class:`~matplotlib.patches.CirclePolygon` which is a polygonal approximation, this uses Bézier splines and is much closer to a scale-free circle. Valid kwargs are: %(Patch)s RWiNs5Circle is now scale free. Use CirclePolygon instead!i(RRtDeprecationWarningtpopRRR(R RRR-R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs   cC sd||_|_dS(sF Set the radius of the circle ACCEPTS: float iN(RR(R R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt set_radiusscC s |jdS(sreturn the radius of the circleg@(R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt get_radiuss( RRRR RRRR_R`RR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs   cB sAeZdZdZejddddZedZRS(ss An elliptical arc. Because it performs various optimizations, it can not be filled. The arc must be used in an :class:`~matplotlib.axes.Axes` instance---it can not be added directly to a :class:`~matplotlib.figure.Figure`---because it is optimized to only render the segments that are inside the axes bounding box with high resolution. cC s(d|jd|jd|j|jfS(NsArc(%s,%s;%sx%s)ii(RRR(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR sggv@c K st|jdt}|r'tdntj||||||||_||_tj|j|j|_ dS(s The following args are supported: *xy* center of ellipse *width* length of horizontal axis *height* length of vertical axis *angle* rotation in degrees (anti-clockwise) *theta1* starting angle of the arc in degrees *theta2* ending angle of the arc in degrees If *theta1* and *theta2* are not provided, the arc will form a complete ellipse. Valid kwargs are: %(Patch)s R+sArc objects can not be filledN( t setdefaultRRRRRRRRR( R RRRRXRRR-R+((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs  c st|dstdn|j|j|j}|j|j}|jj||f\}}d}||kr||krt j ||Sdfd}t j }t j|jj|jj}|j|}tj}|d} d |} |d } |j} |j} i}xt|jd |jd D]\}}|\}}|\}}xz|||||D]c\}}tj|}|d kr| |}n|| 9}|| kr|| krd||g?cs s||}||}||||}||||}||}||} | dkr|||} | ||} | | fVn| dkr|dkrd} nd} tj| } x^dD]S}|||| || |} | ||tj|| |} | | fVqWndS(Nggg?(g?g(RR R(tx0ty0R9R:RRtdr2tDtD2tdiscrimR8R9tsign_dyt sqrt_discrimtsign((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pytiter_circle_intersect_on_line7s&         $c 3 sd}||kr"||}}n ||}}||krK||}}n ||}}||8}||8}||7}||7}xa||||D]J\} } | |kr| |kr| |kr| |kr| | fVqqWdS(Ng& .>(( RcRdR9R:tepsilontx0etx1ety0ety1eR8R9(Rl(sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt!iter_circle_intersect_on_line_segQs        "0g@gf@iiiiNg\! Ag\!A(%thasattrt RuntimeErrorR[RRRRR.RRRRRRRRbRRt transformedRtpiRRR8RtarccosRtkeystsorttappendR7R6R7RRRR(R RRRt inv_errorRrtbox_pathtbox_path_transformtPItTWOPItRAD2DEGtDEG2RADRRtthetastp0tp1RcRdR9R:R8R9RCt last_thetat theta1_radR;t path_originalR((RlsE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs`.          *  "       '    ( RRRR RRRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs   )c C s|dkri}n|j}|jdd}|j|}|j|}|j\}}}} ||d8}||d8}||7}| |7} td||fd|d| d|} | jtj | j t | j || j |dS( sd This is a debug function to draw a rectangle around the bounding box returned by :meth:`~matplotlib.artist.Artist.get_window_extent` of an artist, to test whether the artist is returning the correct bbox. *props* is a dict of rectangle props with the additional property 'pad' that sets the padding around the bbox in points. tpadig@RRRR+N(RtcopyR^RRtboundsRRERRt set_clip_onRRR( R RRR+RRRRhRbRR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt bbox_artists&       RPc C s||j\}}}}td||fd|d|d|dt}|dk r^|j|n|jt|j|dS(s This is a debug function to draw a rectangle around the bounding box returned by :meth:`~matplotlib.artist.Artist.get_window_extent` of an artist, to test whether the artist is returning the correct bbox. RRRR$R+N(RRRRRERR( RRR&R1RRhRbRR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt draw_bboxs   ic C s|rd|}nd}g|dD] }g^q$}x;|D]3}x*t||D]\}}|j|qSWq=Wg|D]+}tg|D]}t|^q^q{}g}|djg|D]} d| ^q} |jd|j| |j|djgt|d|D]\}} |j| ^q|j| |jg|dD]D}|djgt||D]\}} |j| ^q|^q]|j| |jddj|S(sR Given the list of list of strings, return a string of REST table format. t tis t=is (R8RztmaxR"tjointljusttextend( t_tablet leadingspaceRtcelltcolumnstrowtcolumntcol_lentlinestclttable_formatstr((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt _pprint_tables&  8*  I  S  cC s;|rd|}nd}ggg}}}ddl}dddgg}xt|jD]\}} |j| j\} } } } | rgt| d| D]\}}||f^q} nd} | dkrd }n2d jg| D]\}}d ||f^q}|j| j d ||gq^Wt |S( s A helper function for the _Style class. Given the dictionary of (stylename : styleclass), return a formatted string listing all the styles. Used to update the documentation. RRiNtClasstNametAttrsiRt,s%s=%ss``%s``( tinspecttsortedtitemst getargspecRR8RRRzRR(t_stylesRRtnamestattrsstclssRRtnametclsRtvarargstvarkwtdefaultstargnamet argdefaulttargstrtantav((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt_pprint_styless"  2  2!t_StylecB s5eZdZdZedZedZRS(s A base class for the Styles. It is meant to be a container class, where actual styles are declared as subclass of it, and it provides some helper functions. c K s|jddjd}|dj}y|j|}Wn!tk r_td|nXy[g|dD]}|jd^qn}tg|D]\}} |t| f^q} Wn!tk rtd|nX| j||| S( sP return the instance of the subclass with the given style name. RRRisUnknown style : %siRsIncorrect style argument : %s( treplaceRtlowert _style_listtKeyErrorRtdictR_R( R t stylenametkwt_listt_namet_clstcst _args_pairRPR t_args((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt__new__s &5  cC s|jS(sP A class method which returns a dictionary of available styles. (R(tklass((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt get_styles1scC s t|jS(sP A class method which returns a string of the available styles. (RR(R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt pprint_styles8s(RRRRt classmethodRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs tBoxStylecB s3eZdZiZdefdYZdefdYZeed) &  ? 7 X   RcB seZdZdZejdddddZejddZdZ dZ dZ d Z d Z d Zd Zd ZdZdZdZdZdZdZdZdZRS(s} Draw a fancy box around a rectangle with lower left at *xy*=(*x*, *y*) with specified width and height. :class:`FancyBboxPatch` class is similar to :class:`Rectangle` class, but it draws a fancy box around the rectangle. The transformation of the rectangle box to the fancy box is delegated to the :class:`BoxTransmuterBase` and its derived classes. cC s*|jjd|j|j|j|jfS(NsFancyBboxPatch(%g,%g;%gx%g)(RRRRRR(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR s Rg?c K stj|||d|_|d|_||_||_|dkro|dkrctdn||_n |j |||_ ||_ dS(s *xy* = lower left corner *width*, *height* *boxstyle* determines what kind of fancy box will be drawn. It can be a string of the style name with a comma separated attribute, or an instance of :class:`BoxStyle`. Following box styles are available. %(AvailableBoxstyles)s *mutation_scale* : a value with which attributes of boxstyle (e.g., pad) will be scaled. default=1. *mutation_aspect* : The height of the rectangle will be squeezed by this value before the mutation and the mutated box will be stretched by the inverse of it. default=None. Valid kwargs are: %(Patch)s iitcustoms7bbox_transmuter argument is needed with custom boxstyleN( RRRRRRRRt_bbox_transmutert set_boxstylet_mutation_scalet_mutation_aspect( R RRRtboxstyletbbox_transmutertmutation_scaletmutation_aspectR-((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs         cK sb|dkrtjSt|tjr4||_n*t|rL||_nt|||_dS(s Set the box style. *boxstyle* can be a string with boxstyle name with optional comma-separated attributes. Alternatively, the attrs can be provided as keywords:: set_boxstyle("round,pad=0.2") set_boxstyle("round", pad=0.2) Old attrs simply are forgotten. Without argument (or with *boxstyle* = None), it returns available box styles. ACCEPTS: [ %(AvailableBoxstyles)s ] N(RRRt isinstanceRRR5(R RR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRKs     cC s ||_dS(sA Set the mutation scale. ACCEPTS: float N(R(R R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pytset_mutation_scalekscC s|jS(s, Return the mutation scale. (R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pytget_mutation_scalesscC s ||_dS(sT Set the aspect ratio of the bbox mutation. ACCEPTS: float N(R(R taspect((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pytset_mutation_aspectyscC s|jS(s? Return the aspect ratio of the bbox mutation. (R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pytget_mutation_aspectscC s|jS(sReturn the boxstyle object(R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt get_boxstylescC s=|j|j|j|j|j|j|j}|S(s: Return the mutated path of the rectangle (R RRRRR R (R R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR/s   cC s|jS(s&Return the left coord of the rectangle(R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRscC s|jS(s(Return the bottom coord of the rectangle(R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRscC s|jS(s"Return the width of the rectangle(R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRscC s|jS(s"Return the height of the rectangle(R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRscC s ||_dS(sM Set the left coord of the rectangle ACCEPTS: float N(R(R R8((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRscC s ||_dS(sO Set the bottom coord of the rectangle ACCEPTS: float N(R(R R9((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRscC s ||_dS(sA Set the width rectangle ACCEPTS: float N(R(R Rb((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRscC s ||_dS(sA Set the width rectangle ACCEPTS: float N(R(R R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRscG set|dkr+|d\}}}}n|\}}}}||_||_||_||_dS(sj Set the bounds of the rectangle: l,b,w,h ACCEPTS: (left, bottom, width, height) iN(R"RRRR(R RRRhRbR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRs   cC s%tjj|j|j|j|jS(N(RRRRRRR(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRsN(RRRR RRRRRRR R R R R/RRRRRRRRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR s2  +               (t)split_bezier_intersecting_with_closedpath(tget_intersectiont inside_circlet get_parallels(tmake_wedged_bezier2(tsplit_path_inoutt get_cos_sin(tmake_path_regulartconcatenate_pathstConnectionStylecB seZdZiZdefdYZdefdYZeed The arrows are drawn if *beginarrow* and/or *endarrow* are true. *head_length* and *head_width* determines the size of the arrow relative to the *mutation scale*. The arrowhead at the begin (or end) is closed if fillbegin (or fillend) is True. N( t beginarrowtendarrowRRt fillbegintfillendRR[ReR(R RfRgRhRiRR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRE s c C s3||||} } tj| d| d} d||} | | | } | | | }| | || | |} } || || | | || }}|| || || || }}|| ||||f|| ||f|| ||||fg}tjtjtjg}||| |fS(s Return the paths for arrow heads. Since arrow lines are drawn with capstyle=projected, The arrow goes beyond the desired point. This method also returns the amount of the path to be shrinked so that it does not overshoot. ig?(R4R RRR(R RcRdR9R:t head_disttcos_ttsin_tR'RRt cp_distancet pad_projectedRMRNR8R9R<R=tvertices_arrowt codes_arrow((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt_get_arrow_wedgeV s &% c C s|j||j|}}tj|d|d}||||}}|jd\} } |jd\} } |jr|j| | | | ||||\} }}}ngg} }d\}}|jd\}}|jd\}}|jr(|j||||||||\}}}}ngg}}d\}}tt j | || |fg|jdd!||||fgg|j g}t g}|jr?|j rt j | | d| dgg}t j |tjtjgg}|jt|||jtq?|jt| ||jt n|jr|jr|jtt j ||d|dgg}t j |tjtjgg}|jt||q|jt |jt||n||fS( Niiigii(gg(gg(RRR4R RRfRqRgRRRRRRhRRRzRRi(R R2RR'RRRjRkRlRcRdR9R:t verticesAtcodesAtddxAtddyAR;R<tx3ty3t verticesBtcodesBtddxBtddyBRt _fillableRR^((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR~ sT             #!   #! N(RRRRRRRqR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRe= s  (tCurvecB seZdZdZRS(s8 A simple curve without any arrow head. cC s&ttj|jdtdtdS(NRfRg(RR[R}RR(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR s(RRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR} st-tCurveAcB seZdZdddZRS(s: An arrow with a head at its begin point. g?g?c C s2ttj|jdtdtd|d|dS(s *head_length* length of the arrow head *head_width* width of the arrow head RfRgRRN(RR[RRRR(R RR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR s  (RRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR ss<-tCurveBcB seZdZdddZRS(s8 An arrow with a head at its end point. g?g?c C s2ttj|jdtdtd|d|dS(s *head_length* length of the arrow head *head_width* width of the arrow head RfRgRRN(RR[RRRR(R RR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR s  (RRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR ss->tCurveABcB seZdZdddZRS(sJ An arrow with heads both at the begin and the end point. g?g?c C s2ttj|jdtdtd|d|dS(s *head_length* length of the arrow head *head_width* width of the arrow head RfRgRRN(RR[RRR(R RR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR s  (RRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR ss<->t CurveFilledAcB seZdZdddZRS(sB An arrow with filled triangle head at the begin. g?g?c C s>ttj|jdtdtdtdtd|d|dS(s *head_length* length of the arrow head *head_width* width of the arrow head RfRgRhRiRRN(RR[RRRR(R RR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR s   (RRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR ss<|-t CurveFilledBcB seZdZdddZRS(s@ An arrow with filled triangle head at the end. g?g?c C s>ttj|jdtdtdtdtd|d|dS(s *head_length* length of the arrow head *head_width* width of the arrow head RfRgRhRiRRN(RR[RRRR(R RR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR* s   (RRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR% ss-|>t CurveFilledABcB seZdZdddZRS(sZ An arrow with filled triangle heads both at the begin and the end point. g?g?c C s>ttj|jdtdtdtdtd|d|dS(s *head_length* length of the arrow head *head_width* width of the arrow head RfRgRhRiRRN(RR[RRR(R RR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR@ s   (RRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR; ss<|-|>t_Bracketc B sAeZddddddddddd ZdZdZRS(g?g?c C sc|||_|_|||_|_|||_|_|||_|_| | |_|_ dS(N( tbracketAtbracketBtwidthAtwidthBtlengthAtlengthBR0R1tscaleAtscaleB( R RRRRRRR0R1RR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRS s cC sddlm}||||||\}} } } ||||} } || | | f|| f| | f| | | | fg}tjtjtjtjg}||fS(Ni(tget_normal_points(tmatplotlib.bezierRRRR(R RcRdRkRlRR$RR9R:R;R<RRRoRp((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt _get_bracket_ s$   cC s|jdkr|}n |j}|jdkr9|}n |j}gg}}|jr|jd\}} |jd\} } t| | || \} } |j|| | | |j||j|\}}|j ||j |n|j |j|j |j |j r|jd\}} |jd\} } t| | || \} } |j|| | | |j ||j |\}}|j ||j |ntj|}tj|}t||}|tfS(Niiii(RRRRRRRRRRzRRRRRRRR(R R2RR'RRt vertices_listt codes_listRcRdR9R:RkRlRrRsRxRyRRR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRu s>           N(RRRRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRQ s t BracketABcB s)eZdZdddddddZRS(s; An arrow with a bracket(]) at both ends. g?g?cC sDttj|jttd|d|d|d|d|d|dS(s *widthA* width of the bracket *lengthA* length of the bracket *angleA* angle between the bracket and the line *widthB* width of the bracket *lengthB* length of the bracket *angleB* angle between the bracket and the line RRR0RRR1N(RR[RRR(R RRR0RRR1((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR sN(RRRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR s s]-[tBracketAcB s eZdZddddZRS(s9 An arrow with a bracket(]) at its end. g?g?c C s2ttj|jdtd|d|d|dS(s *widthA* width of the bracket *lengthA* length of the bracket *angleA* angle between the bracket and the line RRR0N(RR[RRRR(R RRR0((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR s N(RRRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR ss]-tBracketBcB s eZdZddddZRS(s9 An arrow with a bracket([) at its end. g?g?c C s2ttj|jdtd|d|d|dS(s *widthB* width of the bracket *lengthB* length of the bracket *angleB* angle between the bracket and the line RRR1N(RR[RRRR(R RRR1((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR s N(RRRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR ss-[tBarABcB s#eZdZdddddZRS(s; An arrow with a bracket(]) at both ends. g?cC sDttj|jttd|ddd|d|ddd|dS( s *widthA* width of the bracket *lengthA* length of the bracket *angleA* angle between the bracket and the line *widthB* width of the bracket *lengthB* length of the bracket *angleB* angle between the bracket and the line RRiR0RRR1N(RR[RRR(R RR0RR1((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR sN(RRRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR ss|-|tSimplecB s)eZdZddddZdZRS(sK A simple arrow. Only works with a quadratic bezier curve. g?g?cC s7||||_|_|_ttj|jdS(s *head_length* length of the arrow head *head_with* width of the arrow head *tail_width* width of the arrow tail N(RRt tail_widthRR[RR(R RRR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR scC s|j|\}}}}}} |j|} t|| | } ||f||f|| fg} t| | dd\} }|j|}t||ddd\}}|j|}t| |d\}}||}}tj |dftj |dftj |dftj |dftj |dftj |dftj |dftj |dftj |dftj |dftj |dftj |dftj |dfg }tg|D]\}}|^qg|D]\}}|^q}|t fS( Nt tolerenceg{Gz?g@twmg?iii(R^RRRRRRRRRRRRR(R R2RR'RcRdR9R:R;R<Rtin_ft arrow_patht arrow_outtarrow_inRthead_lthead_rRt tail_leftt tail_rightt head_rightt head_leftt patch_pathR^R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR, s8! !   A(RRRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR stsimpletFancycB s)eZdZddddZdZRS(sJ A fancy arrow. Only works with a quadratic bezier curve. g?cC s7||||_|_|_ttj|jdS(s *head_length* length of the arrow head *head_with* width of the arrow head *tail_width* width of the arrow tail N(RRRRR[RR(R RRR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR_ scC sl|j|\}}}}}} |j|} ||f||f|| fg} t|| | } t| | dd\} }|}t|| | d} t| | dd\} }| }|j|}t||ddd\}}|j|}t||ddd ddd d \}}t|||d } t| | dd\}} |d }||}}tj|ftj |d ftj |dftj |dftj |d ftj |dftj |dftj |dftj |d ftj |dftj |dftj |d ftj |ftj |fg}tj|d ftj |dftj |dftj |d ftj |dftj |dftj |dftj |d ftj |dftj |dftj |d ftj |ftj |d ftj |d fg}tg|D]\}}|^q+g|D]\}}|^qG}|t fS(NRg{Gz?g?g@Rg333333?g?tw1g?tw2g333333?iiii( R^RRRRRRRRRRRR(R R2RR'RcRdR9R:R;R<RRRtpath_outtpath_int path_headt path_tailRRRRRRt tail_startRRRt patch_path2R^R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRp sp! !        A(RRRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRZ stfancyRcB s&eZdZdddZdZRS(s Wedge(?) shape. Only wokrs with a quadratic bezier curve. The begin point has a width of the tail_width and the end point has a width of 0. At the middle, the width is shrink_factor*tail_width. g333333?g?cC s,||_||_ttj|jdS(s *tail_width* width of the tail *shrink_factor* fraction of the arrow width at the middle point N(Rt shrink_factorRR[RR(R RR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR s  c C s,|j|\}}}}}} ||f||f|| fg} t| |j|dd|j\} } tj| dftj| dftj| dftj| dftj| dftj| dftj| dfg} tg| D]\}}|^qg| D]\}}|^q}|t fS(Ng@Riii( R^RRRRRRRRR(R R2RR'RcRdR9R:R;R<Rtb_plustb_minusRR^R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR s!!A(RRRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR stwedgetAvailableArrowstyles(RRRRRRReR}RRRRRRRRRRRRRRRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR[ sH%Z       Q    A e ,  RRZtFancyArrowPatchcB seZdZdZejdddddddddddddddZdZdZ d Z d Z d Z d Z d ZddZdZdZdZdZdZdZdZdZRS(sM A fancy arrow patch. It draws an arrow using the :class:ArrowStyle. cC sj|jdk rH|j\\}}\}}|jjd||||fS|jjdt|jfSdS(Ns(%g,%g->%g,%g)s(%s)(t _posA_posBRRRRt_path_original(R R9R:R;R<((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR s   RR.g@g?cK s |dk rX|dk rX|dkrX||g|_|dkrHd}n|j|nE|dkr|dkr|dk rd|_d|_n td||_| |_| |_| |_t j ||||_ |j || |_ | |_|j|dS(sE If *posA* and *posB* is given, a path connecting two point are created according to the connectionstyle. The path will be clipped with *patchA* and *patchB* and further shirnked by *shrinkA* and *shrinkB*. An arrow is drawn along this resulting path using the *arrowstyle* parameter. If *path* provided, an arrow is drawn along this path and *patchA*, *patchB*, *shrinkA*, and *shrinkB* are ignored. The *connectionstyle* describes how *posA* and *posB* are connected. It can be an instance of the ConnectionStyle class (matplotlib.patches.ConnectionStlye) or a string of the connectionstyle name, with optional comma-separated attributes. The following connection styles are available. %(AvailableConnectorstyles)s The *arrowstyle* describes how the fancy arrow will be drawn. It can be string of the available arrowstyle names, with optional comma-separated attributes, or one of the ArrowStyle instance. The optional attributes are meant to be scaled with the *mutation_scale*. The following arrow styles are available. %(AvailableArrowstyles)s *mutation_scale* : a value with which attributes of arrowstyle (e.g., head_length) will be scaled. default=1. *mutation_aspect* : The height of the rectangle will be squeezed by this value before the mutation and the mutated box will be stretched by the inverse of it. default=None. Valid kwargs are: %(Patch)s R.s.either posA and posB, or path need to providedN(RRtset_connectionstylet _connetorsRRRR R!RRRtset_arrowstyleRRt set_dpi_cor(R R$R%R2t arrowstyletarrow_transmutertconnectionstyleRRRR R!RRtdpi_corR-((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyR s&5$  $           cC s ||_dS(s dpi_cor is currently used for linewidth-related things and shink factor. Mutation scale is not affected by this. N(t_dpi_cor(R R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyRascC s|jS(s dpi_cor is currently used for linewidth-related things and shink factor. Mutation scale is not affected by this. (R(R ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patches.pyt get_dpi_coriscC s<|dk r||jdsv    ~>N<;'ReA) # %0@ ]