)Uc@ sddlmZddlZddlZddlZddljZddlmZmZddl m Z m Z m Z m Z ddlmZdZdefdYZd fd YZed ZeZd Zd ZejjdeedS(i(tdivisionN(t docstringtrcParams(tBboxtIdentityTransformtTransformedBboxtTransformedPath(tPathc sXddfd}j|_j|_j|_t|_|S(s- Decorator for Artist.draw method. Provides routines that run before and after the draw call. The before and after functions are useful for changing artist-dependant renderer attributes or making other setup function calls, such as starting and flushing a mixed-mode renderer. cS s<|jr|jn|jdk r8|jndS(N(tget_rasterizedtstart_rasterizingtget_agg_filtertNonet start_filter(tartisttrenderer((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytbefore$s  cS sE|jdk r(|j|jn|jrA|jndS(N(R R t stop_filterRtstop_rasterizing(R R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytafter,s c s1||||||||dS(N((R Rtargstkwargs(RRtdraw(sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt draw_wrapper5s (t__name__t__dict__t__doc__tTruet_supports_rasterization(RR((RRRsD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytallow_rasterizations      tArtistcB s<eZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d?d#Z&d$Z'd%Z(d&Z)d'Z*d(Z+d)Z,d*Z-d+Z.d,Z/d-Z0d.Z1d/Z2d0Z3d1Z4d2Z5d3Z6d4Z7d5Z8d6Z9d7Z:d8Z;d9Z<d:Z=d;Z>d<Z?d=Z@d?d>ZARS(@sW Abstract base class for someone who renders into a :class:`FigureCanvas`. RicC sd|_d|_t|_t|_t|_d|_d|_ d|_ t|_ t|_ d|_ d|_d|_d|_d|_t|_d|_i|_d|_d|_d|_d|_t|_t|_d|_dS(Nti(R tfiguret _transformtFalset _transformSetRt_visiblet _animatedt_alphatclipboxt _clippatht_clipont_lodt_labelt_pickert _containst _rasterizedt _agg_filterteventsont_oidt_propobserverstaxest_remove_methodt_urlt_gidtx_isdataty_isdatat_snap(tself((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt__init__Js2                        cC s/|jdkr|j|n tddS(s Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with :meth:`matplotlib.axes.Axes.draw_idle`. Call :meth:`matplotlib.axes.Axes.relim` to update the axes limits if desired. Note: :meth:`~matplotlib.axes.Axes.relim` will not see collections even if the collection was added to axes with *autolim* = True. Note: there is no support for removing the artist's legend entry. scannot remove artistN(R3R tNotImplementedError(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytremovegscC sD|j}|dks$|jdkr(tS|jjpC|jjS(s5Return *True* if units are set on the *x* or *y* axesN(R2R txaxisR!t have_unitstyaxis(R9tax((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyR>s cC sAt|dd}|dks-|jdkr1|S|jj|S(sjFor artists in an axes, if the xaxis has units support, convert *x* using xaxis unit type R2N(tgetattrR R=t convert_units(R9txR@((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytconvert_xunitsscC sAt|dd}|dks-|jdkr1|S|jj|S(sjFor artists in an axes, if the yaxis has units support, convert *y* using yaxis unit type R2N(RAR R?RB(R9tyR@((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytconvert_yunitsscC s ||_dS(s Set the :class:`~matplotlib.axes.Axes` instance in which the artist resides, if any. ACCEPTS: an :class:`~matplotlib.axes.Axes` instance N(R2(R9R2((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytset_axesscC s|jS(sm Return the :class:`~matplotlib.axes.Axes` instance the artist resides in, or *None* (R2(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytget_axesscC s)|j}||j|<|jd7_|S(s Adds a callback function that will be called whenever one of the :class:`Artist`'s properties changes. Returns an *id* that is useful for removing the callback with :meth:`remove_callback` later. i(R0R1(R9tfunctoid((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt add_callbacks  cC s&y|j|=Wntk r!nXdS(s Remove a callback based on its *id*. .. seealso:: :meth:`add_callback` For adding callbacks N(R1tKeyError(R9RJ((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytremove_callbacks  cC s.x'|jjD]\}}||qWdS(sg Fire an event when property changed, calling all of the registered callbacks. N(R1titems(R9RJRI((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytpchangedscC s|jS(s[ Returns *True* if :class:`Artist` has a transform explicitly set. (R"(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytis_transform_setscC s ||_t|_|jdS(s Set the :class:`~matplotlib.transforms.Transform` instance used by this artist. ACCEPTS: :class:`~matplotlib.transforms.Transform` instance N(R RR"RO(R9tt((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt set_transforms  cC s%|jdkrt|_n|jS(sl Return the :class:`~matplotlib.transforms.Transform` instance used by this artist. N(R R R(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt get_transformscC sddl}g}y/|j|\}}|r@|j|nWn|jdG|jGHnXx*|jD]}|j|j|qnW|S(sX List the children of the artist which contain the mouse event *event*. iNswhile checking(t tracebacktcontainstappendt print_exct __class__t get_childrentextendthitlist(R9teventRTtLt hascursortinfota((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyR[s  cC sgS(sd Return a list of the child :class:`Artist`s this :class:`Artist` contains. ((R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyRYscC s@t|jr|j||Stjd|jjtifS(sTest whether the artist contains the mouse event. Returns the truth value and a dictionary of artist specific details of selection, such as which points are contained in the pick radius. See individual artists for details. s'%s' needs 'contains' method(tcallableR,twarningstwarnRXRR!(R9t mouseevent((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyRUscC s ||_dS(s Replace the contains test used by this artist. The new picker should be a callable function which determines whether the artist is hit by the mouse event:: hit, props = picker(artist, mouseevent) If the mouse event is over the artist, return *hit* = *True* and *props* is a dictionary of properties you want returned with the contains test. ACCEPTS: a callable function N(R,(R9tpicker((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt set_containsscC s|jS(sV Return the _contains test used by the artist, or *None* for default. (R,(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt get_contains scC s.|jdk o-|jjdk o-|jdk S(s-Return *True* if :class:`Artist` is pickable.N(RR tcanvasR+(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytpickable&scC s|jrv|j}t|r<|||\}}n|j|\}}|rv|jjj|||qvnxT|jD]F}t|dd}|j dks|j |kr|j |qqWdS(s call signature:: pick(mouseevent) each child artist will fire a pick event if *mouseevent* is over the artist and the artist has picker set R2N( Rit get_pickerRaRURRht pick_eventRYRAR tinaxestpick(R9RdRetinsidetpropR`R@((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyRm,s   cC s ||_dS(s Set the epsilon for picking used by this artist *picker* can be one of the following: * *None*: picking is disabled for this artist (default) * A boolean: if *True* then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist * A float: if picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g. the indices of the data within epsilon of the pick event * A function: if picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event:: hit, props = picker(artist, mouseevent) to determine the hit test. if the mouse event is over the artist, return *hit=True* and props is a dictionary of properties you want added to the PickEvent attributes. ACCEPTS: [None|float|boolean|callable] N(R+(R9Re((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt set_pickerJs cC s|jS(s,Return the picker object used by this artist(R+(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyRjlscC s |jdk S(si Returns True if the artist is assigned to a :class:`~matplotlib.figure.Figure`. N(RR (R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt is_figure_setpscC s|jS(s! Returns the url (R4(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytget_urlwscC s ||_dS(sL Sets the url for the artist ACCEPTS: a url string N(R4(R9turl((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytset_url}scC s|jS(s& Returns the group id (R5(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytget_gidscC s ||_dS(sS Sets the (group) id for the artist ACCEPTS: an id string N(R5(R9tgid((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytset_gidscC stdr|jStSdS(sS Returns the snap setting which may be: * True: snap vertices to the nearest pixel center * False: leave vertices as-is * None: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center Only supported by the Agg and MacOSX backends. s path.snapN(RR8R!(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytget_snaps cC s ||_dS(sP Sets the snap setting which may be: * True: snap vertices to the nearest pixel center * False: leave vertices as-is * None: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center Only supported by the Agg and MacOSX backends. N(R8(R9tsnap((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytset_snaps cC s|jS(sg Return the :class:`~matplotlib.figure.Figure` instance the artist belongs to. (R(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt get_figurescC s||_|jdS(s Set the :class:`~matplotlib.figure.Figure` instance the artist belongs to. ACCEPTS: a :class:`matplotlib.figure.Figure` instance N(RRO(R9tfig((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt set_figures cC s||_|jdS(s Set the artist's clip :class:`~matplotlib.transforms.Bbox`. ACCEPTS: a :class:`matplotlib.transforms.Bbox` instance N(R&RO(R9R&((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt set_clip_boxs cC s_ddlm}m}t}|dkrt||rgttj|j |_ d|_ t }qt||rt |j|j |_ t }qt|tr|\}}qn|dkrd|_ t }nKt|trt |||_ t }n!t|t r'||_ t }n|sQt|Gt|GHtdn|jdS(s Set the artist's clip path, which may be: * a :class:`~matplotlib.patches.Patch` (or subclass) instance * a :class:`~matplotlib.path.Path` instance, in which case an optional :class:`~matplotlib.transforms.Transform` instance may be provided, which will be applied to the path before using it for clipping. * *None*, to remove the clipping path For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to *None*. ACCEPTS: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ] i(tPatcht Rectangles"Invalid arguments to set_clip_pathN(tpatchesRRR!R t isinstanceRRtunitRSR&R'RRtget_pathttupleRttypet TypeErrorRO(R9tpatht transformRRtsuccess((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt set_clip_paths6           cC s|jS(sb Return the alpha value used for blending - not supported on all backends (R%(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt get_alphascC s|jS(sReturn the artist's visiblity(R#(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt get_visible scC s|jS(s"Return the artist's animated state(R$(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt get_animatedscC s|jS(s#Return whether artist uses clipping(R((R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt get_clip_onscC s|jS(sReturn artist clipbox(R&(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt get_clip_boxscC s|jS(sReturn artist clip path(R'(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt get_clip_pathscC s |jdk r|jjSdS(s Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. N(NN(R'R tget_transformed_path_and_affine(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt$get_transformed_clip_path_and_affines cC s||_|jdS(sT Set whether artist uses clipping. ACCEPTS: [True | False] N(R(RO(R9tb((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt set_clip_on)s cC s\|jr>|jdk r+|j|jn|j|jn|jd|jddS(s Set the clip properly for the gcN(R(R&R tset_clip_rectangleRR'(R9tgc((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt _set_gc_clip2s   cC s|jS(s-return True if the artist is to be rasterized(R-(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyR<scC s:|r-t|jd r-tjd|n||_dS(s Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior ACCEPTS: [True | False | None] Rs%Rasterization of '%s' will be ignoredN(thasattrRRbRcR-(R9t rasterized((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytset_rasterized@scC s|jS(s0return filter function to be used for agg filter(R.(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyR MscC s ||_dS(s* set agg_filter fuction. N(R.(R9t filter_func((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytset_agg_filterQscO s|jsdSdS(sDerived classes drawing methodN(R(R9RRR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyRXs cC s||_|jdS(s Set the alpha value used for blending - not supported on all backends. ACCEPTS: float (0.0 transparent through 1.0 opaque) N(R%RO(R9talpha((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt set_alpha\s cC s||_|jdS(s Set Level of Detail on or off. If on, the artists may examine things like the pixel width of the axes and draw a subset of their contents accordingly ACCEPTS: [True | False] N(R)RO(R9ton((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytset_lodfs cC s||_|jdS(sN Set the artist's visiblity. ACCEPTS: [True | False] N(R#RO(R9R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt set_visibleqs cC s||_|jdS(sT Set the artist's animation state. ACCEPTS: [True | False] N(R$RO(R9R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt set_animated{s cC s|j}t|_t}xl|jD]^\}}t|d|d}|dks`t| rstd|n||t}q%W||_|r|jndS(sc Update the properties of this :class:`Artist` from the dictionary *prop*. tset_sUnknown property %sN( R/R!RNRAR RatAttributeErrorRRO(R9tpropststoretchangedtktvRI((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytupdates     cC s|jS(sC Get the label used for this artist in the legend. (R*(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt get_labelscC s||_|jdS(sT Set the label to *s* for auto legend. ACCEPTS: any string N(R*RO(R9ts((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt set_labels cC s|jS(s6 Return the :class:`Artist`'s zorder. (tzorder(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt get_zorderscC s||_|jdS(s Set the zorder for the artist. Artists with lower zorder values are drawn first. ACCEPTS: any number N(RRO(R9tlevel((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt set_zorders cC sz|j|_|j|_|j|_|j|_|j|_|j|_|j|_|j|_|j|_|j dS(s'Copy properties from *other* to *self*.N( R R"R#R%R&R(R'R)R*RO(R9tother((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt update_froms         cC st|jS(sY return a dictionary mapping property name -> value for all Artist props (tArtistInspectort properties(R9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyRscK sbg}xU|jD]G\}}|j}d|}t||}|j||gqW|S(sH A tkstyle set command, pass *kwargs* to set properties sset_%s(RNtlowerRARZ(R9RtretRRtfuncNameRI((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytsets  c sdkrd}nEtjtr<fd}n!trQ}n tdg}xe|jD]W}||r|j|n|jg|j |D]}||r|^qqpW||r|j|n|S(s pyplot signature: findobj(o=gcf(), match=None) Recursively find all :class:matplotlib.artist.Artist instances contained in self. *match* can be - None: return all objects contained in artist (including artist) - function with signature ``boolean = match(artist)`` used to filter matches - class instance: eg Line2D. Only return artists of class type .. plot:: mpl_examples/pylab_examples/findobj_demo.py cS stS(N(R(RC((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt matchfuncsc s t|S(N(R(RC(tmatch(sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyRssGmatch must be None, an matplotlib.artist.Artist subclass, or a callableN( R tcbooktissubclass_safeRRat ValueErrorRYRVRZtfindobj(R9RRtartiststctthisc((RsD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyRs      9 N(BRt __module__RtanameRR:R<R>RDRFRGRHRKRMRORPRRRSR[RYRURfRgRiRmRpRjRqRrRtRuRwRxRzR{R}R~R RRRRRRRRRRRRR RRRRRRRRRRRRRRR(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyRBs~              "         5                RcB seZdZdZdZejdZdZdZ dZ dZ dZ d Z dd d Zdd d Zd ZdZddZRS(s A helper class to inspect an :class:`~matplotlib.artist.Artist` and return information about it's settable properties and their current values. cC sktj|r(t|r(|d}n||_t|tsOt|}n||_|j|_dS(s? Initialize the artist inspector with an :class:`~matplotlib.artist.Artist` or sequence of :class:`Artists`. If a sequence is used, we assume it is a homogeneous sequence (all :class:`Artists` are of the same type) and it is your responsibility to make sure this is so. iN( RtiterabletlentoorigRRtot get_aliasestaliasd(R9R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyR: s   cC sgt|jD]B}|jds4|jdrtt|j|r|^q}i}xf|D]^}t|j|}|j|sqen|j}|d}d|j|di|d *alias* for each *alias* in the :class:`~matplotlib.artist.ArtistInspector`. Eg., for lines:: {'markerfacecolor': 'mfc', 'linewidth' : 'lw', } Rtget_i iN( tdirRt startswithRaRAtis_aliasRR t setdefault(R9tnametnamestaliasesRIRtfullname((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyRs $   "s*\n\s*ACCEPTS:\s*((?:.|\n)*?)(?:$|(?:\n\n))cC sd|}t|j|s8td|j|fnt|j|}|j}|dkrcdS|jdrvdS|jj|}|dk r|j dj ddSdS( sD Get the legal arguments for the setter associated with *attr*. This is done by querying the docstring of the function *set_attr* for a line that begins with ACCEPTS: Eg., for a line linestyle, return "[ ``'-'`` | ``'--'`` | ``'-.'`` | ``':'`` | ``'steps'`` | ``'None'`` ]" sset_%ss%s has no function %stunknowns alias for is t N( RRRRARR Rt_get_valid_values_regextsearchtgrouptreplace(R9tattrRRIRR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytget_valid_values5s    cC sg}xt|jD]}|jds1qnt|j|}t|sUqn|}|j|rpqn|jjd|jj}x>|jjD]-}||j kr|jd|j}PqqW|j |d|d|fqW|S(s Get the attribute strings and a full path to where the setter is defined for all setters in an object. Rt.i( RRRRARaRRRtmroRRV(R9tsettersRRRIt source_classtcls((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt_get_setters_and_targetsPs" #cC s#g|jD]\}}|^q S(s Get the attribute strings with setters for object. Eg., for a line, return ``['markerfacecolor', 'linewidth', ....]``. (R(R9Rottarget((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt get_settersescC s&|j}|dkrtS|jdS(s^ Return *True* if method object *o* is an alias for another function. s alias for N(RR R!R(R9Rtds((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyRms  cC sL||jkrD|djg|j|jD]}d|^q,S|SdS(s return 'PROPNAME or alias' if *s* has an alias, else return PROPNAME. E.g. for the line markerfacecolor property, which has an alias, return 'markerfacecolor or mfc' and for the transform property, which does not, return 'transform' Rs or %sN(Rtjointkeys(R9RRC((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyt aliased_namevs 5cC s\||jkrEdjg|j|jD]}d|^q)}nd}d|||fS(s- return 'PROPNAME or alias' if *s* has an alias, else return PROPNAME formatted for ReST E.g. for the line markerfacecolor property, which has an alias, return 'markerfacecolor or mfc' and for the transform property, which does not, return 'transform' Rs or %ss:meth:`%s <%s>`%s(RRR(R9RRRCR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytaliased_name_rests 6ic C s|rd|}nd}|dk rE|j|}d|||fS|j}|jg}xL|D]D\}}|j|}|j|}|jd|||fqhW|S(s If *prop* is *None*, return a list of strings of all settable properies and their valid values. If *prop* is not *None*, it is a valid property name and that property will be returned as a string of property : valid values. RRs%s%s: %sN(R RRtsortRRV( R9Rot leadingspacetpadtacceptstattrstlinesRR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytpprint_setterss     cC s+|rd|}nd}|d k rE|j|}d|||fS|j}|jg}g|D]\}}|j||^qh}g|D]\}}|j|^q}tg|D]} t| ^q} tg|D]} t| ^q} |d| dd| } |jd|j| |j|dj| ddj| |j| |j gt ||D]0\} } || j| d| j| ^q|j| |jd|SxO|D]G\}}|j|}|j||}|jd|||fqW|S( s. If *prop* is *None*, return a list of strings of all settable properies and their valid values. Format the output for ReST If *prop* is not *None*, it is a valid property name and that property will be returned as a string of property : valid values. RRs%s%s: %st=s tPropertyit DescriptionN( R RRRRtmaxRRVtljustRZtzip(R9RoRRRRRRRtntcol0_lenR`tcol1_lenttable_formatstrRR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytpprint_setters_rests:     +(%%    D  cC s|j}gt|D]0}|jdrtt||r|^q}|jt}xZ|D]R}t||}|j|rqfny |}Wn qfqfX|||d value Ri(RRRRaRARtdictR(R9RRtgetterstdRItval((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyRs  !    cC s|j}|j}|jg}x|D]}||}t|ddd krt|dkrt|d d}n t|}|jdd}t|dkr|d d}n|j|}|jd||fq/W|S( sJ Return the getters and actual values as list of strings. tshapeis...s Ri2s %s = %s((( RRRRARtstrRRRV(R9RRRRRR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytpprint_getterss     * c sdkrd}nBttr9fd}n!trNt}n tdg}xe|jD]W}||r|j|n|jg|j |D]}||r|^qqmW||r|j|n|S(s> Recursively find all :class:`matplotlib.artist.Artist` instances contained in *self*. If *match* is not None, it can be - function with signature ``boolean = match(artist)`` - class instance: eg :class:`~matplotlib.lines.Line2D` used to filter matches. cS stS(N(R(RC((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyR#sc s t|S(N(R(RC(R(sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyR%ssGmatch must be None, an matplotlib.artist.Artist subclass, or a callableN( R t issubclassRRaRIRRYRVRZR(R9RRRRR((RsD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyRs      9 N(RRRR:RtretcompileRRRRRRRR RRRRR(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyRs       3  cC sP|dkr6t|}|j}dj|GHdSt|d|}|S(sG Return the value of object's property. *property* is an optional string for the property you want to return Example usage:: getp(obj) # get all the object properties getp(obj, 'linestyle') # get the linestyle property *obj* is a :class:`Artist` instance, eg :class:`~matplotllib.lines.Line2D` or an instance of a :class:`~matplotlib.axes.Axes` or :class:`matplotlib.text.Text`. If the *property* is 'somename', this function returns obj.get_somename() :func:`getp` can be used to query all the gettable properties with ``getp(obj)``. Many properties have aliases for shorter typing, e.g. 'lw' is an alias for 'linewidth'. In the output, aliases and full property names will be listed as: property or alias = value e.g.: linewidth or lw = 2 s NR(R RRRRA(tobjtpropertytinspRRI((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytgetp=s   cO st|}t|dkrHt|dkrHdj|jGHdSt|dkrt|dkr|jd|dGHdStj|s|g}ntj|}t|drtdng}xCtdt|ddD]%}|j ||||dfqW|j |j g}x`|D]X}xO|D]G\} } | j } d| } t || } |j | | gqGWq:Wgtj|D] } | ^qS( s matplotlib supports the use of :func:`setp` ("set property") and :func:`getp` to set and get object properties, as well as to do introspection on the object. For example, to set the linestyle of a line to be dashed, you can do:: >>> line, = plot([1,2,3]) >>> setp(line, linestyle='--') If you want to know the valid types of arguments, you can provide the name of the property you want to set without a value:: >>> setp(line, 'linestyle') linestyle: [ '-' | '--' | '-.' | ':' | 'steps' | 'None' ] If you want to see all the properties that can be set, and their possible values, you can do:: >>> setp(line) ... long output listing omitted :func:`setp` operates on a single instance or a list of instances. If you are in query mode introspecting the possible values, only the first instance in the sequence is used. When actually setting values, all the instances will be set. E.g., suppose you have a list of two lines, the following will make both lines thicker and red:: >>> x = arange(0,1.0,0.01) >>> y1 = sin(2*pi*x) >>> y2 = sin(4*pi*x) >>> lines = plot(x, y1, x, y2) >>> setp(lines, linewidth=2, color='r') :func:`setp` works with the MATLAB style string/value pairs or with python kwargs. For example, the following are equivalent:: >>> setp(lines, 'linewidth', 2, 'color', r') # MATLAB style >>> setp(lines, linewidth=2, color='r') # python style is NiRois(The set args must be string, value pairssset_%s(RRRRRRtflattenRtrangeRVRZRNRRA(RRRRtobjstfuncvalstiRRRRRRIRC((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytsetpgs0+ $$ ##   cC sUtjd}|r2djt|jddSdjt|jddSdS(Nsdocstring.hardcopys Ri(t matplotlibRRRRR(R`thardcopy((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pytkwdocs (t __future__RRRbRtmatplotlib.cbookRRRt transformsRRRRRRRtobjectRRR R tgetRRtinterpdR(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/artist.pyts" " &9 ( L