3
$ßL]ËÊ  ã               @   s  d dl mZmZ d dlmZ d dlZd dlZd dlmZ d dl	Z	d dl
Z
d dlZd dlZddlmZmZmZ ddlmZ ddlmZmZmZmZmZmZ ejeƒZd	d
„ Zdd„ ZeddƒZ G dd„ de!ƒZ"G dd„ de!ƒZ#ddd„Z$e$Z%dd„ Z&dd„ Z'ej(j)e'e"ƒd� dS )é    )ÚOrderedDictÚ
namedtuple)ÚwrapsN)ÚNumberé   )ÚcbookÚ	docstringÚrcParams)ÚPath)ÚBboxÚIdentityTransformÚ	TransformÚTransformedBboxÚTransformedPatchPathÚTransformedPathc                s   t ˆ ƒ‡ fdd„ƒ}d|_|S )a-  
    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-dependent renderer attributes or making
    other setup function calls, such as starting and flushing a mixed-mode
    renderer.
    c                sh   z6| j ƒ r|jƒ  | jƒ d k	r&|jƒ  ˆ | |f|ž|ŽS | jƒ d k	rR|j| jƒ ƒ | j ƒ rb|jƒ  X d S )N)Úget_rasterizedZstart_rasterizingÚget_agg_filterZstart_filterZstop_filterZstop_rasterizing)ÚartistÚrendererÚargsÚkwargs)Údraw© ú9/tmp/pip-install-edjban26/matplotlib/matplotlib/artist.pyÚdraw_wrapper   s    z)allow_rasterization.<locals>.draw_wrapperT)r   Ú_supports_rasterization)r   r   r   )r   r   Úallow_rasterization   s    
r   c             C   s   | j r|| j _d S )N)ÚaxesÚstale)ÚselfÚvalr   r   r   Ú_stale_axes_callback1   s    r!   Ú_XYPairzx yc               @   s¬  e Zd ZdZejdƒedd„ ƒƒZdZe	d›d�Z
dd	„ Zd
d„ Zdd„ Zdd„ Zdd„ Zdd„ Zedd„ ƒZejdd„ ƒZedd„ ƒZejdd„ ƒZdd„ Zdd„ Zdd„ Zd d!„ Zd"d#„ Zd$d%„ Zd&d'„ Zd(d)„ Zd*d+„ Zd,d-„ Zd.d/„ Zd0d1„ Zd2d3„ Z d4d5„ Z!d6d7„ Z"d8d9„ Z#d:d;„ Z$d<d=„ Z%d>d?„ Z&d@dA„ Z'dBdC„ Z(dDdE„ Z)dFdG„ Z*dHdI„ Z+dœdKdL„Z,dMdN„ Z-dOdP„ Z.dQdR„ Z/dSdT„ Z0dUdV„ Z1d�dWdX„Z2dYdZ„ Z3d[d\„ Z4d]d^„ Z5d_d`„ Z6dadb„ Z7dcdd„ Z8dedf„ Z9dgdh„ Z:didj„ Z;dkdl„ Z<dmdn„ Z=dodp„ Z>dqdr„ Z?dsdt„ Z@dudv„ ZAdwdx„ ZBdydz„ ZCd{d|„ ZDd}d~„ ZEdd€„ ZFd�d‚„ ZGdƒd„„ ZHd…d†„ ZId‡dˆ„ ZJed‰dŠ„ ƒZKd‹dŒ„ ZLd�dŽ„ ZMd�d�„ ZNdžd’d“„ZOd”d•„ ZPd–d—„ ZQed˜d™„ ƒZReRjdšd™„ ƒZRdJS )ŸÚArtistz•
    Abstract base class for objects that render into a FigureCanvas.

    Typically, all visible elements in a figure are subclasses of Artist.
    z3.1c             C   s   dS )Nr#   r   )r   r   r   r   Úaname?   s    zArtist.anamer   r   )Úcolorc             C   sà   d| _ d | _d | _d | _d | _d| _d| _d| _d | _d | _	d | _
d| _d| _d | _d | _d | _d | _d| _d| _d| _i | _y
d | _W n tk
rœ   Y nX d | _d | _d | _d | _td | _td | _tg g ƒ| _d| _ d S )NTFÚ r   zpath.sketchzpath.effects)!Ú_staleÚstale_callbackÚ_axesÚfigureÚ
_transformÚ_transformSetÚ_visibleÚ	_animatedÚ_alphaÚclipboxÚ	_clippathÚ_cliponÚ_labelÚ_pickerÚ	_containsÚ_rasterizedÚ_agg_filterÚ
_mouseoverÚeventsonÚ_oidÚ_propobserversr   ÚAttributeErrorÚ_remove_methodÚ_urlÚ_gidÚ_snapr	   Ú_sketchÚ_path_effectsr"   Ú_sticky_edgesÚ
_in_layout)r   r   r   r   Ú__init__J   sB    


zArtist.__init__c             C   s   | j jƒ }d |d< |S )Nr(   )Ú__dict__Úcopy)r   Údr   r   r   Ú__getstate__o   s    
zArtist.__getstate__c             C   sr   | j dk	rf| j | ƒ d| _d}t| dƒrN| jrN| jjj| ƒ d| j_d| _d}| jrnd| _|snd| _ntdƒ‚dS )aÒ  
        Remove the artist from the figure if possible.

        The effect will not be visible until the figure is redrawn, e.g.,
        with `.FigureCanvasBase.draw_idle`.  Call `~.axes.Axes.relim` to
        update the axes limits if desired.

        Note: `~.axes.Axes.relim` will not see collections even if the
        collection was added to the axes with *autolim* = True.

        Note: there is no support for removing the artist's legend entry.
        NFr   Tzcannot remove artist)	r=   r(   Úhasattrr   Ú_mouseover_setÚdiscardr   r*   ÚNotImplementedError)r   Z_ax_flagr   r   r   Úremovev   s    

zArtist.removec             C   s0   | j }|dks|jdkrdS |jjƒ p.|jjƒ S )z6Return *True* if units are set on the *x* or *y* axes.NF)r   ÚxaxisÚ
have_unitsÚyaxis)r   Úaxr   r   r   rP   £   s    zArtist.have_unitsc             C   s.   t | ddƒ}|dks|jdkr"|S |jj|ƒS )zº
        Convert *x* using the unit type of the xaxis.

        If the artist is not in contained in an Axes or if the xaxis does not
        have units, *x* itself is returned.
        r   N)ÚgetattrrO   Úconvert_units)r   ÚxrR   r   r   r   Úconvert_xunitsª   s    zArtist.convert_xunitsc             C   s.   t | ddƒ}|dks|jdkr"|S |jj|ƒS )zº
        Convert *y* using the unit type of the yaxis.

        If the artist is not in contained in an Axes or if the yaxis does not
        have units, *y* itself is returned.
        r   N)rS   rQ   rT   )r   ÚyrR   r   r   r   Úconvert_yunits¶   s    zArtist.convert_yunitsc             C   s   | j S )z<The `~.axes.Axes` instance the artist resides in, or *None*.)r)   )r   r   r   r   r   Â   s    zArtist.axesc             C   sD   |d k	r$| j d k	r$|| j kr$tdƒ‚|| _ |d k	r@|| k	r@t| _|S )NzqCan not reset the axes.  You are probably trying to re-use an artist in more than one Axes which is not supported)r)   Ú
ValueErrorr!   r(   )r   Znew_axesr   r   r   r   Ç   s    
c             C   s   | j S )zŠ
        Whether the artist is 'stale' and needs to be re-drawn for the output
        to match the internal state of the artist.
        )r'   )r   r   r   r   r   Ó   s    zArtist.stalec             C   s0   || _ | jƒ rd S |r,| jd k	r,| j| |ƒ d S )N)r'   Úget_animatedr(   )r   r    r   r   r   r   Û   s
    c             C   s   t ddgddggƒS )aê  
        Get the axes bounding box in display space.

        The bounding box' width and height are nonnegative.

        Subclasses should override for inclusion in the bounding box
        "tight" calculation. Default is to return an empty bounding
        box at 0, 0.

        Be careful when using this function, the results will not update
        if the artist window extent of the artist changes.  The extent
        can change due to any changes in the transform stack, such as
        changing the axes limits, the figure size, or the canvas used
        (as is done when saving a figure).  This can lead to unexpected
        behavior where interactive figures will look fine on the screen,
        but will save incorrectly.
        r   )r   )r   r   r   r   r   Úget_window_extentè   s    zArtist.get_window_extentc             C   sT   d}| j ƒ rP| jƒ }|dk	r |}| jƒ }|dk	rP|dk	rP|jƒ }tj||jƒ ƒ}|S )zÃ
        Return a bbox with the extents of the intersection of the clip_path
        and clip_box for this artist, or None if both of these are
        None, or ``get_clip_on`` is False.
        N)Úget_clip_onÚget_clip_boxÚget_clip_pathÚget_fully_transformed_pathr   ÚintersectionÚget_extents)r   ÚbboxÚclip_boxÚ	clip_pathr   r   r   Ú_get_clipping_extent_bboxü   s    z Artist._get_clipping_extent_bboxc             C   sb   | j |ƒ}| jƒ r^| jƒ }|dk	r.tj||ƒ}| jƒ }|dk	r^|dk	r^|jƒ }tj||jƒ ƒ}|S )a‹  
        Like `Artist.get_window_extent`, but includes any clipping.

        Parameters
        ----------
        renderer : `.RendererBase` instance
            renderer that will be used to draw the figures (i.e.
            ``fig.canvas.get_renderer()``)

        Returns
        -------
        bbox : `.BBox`
            The enclosing bounding box (in figure pixel co-ordinates).
        N)r[   r\   r]   r   r`   r^   r_   ra   )r   r   rb   rc   rd   r   r   r   Úget_tightbbox  s    
zArtist.get_tightbboxc             C   s"   | j }|| j|< |  j d7  _ |S )a•  
        Add a callback function that will be called whenever one of the
        `.Artist`'s properties changes.

        Parameters
        ----------
        func : callable
            The callback function. It must have the signature::

                def func(artist: Artist) -> Any

            where *artist* is the calling `.Artist`. Return values may exist
            but are ignored.

        Returns
        -------
        oid : int
            The observer id associated with the callback. This id can be
            used for removing the callback with `.remove_callback` later.

        See Also
        --------
        remove_callback
        r   )r:   r;   )r   ÚfuncÚoidr   r   r   Úadd_callback'  s    
zArtist.add_callbackc             C   s&   y| j |= W n tk
r    Y nX dS )zu
        Remove a callback based on its observer id.

        See Also
        --------
        add_callback
        N)r;   ÚKeyError)r   rh   r   r   r   Úremove_callbackE  s    zArtist.remove_callbackc             C   s$   x| j jƒ D ]\}}|| ƒ qW dS )zÒ
        Call all of the registered callbacks.

        This function is triggered internally when a property is changed.

        See Also
        --------
        add_callback
        remove_callback
        N)r;   Úitems)r   rh   rg   r   r   r   ÚpchangedR  s    zArtist.pchangedc             C   s   | j S )zŒ
        Return whether the Artist has an explicitly set transform.

        This is *True* after `.set_transform` has been called.
        )r,   )r   r   r   r   Úis_transform_set`  s    zArtist.is_transform_setc             C   s   || _ d| _| jƒ  d| _dS )zk
        Set the artist transform.

        Parameters
        ----------
        t : `.Transform`
        TN)r+   r,   rm   r   )r   Útr   r   r   Úset_transformh  s    zArtist.set_transformc             C   sD   | j dkrtƒ | _ n*t| j tƒ r>t| j dƒr>| j j| jƒ| _ | j S )z5Return the `.Transform` instance used by this artist.NÚ_as_mpl_transform)r+   r   Ú
isinstancer   rJ   rq   r   )r   r   r   r   Úget_transformu  s    

zArtist.get_transformc             C   s   g S )z9Return a list of the child `.Artist`\s of this `.Artist`.r   )r   r   r   r   Úget_children~  s    zArtist.get_childrenc             C   s.   | j dk	r| j | |ƒS tjd| jjƒ di fS )a4  Test whether the artist contains the mouse event.

        Parameters
        ----------
        mouseevent : `matplotlib.backend_bases.MouseEvent`

        Returns
        -------
        contains : bool
            Whether any values are within the radius.
        details : dict
            An artist-specific dictionary of details of the event context,
            such as which points are contained in the pick radius. See the
            individual Artist subclasses for details.

        See Also
        --------
        set_contains, get_contains
        Nz%r needs 'contains' methodF)r5   Ú_logÚwarningÚ	__class__Ú__name__)r   Ú
mouseeventr   r   r   Úcontains‚  s    
zArtist.containsc             C   s   t |ƒstdƒ‚|| _dS )a  
        Define a custom contains test for the artist.

        The provided callable replaces the default `.contains` method
        of the artist.

        Parameters
        ----------
        picker : callable
            A custom picker function to evaluate if an event is within the
            artist. The function must have the signature::

                def contains(artist: Artist, event: MouseEvent) -> bool, dict

            that returns:

            - a bool indicating if the event is within the artist
            - a dict of additional information. The dict should at least
              return the same information as the default ``contains()``
              implementation of the respective artist, but may provide
              additional information.
        zpicker is not a callableN)ÚcallableÚ	TypeErrorr5   )r   Úpickerr   r   r   Úset_contains›  s    zArtist.set_containsc             C   s   | j S )zŽ
        Return the custom contains function of the artist if set, or *None*.

        See Also
        --------
        set_contains
        )r5   )r   r   r   r   Úget_contains¶  s    zArtist.get_containsc             C   s   | j dk	o| jdk	S )z€
        Return whether the artist is pickable.

        See Also
        --------
        set_picker, get_picker, pick
        N)r*   r4   )r   r   r   r   ÚpickableÀ  s    zArtist.pickablec             C   s–   | j ƒ rN| jƒ }t|ƒr(|| |ƒ\}}n| j|ƒ\}}|rN| jjj|| f|Ž xB| jƒ D ]6}t|ddƒ}|j	dks„|dks„|j	|krX|j
|ƒ qXW dS )zï
        Process a pick event.

        Each child artist will fire a pick event if *mouseevent* is over
        the artist and the artist has picker set.

        See Also
        --------
        set_picker, get_picker, pickable
        r   N)r€   Ú
get_pickerr{   rz   r*   ZcanvasZ
pick_eventrt   rS   ZinaxesÚpick)r   ry   r}   ZinsideÚpropÚarR   r   r   r   r‚   Ê  s    
zArtist.pickc             C   s
   || _ dS )a=  
        Define the picking behavior of the artist.

        Parameters
        ----------
        picker : None or bool or float or callable
            This 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.

        N)r4   )r   r}   r   r   r   Ú
set_pickerí  s    "zArtist.set_pickerc             C   s   | j S )z¿
        Return the picking behavior of the artist.

        The possible values are described in `.set_picker`.

        See Also
        --------
        set_picker, pickable, pick
        )r4   )r   r   r   r   r�     s    
zArtist.get_pickerc             C   s   | j S )zReturn the url.)r>   )r   r   r   r   Úget_url  s    zArtist.get_urlc             C   s
   || _ dS )zf
        Set the url for the artist.

        Parameters
        ----------
        url : str
        N)r>   )r   Úurlr   r   r   Úset_url!  s    zArtist.set_urlc             C   s   | j S )zReturn the group id.)r?   )r   r   r   r   Úget_gid+  s    zArtist.get_gidc             C   s
   || _ dS )zm
        Set the (group) id for the artist.

        Parameters
        ----------
        gid : str
        N)r?   )r   Úgidr   r   r   Úset_gid/  s    zArtist.set_gidc             C   s   t d r| jS dS dS )zQ
        Returns the snap setting.

        See `.set_snap` for details.
        z	path.snapFN)r	   r@   )r   r   r   r   Úget_snap9  s    zArtist.get_snapc             C   s   || _ d| _dS )aí  
        Set the snapping behavior.

        Snapping aligns positions with the pixel grid, which results in
        clearer images. For example, if a black line of 1px width was
        defined at a position in between two pixels, the resulting image
        would contain the interpolated value of that line in the pixel grid,
        which would be a grey value on both adjacent pixel positions. In
        contrast, snapping will move the line to the nearest integer pixel
        value, so that the resulting image will really contain a 1px wide
        black line.

        Snapping is currently only supported by the Agg and MacOSX backends.

        Parameters
        ----------
        snap : bool or None
            Possible values:

            - *True*: Snap vertices to the nearest pixel center.
            - *False*: Do not modify vertex positions.
            - *None*: (auto) If the path contains only rectilinear line
              segments, round to the nearest pixel center.
        TN)r@   r   )r   Zsnapr   r   r   Úset_snapD  s    zArtist.set_snapc             C   s   | j S )a  
        Returns the sketch parameters for the artist.

        Returns
        -------
        sketch_params : tuple or None

            A 3-tuple with the following elements:

            - *scale*: The amplitude of the wiggle perpendicular to the
              source line.
            - *length*: The length of the wiggle along the line.
            - *randomness*: The scale factor by which the length is
              shrunken or expanded.

            Returns *None* if no sketch parameters were set.
        )rA   )r   r   r   r   Úget_sketch_params`  s    zArtist.get_sketch_paramsNc             C   s.   |dkrd| _ n||pd|pdf| _ d| _dS )a~  
        Sets the sketch parameters.

        Parameters
        ----------

        scale : float, optional
            The amplitude of the wiggle perpendicular to the source
            line, in pixels.  If scale is `None`, or not provided, no
            sketch filter will be provided.

        length : float, optional
             The length of the wiggle along the line, in pixels
             (default 128.0)

        randomness : float, optional
            The scale factor by which the length is shrunken or
            expanded (default 16.0)

            .. ACCEPTS: (scale: float, length: float, randomness: float)
        Ng      `@g      0@T)rA   r   )r   ZscaleÚlengthZ
randomnessr   r   r   Úset_sketch_paramst  s    zArtist.set_sketch_paramsc             C   s   || _ d| _dS )zrSet the path effects.

        Parameters
        ----------
        path_effects : `.AbstractPathEffect`
        TN)rB   r   )r   Zpath_effectsr   r   r   Úset_path_effects�  s    zArtist.set_path_effectsc             C   s   | j S )N)rB   )r   r   r   r   Úget_path_effectsš  s    zArtist.get_path_effectsc             C   s   | j S )z4Return the `.Figure` instance the artist belongs to.)r*   )r   r   r   r   Ú
get_figure�  s    zArtist.get_figurec             C   sH   | j |krdS | j dk	r tdƒ‚|| _ | j r>| j | k	r>| jƒ  d| _dS )z‚
        Set the `.Figure` instance the artist belongs to.

        Parameters
        ----------
        fig : `.Figure`
        Nz1Can not put single artist in more than one figureT)r*   ÚRuntimeErrorrm   r   )r   Zfigr   r   r   Ú
set_figure¡  s    	

zArtist.set_figurec             C   s   || _ | jƒ  d| _dS )zq
        Set the artist's clip `.Bbox`.

        Parameters
        ----------
        clipbox : `.Bbox`
        TN)r0   rm   r   )r   r0   r   r   r   Úset_clip_box¹  s    zArtist.set_clip_boxc             C   sþ   ddl m}m} d}|dkrrt||ƒrFttjƒ |jƒ ƒ| _d| _	d}n,t||ƒr`t
|ƒ| _	d}nt|tƒrr|\}}|dkr†d| _	d}nFt|tƒr¢t||ƒ| _	d}n*t|t
ƒr¸|| _	d}nt|tƒrÌ|| _	d}|sìtdjt|ƒjt|ƒjƒƒ‚| jƒ  d| _dS )aÈ  
        Set the artist's clip path, which may be:

        - a :class:`~matplotlib.patches.Patch` (or subclass) instance; or
        - a :class:`~matplotlib.path.Path` instance, in which case a
          :class:`~matplotlib.transforms.Transform` instance, which will be
          applied to the path before using it for clipping, must be provided;
          or
        - ``None``, to remove a previously set 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: [(`~matplotlib.path.Path`, `.Transform`) | `.Patch` | None]
        r   )ÚPatchÚ	RectangleFNTz5Invalid arguments to set_clip_path, of type {} and {})Zmatplotlib.patchesr—   r˜   rr   r   r   Úunitrs   r0   r1   r   Útupler
   r   r|   ÚformatÚtyperx   rm   r   )r   ÚpathZ	transformr—   r˜   Úsuccessr   r   r   Úset_clip_pathÅ  s>    






zArtist.set_clip_pathc             C   s   | j S )zb
        Return the alpha value used for blending - not supported on all
        backends
        )r/   )r   r   r   r   Ú	get_alphaû  s    zArtist.get_alphac             C   s   | j S )zReturn the visibility.)r-   )r   r   r   r   Úget_visible  s    zArtist.get_visiblec             C   s   | j S )zReturn the animated state.)r.   )r   r   r   r   rZ     s    zArtist.get_animatedc             C   s   | j S )a  
        Return boolean flag, ``True`` if artist is included in layout
        calculations.

        E.g. :doc:`/tutorials/intermediate/constrainedlayout_guide`,
        `.Figure.tight_layout()`, and
        ``fig.savefig(fname, bbox_inches='tight')``.
        )rD   )r   r   r   r   Úget_in_layout
  s    	zArtist.get_in_layoutc             C   s   | j S )z(Return whether the artist uses clipping.)r2   )r   r   r   r   r\     s    zArtist.get_clip_onc             C   s   | j S )zReturn the clipbox.)r0   )r   r   r   r   r]     s    zArtist.get_clip_boxc             C   s   | j S )zReturn the clip path.)r1   )r   r   r   r   r^     s    zArtist.get_clip_pathc             C   s   | j dk	r| j jƒ S dS )z£
        Return the clip path with the non-affine part of its
        transformation applied, and the remaining affine part of its
        transformation.
        N)NN)r1   Zget_transformed_path_and_affine)r   r   r   r   Ú$get_transformed_clip_path_and_affine!  s    

z+Artist.get_transformed_clip_path_and_affinec             C   s   || _ | jƒ  d| _dS )zÞ
        Set whether the artist uses clipping.

        When False artists will be visible out side of the axes which
        can lead to unexpected results.

        Parameters
        ----------
        b : bool
        TN)r2   rm   r   )r   Úbr   r   r   Úset_clip_on+  s    zArtist.set_clip_onc             C   sB   | j r*| jdk	r|j| jƒ |j| jƒ n|jdƒ |jdƒ dS )z Set the clip properly for the gcN)r2   r0   Zset_clip_rectanglerŸ   r1   )r   Úgcr   r   r   Ú_set_gc_clip<  s    

zArtist._set_gc_clipc             C   s   | j S )z.Return whether the artist is to be rasterized.)r6   )r   r   r   r   r   F  s    zArtist.get_rasterizedc             C   s*   |r t | jdƒ r tjd|  ƒ || _dS )zß
        Force rasterized (bitmap) drawing in vector backend output.

        Defaults to None, which implies the backend's default behavior.

        Parameters
        ----------
        rasterized : bool or None
        r   z%Rasterization of '%s' will be ignoredN)rJ   r   r   Z_warn_externalr6   )r   Z
rasterizedr   r   r   Úset_rasterizedJ  s    

zArtist.set_rasterizedc             C   s   | j S )z1Return filter function to be used for agg filter.)r7   )r   r   r   r   r   Z  s    zArtist.get_agg_filterc             C   s   || _ d| _dS )ap  Set the agg filter.

        Parameters
        ----------
        filter_func : callable
            A filter function, which takes a (m, n, 3) float array and a dpi
            value, and returns a (m, n, 3) array.

            .. ACCEPTS: a filter function, which takes a (m, n, 3) float array
                and a dpi value, and returns a (m, n, 3) array
        TN)r7   r   )r   Zfilter_funcr   r   r   Úset_agg_filter^  s    zArtist.set_agg_filterc             O   s   | j ƒ sdS d| _dS )aV  
        Draw the Artist using the given renderer.

        This method will be overridden in the Artist subclasses. Typically,
        it is implemented to not have any effect if the Artist is not visible
        (`.Artist.get_visible` is *False*).

        Parameters
        ----------
        renderer : `.RendererBase` subclass.
        NF)r¡   r   )r   r   r   r   r   r   r   r   m  s    zArtist.drawc             C   s   || _ | jƒ  d| _dS )z•
        Set the alpha value used for blending - not supported on all backends.

        Parameters
        ----------
        alpha : float
        TN)r/   rm   r   )r   Úalphar   r   r   Ú	set_alpha}  s    zArtist.set_alphac             C   s   || _ | jƒ  d| _dS )zf
        Set the artist's visibility.

        Parameters
        ----------
        b : bool
        TN)r-   rm   r   )r   r¤   r   r   r   Úset_visible‰  s    zArtist.set_visiblec             C   s   | j |kr|| _ | jƒ  dS )zk
        Set the artist's animation state.

        Parameters
        ----------
        b : bool
        N)r.   rm   )r   r¤   r   r   r   Úset_animated•  s    
zArtist.set_animatedc             C   s
   || _ dS )a)  
        Set if artist is to be included in layout calculations,
        E.g. :doc:`/tutorials/intermediate/constrainedlayout_guide`,
        `.Figure.tight_layout()`, and
        ``fig.savefig(fname, bbox_inches='tight')``.

        Parameters
        ----------
        in_layout : bool
        N)rD   )r   Z	in_layoutr   r   r   Úset_in_layout¡  s    zArtist.set_in_layoutc          
      sT   dd„ ‰ t jˆdd�� ‡ ‡fdd„|jƒ D ƒ}W dQ R X t|ƒrPˆjƒ  dˆ_|S )	zN
        Update this artist's properties from the dictionary *props*.
        c             S   sV   |j ƒ }|dkrt| ||ƒS t| d| dƒ}t|ƒsJtdjt| ƒj|ƒƒ‚||ƒS dS )aŽ  Sorting out how to update property (setter or setattr).

            Parameters
            ----------
            k : str
                The name of property to update
            v : obj
                The value to assign to the property

            Returns
            -------
            ret : obj or None
                If using a `set_*` method return it's return, else None.
            r   Úset_Nz {!r} object has no property {!r}>   r   )ÚlowerÚsetattrrS   r{   r<   r›   rœ   rx   )r   ÚkÚvrg   r   r   r   Ú_update_property²  s    z'Artist.update.<locals>._update_propertyF)r9   c                s   g | ]\}}ˆ ˆ||ƒ‘qS r   r   )Ú.0r²   r³   )r´   r   r   r   ú
<listcomp>Î  s    z!Artist.update.<locals>.<listcomp>NT)r   Z_setattr_cmrl   Úlenrm   r   )r   ÚpropsÚretr   )r´   r   r   Úupdate®  s    "zArtist.updatec             C   s   | j S )z4Return the label used for this artist in the legend.)r3   )r   r   r   r   Ú	get_labelÕ  s    zArtist.get_labelc             C   s,   |dk	rt |ƒ| _nd| _| jƒ  d| _dS )z½
        Set a label that will be displayed in the legend.

        Parameters
        ----------
        s : object
            *s* will be converted to a string by calling `str`.
        NT)Ústrr3   rm   r   )r   Úsr   r   r   Ú	set_labelÙ  s
    	zArtist.set_labelc             C   s   | j S )zReturn the artist's zorder.)Úzorder)r   r   r   r   Ú
get_zorderé  s    zArtist.get_zorderc             C   s(   |dkr| j j}|| _| jƒ  d| _dS )z¨
        Set the zorder for the artist.  Artists with lower zorder
        values are drawn first.

        Parameters
        ----------
        level : float
        NT)rw   r¿   rm   r   )r   Úlevelr   r   r   Ú
set_zorderí  s
    	zArtist.set_zorderc             C   s   | j S )a–  
        ``x`` and ``y`` sticky edge lists for autoscaling.

        When performing autoscaling, if a data limit coincides with a value in
        the corresponding sticky_edges list, then no margin will be added--the
        view limit "sticks" to the edge. A typical use case is histograms,
        where one usually expects no margin on the bottom edge (0) of the
        histogram.

        This attribute cannot be assigned to; however, the ``x`` and ``y``
        lists can be modified in place as needed.

        Examples
        --------

        >>> artist.sticky_edges.x[:] = (xmin, xmax)
        >>> artist.sticky_edges.y[:] = (ymin, ymax)

        )rC   )r   r   r   r   Ústicky_edgesü  s    zArtist.sticky_edgesc             C   sš   |j | _ |j| _|j| _|j| _|j| _|j| _|j| _|j| _|j| _|j	| _	|j
jdd… | j
jdd…< |j
jdd… | j
jdd…< | jƒ  d| _dS )z'Copy properties from *other* to *self*.NT)r+   r,   r-   r/   r0   r2   r1   r3   rA   rB   rÃ   rU   rW   rm   r   )r   Úotherr   r   r   Úupdate_from  s    zArtist.update_fromc             C   s   t | ƒjƒ S )z8Return a dictionary of all the properties of the artist.)ÚArtistInspectorÚ
properties)r   r   r   r   rÇ   $  s    zArtist.propertiesc                s@   t j|ttˆ ƒdi ƒƒ}tt|jƒ d‡ fdd„d�ƒ}ˆ j|ƒS )z:A property batch setter.  Pass *kwargs* to set properties.Z
_alias_mapTc                s   ˆ j j| d dƒ| d fS )Nr   )Ú_prop_orderÚget)rU   )r   r   r   Ú<lambda>.  s    zArtist.set.<locals>.<lambda>)ÚreverseÚkey)r   Znormalize_kwargsrS   rœ   r   Úsortedrl   rº   )r   r   r¸   r   )r   r   Úset(  s    
z
Artist.setTc                s€   ˆ dkrdd„ ‰n8t ˆ tƒr4tˆ tƒr4‡ fdd„‰ntˆ ƒrBˆ ‰ntdƒ‚t‡fdd„| jƒ D ƒg ƒ}|r|ˆ| ƒr||j| ƒ |S )a  
        Find artist objects.

        Recursively find all `.Artist` instances contained in the artist.

        Parameters
        ----------
        match
            A filter criterion for the matches. This can be

            - *None*: Return all objects contained in artist.
            - A function with signature ``def match(artist: Artist) -> bool``.
              The result will only contain artists for which the function
              returns *True*.
            - A class instance: e.g., `.Line2D`. The result will only contain
              artists of this class or its subclasses (``isinstance`` check).

        include_self : bool
            Include *self* in the list to be checked for a match.

        Returns
        -------
        artists : list of `.Artist`

        Nc             S   s   dS )NTr   )rU   r   r   r   Ú	matchfuncL  s    z!Artist.findobj.<locals>.matchfuncc                s
   t | ˆ ƒS )N)rr   )rU   )Úmatchr   r   rÏ   O  s    zFmatch must be None, a matplotlib.artist.Artist subclass, or a callablec                s   g | ]}|j ˆ ƒ‘qS r   )Úfindobj)rµ   Úc)rÏ   r   r   r¶   W  s    z"Artist.findobj.<locals>.<listcomp>)	rr   rœ   Ú
issubclassr#   r{   rY   Úsumrt   Úappend)r   rÐ   Zinclude_selfZartistsr   )rÐ   rÏ   r   rÑ   1  s    

zArtist.findobjc             C   s   dS )a§  
        Return the cursor data for a given event.

        .. note::
            This method is intended to be overridden by artist subclasses.
            As an end-user of Matplotlib you will most likely not call this
            method yourself.

        Cursor data can be used by Artists to provide additional context
        information for a given event. The default implementation just returns
        *None*.

        Subclasses can override the method and return arbitrary data. However,
        when doing so, they must ensure that `.format_cursor_data` can convert
        the data to a string representation.

        The only current use case is displaying the z-value of an `.AxesImage`
        in the status bar of a plot window, while moving the mouse.

        Parameters
        ----------
        event : `matplotlib.backend_bases.MouseEvent`

        See Also
        --------
        format_cursor_data

        Nr   )r   Úeventr   r   r   Úget_cursor_data\  s    zArtist.get_cursor_datac             C   sL   y|d  W n t tfk
r*   |g}Y nX djdd„ |D ƒƒ}d| d S )aÛ  
        Return a string representation of *data*.

        .. note::
            This method is intended to be overridden by artist subclasses.
            As an end-user of Matplotlib you will most likely not call this
            method yourself.

        The default implementation converts ints and floats and arrays of ints
        and floats into a comma-separated string enclosed in square brackets.

        See Also
        --------
        get_cursor_data
        r   z, c             s   s"   | ]}t |tƒrd j|ƒV  qdS )z{:0.3g}N)rr   r   r›   )rµ   Úitemr   r   r   ú	<genexpr>�  s    z,Artist.format_cursor_data.<locals>.<genexpr>ú[ú])r|   Ú
IndexErrorÚjoin)r   ÚdataZdata_strr   r   r   Úformat_cursor_data{  s    zArtist.format_cursor_datac             C   s   | j S )N)r8   )r   r   r   r   Ú	mouseover“  s    zArtist.mouseoverc             C   s:   t |ƒ}|| _| j}|r6|r*|jj| ƒ n|jj| ƒ d S )N)Úboolr8   r   rK   ÚaddrL   )r   r    rR   r   r   r   rà   —  s    éÿÿÿÿ)NNN)N)NT)Srx   Ú
__module__Ú__qualname__Ú__doc__r   Ú
deprecatedÚpropertyr$   r¿   ÚdictrÈ   rE   rI   rN   rP   rV   rX   r   Úsetterr   r[   re   rf   ri   rk   rm   rn   rp   rs   rt   rz   r~   r   r€   r‚   r…   r�   r†   rˆ   r‰   r‹   rŒ   r�   rŽ   r�   r‘   r’   r“   r•   r–   rŸ   r    r¡   rZ   r¢   r\   r]   r^   r£   r¥   r§   r   r¨   r   r©   r   r«   r¬   r­   r®   rº   r»   r¾   rÀ   rÂ   rÃ   rÅ   rÇ   rÎ   rÑ   r×   rß   rà   r   r   r   r   r#   9   sž   
%-	

#$




6

'	
+r#   c               @   s†   e Zd ZdZdd„ Zdd„ ZejdƒZdd„ Z	d	d
„ Z
dd„ Zdd„ Zdd„ Zdd„ Zdd„ Zd dd„Zd!dd„Zdd„ Zdd„ ZdS )"rÆ   z•
    A helper class to inspect an `~matplotlib.artist.Artist` and return
    information about its settable properties and their current values.
    c             C   sX   t |tƒs,tj|ƒr,t|ƒ}t|ƒr,|d }|| _t |tƒsDt|ƒ}|| _| j	ƒ | _
dS )a  
        Initialize the artist inspector with an `Artist` or an iterable of
        `Artist`\s.  If an iterable is used, we assume it is a homogeneous
        sequence (all `Artists` are of the same type) and it is your
        responsibility to make sure this is so.
        r   N)rr   r#   ÚnpÚiterableÚlistr·   Úoorigrœ   ÚoÚget_aliasesÚaliasd)r   rï   r   r   r   rE   ©  s    


zArtistInspector.__init__c                s�   ‡ fdd„t ˆ jƒD ƒ}i }xn|D ]f}tˆ j|ƒ}ˆ j|ƒs>q"tjdj|dd… ƒtj|ƒƒj	dƒ}|j
|dd… tƒ ƒj|dd… ƒ q"W |S )a
  
        Get a dict mapping property fullnames to sets of aliases for each alias
        in the :class:`~matplotlib.artist.ArtistInspector`.

        e.g., for lines::

          {'markerfacecolor': {'mfc'},
           'linewidth'      : {'lw'},
          }
        c                s*   g | ]"}|j dƒrttˆ j|ƒƒr|‘qS )r¯   Úget_)r¯   rò   )Ú
startswithr{   rS   rï   )rµ   Úname)r   r   r   r¶   È  s    
z/ArtistInspector.get_aliases.<locals>.<listcomp>z`({}.*)`Né   r   )Údirrï   rS   Úis_aliasÚreÚsearchr›   ÚinspectÚgetdocÚgroupÚ
setdefaultrÎ   râ   )r   ÚnamesÚaliasesrô   rg   Zpropnamer   )r   r   rð   ½  s    

(zArtistInspector.get_aliasesz6\n\s*(?:\.\.\s+)?ACCEPTS:\s*((?:.|\n)*?)(?:$|(?:\n\n))c             C   s®   d| }t | j|ƒs&td| j|f ƒ‚t| j|ƒ}tj|ƒ}|dkrHdS |jdƒrVdS | jj|ƒ}|dk	r~t	j
dd|jdƒƒS |jjd }t	jd	j|ƒ|ƒ}|rª|jdƒS dS )
a/  
        Get the legal arguments for the setter associated with *attr*.

        This is done by querying the docstring of the setter for a line that
        begins with "ACCEPTS:" or ".. ACCEPTS:", and then by looking for a
        numpydoc-style documentation for the setter's first argument.
        zset_%sz%s has no function %sNÚunknownz
Alias for z
 *ú r   z(?m)^ *\*?{} : (.+))rJ   rï   r<   rS   rú   rû   ró   Ú_get_valid_values_regexrù   rø   Úsubrü   Ú__code__Úco_varnamesr›   )r   Úattrrô   rg   r   rÐ   Ú
param_namer   r   r   Úget_valid_valuesÙ  s"    	


z ArtistInspector.get_valid_valuesc             C   sÎ   g }xÄt | jƒD ]¶}|jdƒs qt| j|ƒ}t|ƒs6qttj|ƒjƒ}|dk s| j	|ƒrZq| jj
d | jj }x.| jjƒ D ] }||jkrz|j
d |j }P qzW | j|ƒ}|j|dd… |d | fƒ qW |S )z€
        Get the attribute strings and a full path to where the setter
        is defined for all setters in an object.
        r¯   é   Ú.rõ   N)rö   rï   ró   rS   r{   r·   rú   Úgetfullargspecr   r÷   rä   rx   ÚmrorF   Ú_replace_pathrÕ   )r   Zsettersrô   rg   ÚnargsÚsource_classÚclsr   r   r   Ú_get_setters_and_targetsý  s$    


"z(ArtistInspector._get_setters_and_targetsc             C   s0   dddœ}x |j ƒ D ]\}}|j||ƒ}qW |S )z€
        Changes the full path to the public API path that is used
        in sphinx. This is needed for links to work.
        ZAxes)z_base._AxesBasez
_axes.Axes)rl   Úreplace)r   r  Zreplace_dictrÌ   Úvaluer   r   r   r    s
    zArtistInspector._replace_pathc             C   s   dd„ | j ƒ D ƒS )z’
        Get the attribute strings with setters for object.  e.g., for a line,
        return ``['markerfacecolor', 'linewidth', ....]``.
        c             S   s   g | ]\}}|‘qS r   r   )rµ   rƒ   Útargetr   r   r   r¶   %  s    z/ArtistInspector.get_setters.<locals>.<listcomp>)r  )r   r   r   r   Úget_setters   s    zArtistInspector.get_settersc             C   s    t j|ƒ}|dkrdS |jdƒS )z@Return whether method object *o* is an alias for another method.NFz
Alias for )rú   rû   ró   )r   rï   Zdsr   r   r   r÷   '  s    
zArtistInspector.is_aliasc             C   s*   dj dd„ t| jj|g ƒƒD ƒƒ}|| S )a  
        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'.
        r&   c             s   s   | ]}d | V  qdS )z or %sNr   )rµ   rU   r   r   r   rÙ   6  s    z/ArtistInspector.aliased_name.<locals>.<genexpr>)rÝ   rÍ   rñ   rÉ   )r   r½   rÿ   r   r   r   Úaliased_name.  s    "zArtistInspector.aliased_namec             C   s0   dj dd„ t| jj|g ƒƒD ƒƒ}d|||f S )a3  
        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'.
        r&   c             s   s   | ]}d | V  qdS )z or %sNr   )rµ   rU   r   r   r   rÙ   B  s    z4ArtistInspector.aliased_name_rest.<locals>.<genexpr>z:meth:`%s <%s>`%s)rÝ   rÍ   rñ   rÉ   )r   r½   r  rÿ   r   r   r   Úaliased_name_rest9  s    	"z!ArtistInspector.aliased_name_restNr	  c       	      C   s„   |rd| }nd}|dk	r2| j |ƒ}d|||f S | jƒ }|jƒ  g }x8|D ]0\}}| j |ƒ}| j|ƒ}|jd|||f ƒ qLW |S )a  
        If *prop* is *None*, return a list of strings of all settable
        properties 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.
        r  r&   Nz%s%s: %s)r  r  Úsortr  rÕ   )	r   rƒ   ÚleadingspaceÚpadÚacceptsÚattrsÚlinesr�   rô   r   r   r   Úpprint_settersE  s    	



zArtistInspector.pprint_settersrõ   c                sú   |rd| ‰nd‰|dk	r2ˆj |ƒ}dˆ||f S tˆjƒ ƒ}‡fdd„|D ƒ}‡fdd„|D ƒ}tdd	„ |D ƒƒ‰ td
d	„ |D ƒƒ‰ˆd dˆ   d dˆ  }dˆd ˆd d|ˆd djˆ ƒ d djˆƒ |f‡ ‡‡fdd„t||ƒD ƒ|df•S )a/  
        If *prop* is *None*, return a list of strings of all settable
        properties 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.
        r  r&   Nz%s%s: %sc                s   g | ]\}}ˆ j ||ƒ‘qS r   )r  )rµ   rƒ   r  )r   r   r   r¶   t  s   z7ArtistInspector.pprint_setters_rest.<locals>.<listcomp>c                s   g | ]\}}ˆ j |ƒ‘qS r   )r  )rµ   rƒ   r  )r   r   r   r¶   v  s    c             s   s   | ]}t |ƒV  qd S )N)r·   )rµ   Únr   r   r   rÙ   x  s    z6ArtistInspector.pprint_setters_rest.<locals>.<genexpr>c             s   s   | ]}t |ƒV  qd S )N)r·   )rµ   r„   r   r   r   rÙ   y  s    z   ú=z
.. table::z   :class: property-tableZPropertyÚDescriptionc                s0   g | ](\}}ˆd  |j ˆ ƒ d  |j ˆƒ ‘qS )z   )Úljust)rµ   r  r„   )Úcol0_lenÚcol1_lenr  r   r   r¶   …  s   )r  rÍ   r  Úmaxr"  Úzip)r   rƒ   r  r  r  rþ   Ztable_formatstrr   )r#  r$  r  r   r   Úpprint_setters_resta  s0    	


z#ArtistInspector.pprint_setters_restc                s    | j ‰ ‡ fdd„tˆ ƒD ƒ}|jƒ  i }xr|D ]j}tˆ |ƒ}| j|ƒrHq.y(tjƒ � tjdƒ |ƒ }W dQ R X W n tk
r†   w.Y q.X |||dd… < q.W |S )z3Return a dictionary mapping property name -> value.c                s(   g | ] }|j d ƒrttˆ |ƒƒr|‘qS )rò   )ró   r{   rS   )rµ   rô   )rï   r   r   r¶   Ž  s    z.ArtistInspector.properties.<locals>.<listcomp>ÚignoreNrõ   )	rî   rö   r  rS   r÷   ÚwarningsÚcatch_warningsÚsimplefilterÚ	Exception)r   ZgettersrH   rô   rg   r    r   )rï   r   rÇ   ‹  s     




zArtistInspector.propertiesc             C   s¤   g }xšt | jƒ jƒ ƒD ]†\}}t|df ƒf krPt|ƒdkrPt|dd… ƒd }nt|ƒ}|jddƒ}t|ƒdkr€|dd… d }| j|ƒ}|jd||f ƒ qW |S )	z8Return the getters and actual values as list of strings.Úshapeé   Nz...Ú
r  é2   z    %s = %s)	rÍ   rÇ   rl   rS   r·   r¼   r  r  rÕ   )r   r  rô   r    r½   r   r   r   Úpprint_getters   s    
zArtistInspector.pprint_getters)Nr	  )Nrõ   )rx   rä   rå   ræ   rE   rð   rø   Úcompiler  r  r  r  r  r÷   r  r  r  r'  rÇ   r1  r   r   r   r   rÆ   £  s    $

*rÆ   c             C   s>   |dkr*t | ƒ}|jƒ }tdj|ƒƒ dS t| d| ƒ}|ƒ S )aI  
    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, e.g.,
    :class:`~matplotlib.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
    Nr/  rò   )rÆ   r1  ÚprintrÝ   rS   )Úobjrè   Úinspr¹   rg   r   r   r   Úgetp°  s    r6  c                s
  t | tƒr| g}nttj| ƒƒ}|s(dS t|d ƒ}i }dˆkrNˆjdƒ|d< ˆ r˜t|ƒdk r˜|r~t|j	|d d�f|Ž ntdj
|j	ƒ ƒf|Ž dS t|ƒd r¬tdƒ‚tdd	„ t|ddd… |d
dd… ƒD ƒƒ‰ ‡ fdd„|D ƒ‡fdd„|D ƒ }ttj|ƒƒS )a  
    Set a property on an artist object.

    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

    You may specify another output file to `setp` if `sys.stdout` is not
    acceptable for some reason using the `file` keyword-only argument::

      >>> with fopen('output.log') as f:
      >>>     setp(line, file=f)

    :func:`setp` operates on a single instance or a iterable 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
    Nr   Úfiler	  )rƒ   r/  z(The set args must be string, value pairsc             s   s   | ]\}}||fV  qd S )Nr   )rµ   r²   r³   r   r   r   rÙ   %  s    zsetp.<locals>.<genexpr>r   c                s   g | ]}|j ˆ ƒ‘qS r   )rº   )rµ   rï   )Úfuncvalsr   r   r¶   &  s    zsetp.<locals>.<listcomp>c                s   g | ]}|j f ˆ Ž‘qS r   )rÎ   )rµ   rï   )r   r   r   r¶   &  s    )rr   r#   rí   r   ÚflattenrÆ   Úpopr·   r3  r  rÝ   rY   r   r&  )r4  r   r   Úobjsr5  Z	printArgsr¹   r   )r8  r   r   ÚsetpÙ  s&    2
,$r<  c             C   s>   t jd }|r$djt| ƒjdd�ƒS djt| ƒjdd�ƒS dS )aÜ  
    Inspect an `~matplotlib.artist.Artist` class (using `.ArtistInspector`) and
    return information about its settable properties and their current values.

    Parameters
    ----------
    artist : `~matplotlib.artist.Artist` or an iterable of `Artist`\s

    Returns
    -------
    string
        The settable properties of *artist*, as plain text if
        :rc:`docstring.hardcopy` is False and as a rst table (intended for
        use in Sphinx) if it is True.
    zdocstring.hardcopyr/  rõ   )r  r	  N)Ú
matplotlibr	   rÝ   rÆ   r'  r  )r   Zhardcopyr   r   r   Úkwdoc*  s    

r>  )r#   )N)*Úcollectionsr   r   Ú	functoolsr   rú   ÚloggingZnumbersr   rø   r)  Znumpyrë   r=  r&   r   r   r	   r�   r
   Z
transformsr   r   r   r   r   r   Ú	getLoggerrx   ru   r   r!   r"   Úobjectr#   rÆ   r6  rÉ   r<  r>  Zinterpdrº   r   r   r   r   Ú<module>   s@    

        r  
&Q