a
    Sic                     @   sX  d dl mZ d dlZd dlmZmZ d dlZd dlmZm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 ddlmZ dd	lmZ dd
lmZ ddlmZmZmZmZm Z m!Z! e	"e#Z$dd Z%dd Z&dd Z'eddZ(G dd dZ)e) Z*G dd dZ+dd Z,G dd dZ-d#ddZ.e.Z/dddd Z0d!d" Z1e+2  dS )$    )
namedtupleN)	lru_cachewraps)	Signature	Parameter)Number   )_apicbook)BoundaryNorm)ScalarMappable)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              
      sr  z
|   r:|jdkr*|js*|  d|_| jd7  _n|jdkrX|jrX|  d|_|  d url|   | |W |  d ur||   |   r| jd8  _|jr| jr| jj	r|  |  S |   r| jd8  _|jrn| jrn| jj	rn|  |  n`|  d ur*||   |   rB| jd8  _|jrl| jrl| jj	rl|  |  0 d S )Nr   Tr   F)
get_rasterizedZ_raster_depth_rasterizingZstart_rasterizingstop_rasterizingget_agg_filterZstart_filterZstop_filterfigureZsuppressComposite)artistrendererdraw M/var/www/html/django/DPS/env/lib/python3.9/site-packages/matplotlib/artist.pydraw_wrapper!   sP    
  

z)allow_rasterization.<locals>.draw_wrapperT)r   _supports_rasterizationr   r   r   r   r   allow_rasterization   s    	r"   c                    s   t   fdd}|S )z
    Decorator for Artist.draw method. Needed on the outermost artist, i.e.
    Figure, to finish up if the render is still in rasterized mode.
    c                    s0    | |g|R i |}|j r,|  d|_ |S )NF)r   r   )r   r   argskwargsresultr   r   r   r   H   s
    z-_finalize_rasterization.<locals>.draw_wrapper)r   r!   r   r   r   _finalize_rasterizationC   s    r&   c                 C   s   | j r|| j _d S N)axesstaleselfvalr   r   r   _stale_axes_callbackR   s    r-   _XYPairzx yc                   @   s   e Zd Zdd ZdS )_Unsetc                 C   s   dS )Nz<UNSET>r   r+   r   r   r   __repr__[   s    z_Unset.__repr__N)__name__
__module____qualname__r1   r   r   r   r   r/   Z   s   r/   c                   @   s  e Zd ZdZdZdd Zg 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dddZdddZdd  Zd!d" Zd#d$ Zd%d& Zd'd( Zd)d* Zd+d, Zdd-d.Zd/d0 Zd1d2 Zd3d4 Zd5d6 Z d7d8 Z!d9d: Z"d;d< Z#d=d> Z$d?d@ Z%dAdB Z&dCdD Z'dEdF Z(ddGdHZ)dIdJ Z*dKdL Z+dMdN Z,dOdP Z-dQdR Z.ddSdTZ/dUdV Z0dWdX Z1dYdZ Z2d[d\ Z3d]d^ Z4d_d` Z5dadb Z6dcdd Z7dedf Z8dgdh Z9didj Z:dkdl Z;dmdn Z<dodp Z=dqdr Z>dsdt Z?dudv Z@dwdx ZAdydz ZBd{d| ZCd}d~ ZDdd ZEdd ZFdd ZGdd ZHedd ZIdd ZJdd ZKdd ZLdd ZMdd ZNdd ZOePjQdd ZRdddZSdd ZTdd ZUdd ZVdd ZWeeVeWZXdS )Artistz
    Abstract base class for objects that render into a FigureCanvas.

    Typically, all visible elements in a figure are subclasses of Artist.
    r   c                 C   s>   t | jdsd S dd | _d| j_| j d| j_|   d S )N_autogenerated_signaturec                 [   s   t j| fi |S r'   )r5   setr+   r$   r   r   r   <lambda>u       z*Artist.__init_subclass__.<locals>.<lambda>r7   z.set)hasattrr7   r2   r4   #_update_set_signature_and_docstringclsr   r   r   __init_subclass__i   s    
zArtist.__init_subclass__)Znavigate_moder   Z3d_propertiesc                 C   sH   t tdtjgdd t|  D | j_d| j_dt|  | j_	dS )z
        Update the signature of the set function to list all properties
        as keyword arguments.

        Property aliases are not listed in the signature for brevity, but
        are still accepted as keyword arguments.
        r+   c                 S   s&   g | ]}|t jvrt|tjtd qS ))default)r5   _PROPERTIES_EXCLUDED_FROM_SETr   KEYWORD_ONLY_UNSET).0propr   r   r   
<listcomp>   s   
z>Artist._update_set_signature_and_docstring.<locals>.<listcomp>Tz<Set multiple properties at once.

Supported properties are

N)
r   r   POSITIONAL_OR_KEYWORDArtistInspectorget_settersr7   __signature__r6   kwdoc__doc__r=   r   r   r   r<      s    	
z*Artist._update_set_signature_and_docstringc                 C   s   d| _ d | _d | _d | _d | _d| _d| _d| _d | _d | _	d | _
d| _d| _d | _d| _d | _t| jtjk| _tjdgd| _z
d | _W n ty   Y n0 d | _d | _d | _d | _tjd | _tjd | _ t!g g | _"d| _#d S )NTF pchanged)signalszpath.sketchzpath.effects)$_stalestale_callback_axesr   
_transform_transformSet_visible	_animated_alphaclipbox	_clippath_clipon_label_picker_rasterized_agg_filtertypeget_cursor_datar5   
_mouseoverr
   CallbackRegistry
_callbacksr(   AttributeError_remove_method_url_gid_snapmplrcParams_sketch_path_effectsr.   _sticky_edges
_in_layoutr0   r   r   r   __init__   s<    
zArtist.__init__c                 C   s   | j  }d |d< |S )NrQ   )__dict__copy)r+   dr   r   r   __getstate__   s    
zArtist.__getstate__c                 C   sr   | j durf|  |  d| _d}t| drN| jrN| 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)	re   rQ   r;   r(   _mouseover_setdiscardr)   r   NotImplementedError)r+   Z_ax_flagr   r   r   remove   s    

zArtist.removec                 C   s"   | j }|o tdd |j D S )z)Return whether units are set on any axis.c                 s   s   | ]}|  V  qd S r'   )
have_units)rD   axisr   r   r   	<genexpr>   r:   z$Artist.have_units.<locals>.<genexpr>)r(   anyZ	_axis_mapvalues)r+   axr   r   r   rx      s    zArtist.have_unitsc                 C   s.   t | dd}|du s|jdu r"|S |j|S )z
        Convert *x* using the unit type of the xaxis.

        If the artist is not contained in an Axes or if the xaxis does not
        have units, *x* itself is returned.
        r(   N)getattrxaxisconvert_units)r+   xr}   r   r   r   convert_xunits   s    zArtist.convert_xunitsc                 C   s.   t | dd}|du s|jdu r"|S |j|S )z
        Convert *y* using the unit type of the yaxis.

        If the artist is not contained in an Axes or if the yaxis does not
        have units, *y* itself is returned.
        r(   N)r~   yaxisr   )r+   yr}   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*.)rR   r0   r   r   r   r(   	  s    zArtist.axesc                 C   sD   |d ur$| j d ur$|| j kr$td|| _ |d ur@|| ur@t| _d S )NzqCan not reset the axes.  You are probably trying to re-use an artist in more than one Axes which is not supported)rR   
ValueErrorr-   rQ   )r+   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.
        )rP   r0   r   r   r   r)     s    zArtist.stalec                 C   s0   || _ |  rd S |r,| jd ur,| | | d S r'   )rP   get_animatedrQ   r*   r   r   r   r)   !  s
    Nc                 C   s   t ddgddggS )a  
        Get the artist's 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   sZ   |  |}|  rV|  }|dur.t||}|  }|durV| }t|| }|S )a  
        Like `.Artist.get_window_extent`, but includes any clipping.

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

        Returns
        -------
        `.Bbox`
            The enclosing bounding box (in figure pixel coordinates).
        N)r   get_clip_onget_clip_boxr   intersectionget_clip_pathget_fully_transformed_pathget_extents)r+   r   bboxclip_box	clip_pathr   r   r   get_tightbboxB  s    
zArtist.get_tightbboxc                    s   j d fdd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
        -------
        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
        rN   c                      s    S r'   r   r   funcr+   r   r   r9   w  r:   z%Artist.add_callback.<locals>.<lambda>)rc   connect)r+   r   r   r   r   add_callback\  s    zArtist.add_callbackc                 C   s   | j | dS )zu
        Remove a callback based on its observer id.

        See Also
        --------
        add_callback
        N)rc   
disconnect)r+   oidr   r   r   remove_callbacky  s    zArtist.remove_callbackc                 C   s   | j d 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
        rN   N)rc   processr0   r   r   r   rN     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.
        )rT   r0   r   r   r   is_transform_set  s    zArtist.is_transform_setc                 C   s   || _ d| _|   d| _dS )zk
        Set the artist transform.

        Parameters
        ----------
        t : `.Transform`
        TN)rS   rT   rN   r)   )r+   tr   r   r   set_transform  s    zArtist.set_transformc                 C   sB   | j du rt | _ n(t| j ts<t| j dr<| j | j| _ | j S )z5Return the `.Transform` instance used by this artist.N_as_mpl_transform)rS   r   
isinstancer   r;   r   r(   r0   r   r   r   get_transform  s    


zArtist.get_transformc                 C   s   g S )z9Return a list of the child `.Artist`\s of this `.Artist`.r   r0   r   r   r   get_children  s    zArtist.get_childrenc                 C   s$   |dur|j |j urdi fS di fS )a  
        Base impl. for checking whether a mouseevent happened in an artist.

        1. If the artist figure is known and the event did not occur in that
           figure (by checking its ``canvas`` attribute), reject it.
        2. Otherwise, return `None, {}`, indicating that the subclass'
           implementation should be used.

        Subclasses should start their definition of `contains` as follows:

            inside, info = self._default_contains(mouseevent)
            if inside is not None:
                return inside, info
            # subclass-specific implementation follows

        The *figure* kwarg is provided for the implementation of
        `.Figure.contains`.
        NF)canvas)r+   
mouseeventr   r   r   r   _default_contains  s    zArtist._default_containsc                 C   s6   |  |\}}|dur||fS td| jj di fS )a  
        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.
        Nz%r needs 'contains' methodF)r   _logwarning	__class__r2   )r+   r   insideinfor   r   r   contains  s
    zArtist.containsc                 C   s   | j duo| jduS )z
        Return whether the artist is pickable.

        See Also
        --------
        set_picker, get_picker, pick
        N)r   r\   r0   r   r   r   pickable  s    zArtist.pickablec                 C   s   ddl m} |  rd|  }t|r4|| |\}}n| |\}}|rd|d| jj|| fi |  | 	 D ]6}t
|dd}|jdu s|du s|j|krl|| qld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   )	PickEventZ
pick_eventr(   N)backend_basesr   r   
get_pickercallabler   r   r   _processr   r~   Zinaxespick)r+   r   r   pickerr   rE   ar}   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 its 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r\   )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
        r   r0   r   r   r   r   2  s    
zArtist.get_pickerc                 C   s   | j S )zReturn the url.rf   r0   r   r   r   get_url>  s    zArtist.get_urlc                 C   s
   || _ dS )zf
        Set the url for the artist.

        Parameters
        ----------
        url : str
        Nr   )r+   urlr   r   r   set_urlB  s    zArtist.set_urlc                 C   s   | j S )zReturn the group id.rg   r0   r   r   r   get_gidL  s    zArtist.get_gidc                 C   s
   || _ dS )zm
        Set the (group) id for the artist.

        Parameters
        ----------
        gid : str
        Nr   )r+   gidr   r   r   set_gidP  s    zArtist.set_gidc                 C   s   t jd r| jS dS dS )zP
        Return the snap setting.

        See `.set_snap` for details.
        z	path.snapFN)ri   rj   rh   r0   r   r   r   get_snapZ  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)rh   r)   )r+   snapr   r   r   set_snape  s    zArtist.set_snapc                 C   s   | j S )a  
        Return the sketch parameters for the artist.

        Returns
        -------
        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.
        )rk   r0   r   r   r   get_sketch_params  s    zArtist.get_sketch_paramsc                 C   s.   |du rd| _ n||pd|pdf| _ d| _dS )a  
        Set 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)

            The PGF backend uses this argument as an RNG seed and not as
            described above. Using the same seed yields the same random shape.

            .. ACCEPTS: (scale: float, length: float, randomness: float)
        Ng      `@g      0@T)rk   r)   )r+   scalelength
randomnessr   r   r   set_sketch_params  s    zArtist.set_sketch_paramsc                 C   s   || _ d| _dS )z{
        Set the path effects.

        Parameters
        ----------
        path_effects : `.AbstractPathEffect`
        TN)rl   r)   )r+   Zpath_effectsr   r   r   set_path_effects  s    zArtist.set_path_effectsc                 C   s   | j S r'   )rl   r0   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   r0   r   r   r   
get_figure  s    zArtist.get_figurec                 C   sH   | j |u rdS | j dur td|| _ | j r>| j | ur>|   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   RuntimeErrorrN   r)   )r+   figr   r   r   
set_figure  s    	

zArtist.set_figurec                 C   s   || _ |   d| _dS )zq
        Set the artist's clip `.Bbox`.

        Parameters
        ----------
        clipbox : `.Bbox`
        TN)rX   rN   r)   )r+   rX   r   r   r   set_clip_box  s    zArtist.set_clip_boxc                 C   s   ddl m}m} d}|du rrt||rFtt | | _d| _	d}n,t||r`t
|| _	d}nt|trr|\}}|du rd| _	d}nFt|trt||| _	d}n*t|t
r|| _	d}nt|tr|| _	d}|stdt|jt|j|   d| _dS )a  
        Set the artist's clip path.

        Parameters
        ----------
        path : `.Patch` or `.Path` or `.TransformedPath` or None
            The clip path. If given a `.Path`, *transform* must be provided as
            well. If *None*, a previously set clip path is removed.
        transform : `~matplotlib.transforms.Transform`, optional
            Only used if *path* is a `.Path`, in which case the given `.Path`
            is converted to a `.TransformedPath` using *transform*.

        Notes
        -----
        For efficiency, if *path* is a `.Rectangle` this method will set the
        clipping box to the corresponding rectangle and set the clipping path
        to ``None``.

        For technical reasons (support of `~.Artist.set`), a tuple
        (*path*, *transform*) is also accepted as a single positional
        parameter.

        .. ACCEPTS: Patch or (Path, Transform) or None
        r   )Patch	RectangleFNTz5Invalid arguments to set_clip_path, of type {} and {})matplotlib.patchesr   r   r   r   r   unitr   rX   rY   r   tupler   r   	TypeErrorformatr_   r2   rN   r)   )r+   path	transformr   r   successr   r   r   set_clip_path  sD    






zArtist.set_clip_pathc                 C   s   | j S )zc
        Return the alpha value used for blending - not supported on all
        backends.
        )rW   r0   r   r   r   	get_alpha%  s    zArtist.get_alphac                 C   s   | j S )zReturn the visibility.)rU   r0   r   r   r   get_visible,  s    zArtist.get_visiblec                 C   s   | j S )z&Return whether the artist is animated.)rV   r0   r   r   r   r   0  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')``.
        rn   r0   r   r   r   get_in_layout4  s    	zArtist.get_in_layoutc                 C   sp   |   }|  }| jduon|  on|dus2|duon|du sPt|j| jjjkon|du pnt|t	on|j
| jju S )at  
        Return a boolean flag, ``True`` if the artist is clipped to the Axes
        and can thus be skipped in layout calculations. Requires `get_clip_on`
        is True, one of `clip_box` or `clip_path` is set, ``clip_box.extents``
        is equivalent to ``ax.bbox.extents`` (if set), and ``clip_path._patch``
        is equivalent to ``ax.patch`` (if set).
        N)r   r   r(   r   npallextentsr   r   r   _patchpatch)r+   r   r   r   r   r   _fully_clipped_to_axes?  s    

zArtist._fully_clipped_to_axesc                 C   s   | j S )z(Return whether the artist uses clipping.)rZ   r0   r   r   r   r   W  s    zArtist.get_clip_onc                 C   s   | j S )zReturn the clipbox.)rX   r0   r   r   r   r   [  s    zArtist.get_clip_boxc                 C   s   | j S )zReturn the clip path.)rY   r0   r   r   r   r   _  s    zArtist.get_clip_pathc                 C   s   | j dur| 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)rY   get_transformed_path_and_affiner0   r   r   r   $get_transformed_clip_path_and_affinec  s    

z+Artist.get_transformed_clip_path_and_affinec                 C   s   || _ |   d| _dS )z
        Set whether the artist uses clipping.

        When False artists will be visible outside of the Axes which
        can lead to unexpected results.

        Parameters
        ----------
        b : bool
        TN)rZ   rN   r)   r+   br   r   r   set_clip_onm  s    zArtist.set_clip_onc                 C   sB   | j r*| jdur|| j || j n|d |d dS )z!Set the clip properly for the gc.N)rZ   rX   Zset_clip_rectangler   rY   )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.)r]   r0   r   r   r   r     s    zArtist.get_rasterizedc                 C   s,   |r"t | jds"td|  d || _dS )a  
        Force rasterized (bitmap) drawing for vector graphics output.

        Rasterized drawing is not supported by all artists. If you try to
        enable this on an artist that does not support it, the command has no
        effect and a warning will be issued.

        This setting is ignored for pixel-based output.

        See also :doc:`/gallery/misc/rasterization_demo`.

        Parameters
        ----------
        rasterized : bool
        r    zRasterization of 'z' will be ignoredN)r;   r   r	   warn_externalr]   )r+   Z
rasterizedr   r   r   set_rasterized  s    zArtist.set_rasterizedc                 C   s   | j S )z1Return filter function to be used for agg filter.)r^   r0   r   r   r   r     s    zArtist.get_agg_filterc                 C   s   || _ d| _dS )a  
        Set the agg filter.

        Parameters
        ----------
        filter_func : callable
            A filter function, which takes a (m, n, depth) float array
            and a dpi value, and returns a (m, n, depth) array and two
            offsets from the bottom left corner of the image

            .. ACCEPTS: a filter function, which takes a (m, n, 3) float array
                and a dpi value, and returns a (m, n, 3) array and two offsets
                from the bottom left corner of the image
        TN)r^   r)   )r+   filter_funcr   r   r   set_agg_filter  s    zArtist.set_agg_filterc                 C   s   |   sdS d| _dS )ac  
        Draw the Artist (and its children) using the given renderer.

        This has no effect if the artist is not visible (`.Artist.get_visible`
        returns False).

        Parameters
        ----------
        renderer : `.RendererBase` subclass.

        Notes
        -----
        This method is overridden in the Artist subclasses.
        NF)r   r)   r   r   r   r   r     s    zArtist.drawc                 C   sj   |dur$t |ts$tdt| |durRd|  kr@dksRn td| d|| _|   d| _dS )z
        Set the alpha value used for blending - not supported on all backends.

        Parameters
        ----------
        alpha : scalar or None
            *alpha* must be within the 0-1 range, inclusive.
        Nz#alpha must be numeric or None, not r   r   zalpha (z) is outside 0-1 rangeT)r   r   r   r_   r   rW   rN   r)   r+   alphar   r   r   	set_alpha  s    	zArtist.set_alphac                 C   s   t |trtdt|s,t| | dS t|}d| krN|	 dksjt
d|  d|	  || _|   d| _dS )a"  
        Set the alpha value used for blending - not supported on all backends.

        Parameters
        ----------
        alpha : array-like or scalar or None
            All values must be within the 0-1 range, inclusive.
            Masked values and nans are not supported.
        z+alpha must be numeric or None, not a stringNr   r   z5alpha must be between 0 and 1, inclusive, but min is z	, max is T)r   strr   r   iterabler5   r   asarrayminmaxr   rW   rN   r)   r   r   r   r   _set_alpha_for_array  s    



zArtist._set_alpha_for_arrayc                 C   s   || _ |   d| _dS )zf
        Set the artist's visibility.

        Parameters
        ----------
        b : bool
        TN)rU   rN   r)   r   r   r   r   set_visible  s    zArtist.set_visiblec                 C   s   | j |kr|| _ |   dS )a  
        Set whether the artist is intended to be used in an animation.

        If True, the artist is excluded from regular drawing of the figure.
        You have to call `.Figure.draw_artist` / `.Axes.draw_artist`
        explicitly on the artist. This approach is used to speed up animations
        using blitting.

        See also `matplotlib.animation` and
        :doc:`/tutorials/advanced/blitting`.

        Parameters
        ----------
        b : bool
        N)rV   rN   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
        Nr   )r+   Z	in_layoutr   r   r   set_in_layout  s    zArtist.set_in_layoutc                 C   s   | j S )z4Return the label used for this artist in the legend.)r[   r0   r   r   r   	get_label   s    zArtist.get_labelc                 C   s,   |durt || _nd| _|   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)r   r[   rN   r)   )r+   sr   r   r   	set_label$  s
    	zArtist.set_labelc                 C   s   | j S )zReturn the artist's zorder.)zorderr0   r   r   r   
get_zorder4  s    zArtist.get_zorderc                 C   s(   |du r| j j}|| _|   d| _dS )z
        Set the zorder for the artist.  Artists with lower zorder
        values are drawn first.

        Parameters
        ----------
        level : float
        NT)r   r   rN   r)   )r+   levelr   r   r   
set_zorder8  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.

        Moreover, margin expansion "bumps" against sticky edges and cannot
        cross them.  For example, if the upper data limit is 1.0, the upper
        view limit computed by simple margin application is 1.2, but there is a
        sticky edge at 1.1, then the actual upper view limit will be 1.1.

        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)

        )rm   r0   r   r   r   sticky_edgesG  s    zArtist.sticky_edgesc                 C   s   |j | _ |j| _|j| _|j| _|j| _|j| _|j| _|j| _|j| _|j	| _	|j
j | j
jdd< |j
j | j
jdd< |   d| _dS )z'Copy properties from *other* to *self*.NT)rS   rT   rU   rW   rX   rZ   rY   r[   rk   rl   r  r   rq   r   rN   r)   )r+   otherr   r   r   update_fromb  s    zArtist.update_fromc                 C   s   t |  S )z8Return a dictionary of all the properties of the artist.)rH   
propertiesr0   r   r   r   r  s  s    zArtist.propertiesc                 C   s   g }t j| dd| | D ]b\}}|dkr@|t| || qt| d| d}t|spt|jt	| |d||| qW d   n1 s0    Y  |r| 
  d| _|S )z
        Helper for `.Artist.set` and `.Artist.update`.

        *errfmt* is used to generate error messages for invalid property
        names; it get formatted with ``type(self)`` and the property name.
        F)Zeventsonr(   set_N)r>   Z	prop_nameT)r
   _setattr_cmitemsappendsetattrr~   r   rd   r   r_   rN   r)   )r+   propsZerrfmtretkvr   r   r   r   _update_propsw  s    .zArtist._update_propsc                 C   s   |  |dS )z
        Update this artist's properties from the dict *props*.

        Parameters
        ----------
        props : dict
        z5{cls.__name__!r} object has no property {prop_name!r}r  )r+   r  r   r   r   update  s    zArtist.updatec                 C   s   |  |dS )z
        Update artist properties without prenormalizing them, but generating
        errors as if calling `set`.

        The lack of prenormalization is to maintain backcompatibility.
        zE{cls.__name__}.set() got an unexpected keyword argument {prop_name!r}r  r8   r   r   r   _internal_update  s    zArtist._internal_updatec                 K   s   |  t|| S r'   )r  r
   normalize_kwargsr8   r   r   r   r7     s    z
Artist.setc              
   +   sT    fdd|D }z* j f i | dV  W  j f i | n j f i | 0 dS )zV
        `.Artist.set` context-manager that restores original values at exit.
        c                    s    i | ]}|t  d |  qS get_)r~   )rD   r  r0   r   r   
<dictcomp>  r:   z"Artist._cm_set.<locals>.<dictcomp>Nr7   )r+   r$   Z	orig_valsr   r0   r   _cm_set  s
    zArtist._cm_setTc                    s    du rdd n8t  tr4t tr4 fddnt rB ntdtfdd|  D g }|r|| r|||  |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
        -------
        list of `.Artist`

        Nc                 S   s   dS )NTr   r   r   r   r   	matchfunc  s    z!Artist.findobj.<locals>.matchfuncc                    s
   t |  S r'   )r   r  )matchr   r   r    s    zFmatch must be None, a matplotlib.artist.Artist subclass, or a callablec                    s   g | ]}|  qS r   )findobj)rD   c)r  r   r   rF     r:   z"Artist.findobj.<locals>.<listcomp>)	r   r_   
issubclassr5   r   r   sumr   r	  )r+   r  include_selfartistsr   )r  r  r   r    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   r`     s    zArtist.get_cursor_datac           
   	   C   s:  t |dkrt| tr| jj}t j|r0dS | |}t 	|rt| jt
rt t | jj| }td|d }t | jj||d   }n6| jt|| t ddg | }t||  }t||}nd}d||S z|d  W n ttfy   |g}Y n0 ddd	 |D }	d
|	 d S dS )ac  
        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,
        unless the artist has an associated colorbar, in which case scalar
        values are formatted using the colorbar's formatter.

        See Also
        --------
        get_cursor_data
        r   z[]r         z[{:-#.{}g}]z, c                 s   s"   | ]}t |trd |V  qdS )z{:0.3g}N)r   r   r   )rD   itemr   r   r   rz   6  s   
z,Artist.format_cursor_data.<locals>.<genexpr>[]N)r   ndimr   r   cmapNmagetmasknormisfiniter   argminabs
boundariesr   diffinverseintarrayr
   _g_sig_digitsr   r   
IndexErrorjoin)
r+   datannormedcur_idxZ	neigh_idxdeltaZ	neighborsZg_sig_digitsdata_strr   r   r   format_cursor_data  s2    


zArtist.format_cursor_datac                 C   s   | j S )z
        Return whether this artist is queried for custom context information
        when the mouse cursor moves over it.
        )ra   r0   r   r   r   get_mouseover:  s    zArtist.get_mouseoverc                 C   s8   t || _| j}|r4| jr(|j|  n|j|  dS )a3  
        Set whether this artist is queried for custom context information when
        the mouse cursor moves over it.

        Parameters
        ----------
        mouseover : bool

        See Also
        --------
        get_cursor_data
        .ToolCursorPosition
        .NavigationToolbar2
        N)boolra   r(   rt   addru   )r+   	mouseoverr}   r   r   r   set_mouseoverA  s    
zArtist.set_mouseover)N)N)N)NNN)N)NT)Yr2   r3   r4   rL   r   r?   rA   classmethodr<   ro   rs   rw   rx   r   r   propertyr(   setterr)   r   r   r   r   rN   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   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r  r7   
contextlibcontextmanagerr  r  r`   r?  r@  rD  rC  r   r   r   r   r5   `   s   
$+







	

%#



>




+8r5   c                 O   sF   z| j |i i |ddiW S  ty@   | j |i | Y S 0 dS )z
    Matplotlib's `.Axes.get_tightbbox` and `.Axis.get_tightbbox` support a
    *for_layout_only* kwarg; this helper tries to uses the kwarg but skips it
    when encountering third-party subclasses that do not support it.
    Zfor_layout_onlyTN)r   r   )objr#   r$   r   r   r   _get_tightbbox_for_layout_only[  s    rK  c                   @   s   e Zd ZdZdd Zdd ZedZdd Z	d	d
 Z
dd Zeedddd Zeedddd Zdd Zh dZdd Zd"ddZd#ddZdd Zd d! ZdS )$rH   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|r,t|}t|r,|d }|| _t |tsDt|}|| _| 	 | _
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 `Artist`\s are of the same type) and it is your
        responsibility to make sure this is so.
        r   N)r   r5   r   r   listlenoorigr_   oget_aliasesaliasd)r+   rO  r   r   r   ro   m  s    


zArtistInspector.__init__c                    s    fddt  jD }i }|D ]f}t j|} |s<q td|dd t|	d}|
|dd t |dd  q |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 | ]"}| d rtt j|r|qS ))r  r  )
startswithr   r~   rO  rD   namer0   r   r   rF     s   
z/ArtistInspector.get_aliases.<locals>.<listcomp>z`({}.*)`N   r   )dirrO  r~   is_aliasresearchr   inspectgetdocgroup
setdefaultr7   rB  )r+   namesaliasesrT  r   Zpropnamer   r0   r   rP    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|}|du rHdS |drVdS | j|}|dur~t	
dd|dS |jjd }t	d	||}|r|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unknown
Alias for z
 * r   z(?m)^ *\*?{} : (.+))r;   rO  rd   r~   rZ  r[  rR  _get_valid_values_regexrY  rX  subr\  __code__co_varnamesr   )r+   attrrT  r   	docstringr  
param_namer   r   r   get_valid_values  s"    	


z ArtistInspector.get_valid_valuesc                 C   s,   ddd}|  D ]\}}|||}q|S )z
        Changes the full path to the public API path that is used
        in sphinx. This is needed for links to work.
        Axes)_base._AxesBase
_axes.Axes)r  replace)r+   Zsource_classreplace_dictkeyvaluer   r   r   _replace_path  s    zArtistInspector._replace_pathc                 C   sd   g }t | jD ]P}|dsqt| j|}t|r| |dk s| |rLq||dd  q|S )z
        Get the attribute strings with setters for object.

        For example, for a line, return ``['markerfacecolor', 'linewidth',
        ....]``.
        r  r#  rU  N)rV  rO  rR  r~   r   number_of_parametersrW  r	  )r+   ZsettersrT  r   r   r   r   rI     s    
zArtistInspector.get_settersN)maxsizec                 C   s   t t| jS )z3Return number of parameters of the callable *func*.)rM  rZ  	signature
parameters)r   r   r   r   rs    s    z$ArtistInspector.number_of_parametersc                 C   s    t | }|du rdS |dS )zT
        Return whether the object *method* is an alias for another method.
        NFra  )rZ  r[  rR  )methoddsr   r   r   rW    s    
zArtistInspector.is_aliasc                 C   s*   d dd t| 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'.
        rM   c                 s   s   | ]}d | V  qdS z or %sNr   rD   r   r   r   r   rz     r:   z/ArtistInspector.aliased_name.<locals>.<genexpr>)r8  sortedrQ  get)r+   r   r_  r   r   r   aliased_name  s    "zArtistInspector.aliased_name>	   z3matplotlib.text._AnnotationBase.set_annotation_clipz)matplotlib.image._ImageBase.set_filterradz%matplotlib.image._ImageBase.set_alphaz$matplotlib.image._ImageBase.set_dataz(matplotlib.image._ImageBase.set_resamplez3matplotlib.image._ImageBase.set_interpolation_stagez*matplotlib.image._ImageBase.set_filternormz%matplotlib.image._ImageBase.set_arrayz-matplotlib.image._ImageBase.set_interpolationc                 C   sF   || j v rd| dS ddd t| 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'.
        z``rM   c                 s   s   | ]}d | V  qdS ry  r   rz  r   r   r   rz     r:   z4ArtistInspector.aliased_name_rest.<locals>.<genexpr>z:meth:`%s <%s>`%s)_NOT_LINKABLEr8  r{  rQ  r|  )r+   r   targetr_  r   r   r   aliased_name_rest  s    

"z!ArtistInspector.aliased_name_restr#  c                 C   st   |rd| }nd}|dur2|  |}d|||f S g }t|  D ],}|  |}| |}|d|||f  qB|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.
        rb  rM   N%s%s: %s)rj  r{  rI   r}  r	  )r+   rE   leadingspacepadacceptslinesrT  r   r   r   pprint_setters  s    	



zArtistInspector.pprint_settersrU  c           	   	      sf  |rd| nd|dur2 |}d||f S g }t D ]d}jjD ](}t|d| d}|rN|jdurN qqNtjd| }|||j d|j	 f qB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  d d |g fddt||D |dS )a$  
        If *prop* is *None*, return a list of reST-formatted 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.
        rb  rM   Nr  r  .c                    s,   g | ]$\}}  ||d dddqS )rl  rk  rm  )r  rn  )rD   rE   r  r0   r   r   rF   R  s   z7ArtistInspector.pprint_setters_rest.<locals>.<listcomp>c                    s   g | ]\}}  |qS r   )rj  )rD   rE   _r0   r   r   rF   V  s   c                 s   s   | ]}t |V  qd S r'   rM  )rD   r:  r   r   r   rz   Y  r:   z6ArtistInspector.pprint_setters_rest.<locals>.<genexpr>c                 s   s   | ]}t |V  qd S r'   r  )rD   r   r   r   r   rz   Z  r:      =z
.. table::z   :class: property-tablePropertyDescriptionc                    s0   g | ](\}}d  |   d  |  qS )r  )ljust)rD   r:  r   )col0_lencol1_lenr  r   r   rF   f  s   )rj  r{  rI   rO  __mro__r~   rL   r	  r3   r4   r   r  zip)	r+   rE   r  r  Zprop_and_qualnamesr>   rw  r^  Ztable_formatstrr   )r  r  r  r+   r   pprint_setters_rest5  sZ    	



	z#ArtistInspector.pprint_setters_restc              	      s   | j   fddt D }|  i }|D ]~}t |}| |rFq,z<t   td | }W d   n1 sv0    Y  W n ty   Y q,Y q,0 |||dd < q,|S )z3Return a dictionary mapping property name -> value.c                    s(   g | ] }| d rtt |r|qS r  )rR  r   r~   rS  rO  r   r   rF   o  s   z.ArtistInspector.properties.<locals>.<listcomp>ignoreNrU  )	rN  rV  sortr~   rW  warningscatch_warningssimplefilter	Exception)r+   Zgettersrr   rT  r   r,   r   r  r   r  l  s     



(
zArtistInspector.propertiesc                 C   s   g }t |   D ]\}}t|dddkrNt|dkrNt|dd d }nt|}|dd}t|dkr~|dd d }| |}|d	||f  q|S )
z8Return the getters and actual values as list of strings.shaper      Nz...
rb  2   z    %s = %s)	r{  r  r  r~   rM  r   rn  r}  r	  )r+   r  rT  r,   r   r   r   r   pprint_getters  s    
zArtistInspector.pprint_getters)Nr#  )NrU  )r2   r3   r4   rL   ro   rP  rX  compilerc  rj  rr  rI   staticmethodr   rs  rW  r}  r~  r  r  r  r  r  r   r   r   r   rH   g  s,   $

7rH   c                 C   s:   |du r*t | }| }td| dS t| d|  S )a  
    Return the value of an `.Artist`'s *property*, or print all of them.

    Parameters
    ----------
    obj : `.Artist`
        The queried artist; e.g., a `.Line2D`, a `.Text`, or an `~.axes.Axes`.

    property : str or None, default: None
        If *property* is 'somename', this function returns
        ``obj.get_somename()``.

        If it's None (or unset), it *prints* all gettable properties from
        *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

    See Also
    --------
    setp
    Nr  r  )rH   r  printr8  r~   )rJ  rF  inspr  r   r   r   getp  s    r  filec                   s   t | tr| g}ntt| }|s(dS t|d }s|t|dk r||rbt|j|d d|d ntd	| |d dS t|d rt
dtt|ddd |ddd   fd	d
|D fdd
|D  }tt|S )a  
    Set one or more properties on an `.Artist`, or list allowed values.

    Parameters
    ----------
    obj : `.Artist` or list of `.Artist`
        The artist(s) whose properties are being set or queried.  When setting
        properties, all artists are affected; when querying the allowed values,
        only the first instance in the sequence is queried.

        For example, two lines can be made thicker and red with a single call:

        >>> x = arange(0, 1, 0.01)
        >>> lines = plot(x, sin(2*pi*x), x, sin(4*pi*x))
        >>> setp(lines, linewidth=2, color='r')

    file : file-like, default: `sys.stdout`
        Where `setp` writes its output when asked to list allowed values.

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

        The default, ``None``, means `sys.stdout`.

    *args, **kwargs
        The properties to set.  The following combinations are supported:

        - Set the linestyle of a line to be dashed:

          >>> line, = plot([1, 2, 3])
          >>> setp(line, linestyle='--')

        - Set multiple properties at once:

          >>> setp(line, linewidth=2, color='r')

        - List allowed values for a line's linestyle:

          >>> setp(line, 'linestyle')
          linestyle: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}

        - List all properties that can be set, and their allowed values:

          >>> setp(line)
          agg_filter: a filter function, ...
          [long output listing omitted]

        `setp` also supports MATLAB style string/value pairs.  For example, the
        following are equivalent:

        >>> setp(lines, 'linewidth', 2, 'color', 'r')  # MATLAB style
        >>> setp(lines, linewidth=2, color='r')        # Python style

    See Also
    --------
    getp
    Nr   r#  )rE   r  r  z(The set args must be string, value pairsr   c                    s   g | ]}|  qS r   )r  rD   rO  )funcvalsr   r   rF     r:   zsetp.<locals>.<listcomp>c                    s   g | ]}|j f i  qS r   r  r  )r$   r   r   rF     r:   )r   r5   rL  r
   flattenrH   rM  r  r  r8  r   dictr  )rJ  r  r#   r$   objsr  r  r   )r  r$   r   setp  s     ;
"$r  c                 C   s:   t | }tjd r$d|jddS dd|jd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
    -------
    str
        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  rU  )r  zProperties:
)rH   ri   rj   r8  r  r  )r   air   r   r   rK     s
    rK   )N)3collectionsr   rH  	functoolsr   r   rZ  r   r   loggingnumbersr   rX  r  numpyr   
matplotlibri   rM   r	   r
   colorsr   cmr   r   r   
transformsr   r   r   r   r   r   	getLoggerr2   r   r"   r&   r-   r.   r/   rC   r5   rK  rH   r  r|  r  rK   r<   r   r   r   r   <module>   sT    
+
            ,
$T