o
    h
                    @   s  d Z ddl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	mZmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z! ddl"m#Z$ e%e&Z'dZ(e)ej*Z+e+, Z-dd e+j./ D Z0dd e-e0 D Z1G d	d
 d
ej2Z3G dd de3Z4G dd de3Z5G dd dZ6G dd dZ7G dd dej2Z8dd Z9G dd de8Z:G dd de8Z;dS )z*
Classes for the ticks and x- and y-axis.
    N)Real)_apicbook   c                 C   s   g | ]}t t|qS  )nextiter).0dr   r   c/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/matplotlib/axis.py
<listcomp>    s    r   c                 C   s   g | ]}d | qS grid_r   )r	   namer   r   r   r   !   s    c                       s   e Zd ZdZddddddddddddddddddddd fdd
Zd	d
 Zedd Zdd Zdd Z	dd Z
dd Zd/ fdd	Zdd Zdd Zdd Zdd Zejdd  Z fd!d"Zd#d$ Zd%d& Zd'd( Zd)d* Zd+d, Zd-d. Z  ZS )0Ticka  
    Abstract base class for the axis ticks, grid lines and labels.

    Ticks mark a position on an Axis. They contain two lines as markers and
    two labels; one each for the bottom and top positions (in case of an
    `.XAxis`) or for the left and right positions (in case of a `.YAxis`).

    Attributes
    ----------
    tick1line : `~matplotlib.lines.Line2D`
        The left/bottom tick marker.
    tick2line : `~matplotlib.lines.Line2D`
        The right/top tick marker.
    gridline : `~matplotlib.lines.Line2D`
        The grid line associated with the label position.
    label1 : `~matplotlib.text.Text`
        The left/bottom tick label.
    label2 : `~matplotlib.text.Text`
        The right/top tick label.

    NTFr   )sizewidthcolortickdirpad	labelsize
labelcolorlabelfontfamilyzordergridOntick1Ontick2Onlabel1Onlabel2Onmajorlabelrotation
grid_colorgrid_linestylegrid_linewidth
grid_alphac                   s  t    |du r(tjd }|r|dv rtjd }n|s&|dv r&tjd }nd}| |jdd || _|| _|| _| j	}|rAdnd	}|du rRtj| d
| d }|| _
|du rdtj| d
| d }|| _|du rstj| d }|du rtj| d
| d }|| _|	du rtj| d }	t|	drtj| d }	|du rtj| d }| | |du r|rtjjd }ntjj}|| _t|d}t|d}t|d}|du rt|stjd }dd | D }tjg g |d|||||d	| _tjg g |d|||||d	| _tjg g f|||||dd|| _t| j _tjt j!t j!||	||
| j"d d| _#tjt j!t j!||	||
| j"d d| _$| %| | j| j| j| j#| j$fD ]}| &| qX| '| dS )z
        bbox is the Bound2D bounding box in display coords of the Axes
        loc is the tick location in data coords
        size is the tick size in points
        Naxes.grid.whichbothr   	axes.gridr'   minorFrootr   r*   .z.sizez.widthz.colorz.padz.labelcolorinheritz
.labelsizeg{Gz?z
grid.colorzgrid.linestylezgrid.linewidthz
grid.alphac                 S   s   i | ]\}}|d d |qS    Nr   r	   kvr   r   r   
<dictcomp>       z!Tick.__init__.<locals>.<dictcomp>none)r   	linestyler   visiblemarkeredgecolor
markersizemarkeredgewidth )r   alphar8   r7   	linewidthmarker   )fontsizer   r8   
fontfamilyrotation)(super__init__mplrcParams
set_figure
get_figureaxes_loc_major__name___size_width	_base_padr   
_str_equal_set_labelrotationmlinesLine2Dr   _zorder
_val_or_rcmcolors_has_alpha_channelitems	tick1line	tick2linegridlineGRIDLINE_INTERPOLATION_STEPSget_path_interpolation_stepsmtextTextnpnan_labelrotationlabel1label2_apply_tickdir_set_artist_propsupdate_position)selfrJ   locr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   kwargswhichr   major_minorgrid_kwartist	__class__r   r   rE   ;   s   







zTick.__init__c                 C   sT   t |tr
|}d}nt |ttfr|\}}nd}|}tjddg|d ||f| _d S )Nr   defaultauto)r    )
isinstancestrtuplelistr   check_in_listrd   )rj   r    modeangler   r   r   rR      s   

zTick._set_labelrotationc                 C   s   | j |   S N)rP   get_tick_paddingrj   r   r   r   _pad   s   z	Tick._padc                 C   s8   |du rt j| j d }n	tjg d|d || _dS )z;Set tick direction.  Valid values are 'out', 'in', 'inout'.Nz
.direction)inoutinout)r   )rF   rG   rM   r   ry   _tickdir)rj   r   r   r   r   rg      s   
zTick._apply_tickdirc                 C      | j S r|   r   r~   r   r   r   get_tickdir      zTick.get_tickdirc                 C   s   dddd}| j || j  S )z/Get the length of the tick outside of the Axes.g              ?      ?)r   r   r   )rN   r   )rj   paddingr   r   r   r}      s
   zTick.get_tick_paddingc                 C   s   | j | j| j| j| jg}|S r|   )rZ   r[   r\   re   rf   )rj   childrenr   r   r   get_children   s   zTick.get_childrenc                    s&   t  || | j|| d| _d S NT)rD   set_clip_pathr\   stale)rj   path	transformrq   r   r   r      s   
zTick.set_clip_pathc                 C   s   di fS )z
        Test whether the mouse event occurred in the Tick marks.

        This function always returns false.  It is more useful to test if the
        axis as a whole contains the mouse rather than the set of tick marks.
        Fr   )rj   
mouseeventr   r   r   contains   s   zTick.containsc                 C   s   | j |d d| _dS )zm
        Set the tick label pad in points

        Parameters
        ----------
        val : float
        )r   TN)_apply_paramsr   rj   valr   r   r   set_pad   s   
zTick.set_padc                 C   r   )z.Get the value of the tick label pad in points.)rP   r~   r   r   r   get_pad     zTick.get_padc                 C   r   )z3Return the tick location (data coords) as a scalar.)rK   r~   r   r   r   get_loc  r   zTick.get_locc                 C   sd   |   s	d| _d S |j| j|  d | j| j| j| j| j	fD ]}|
| q|| j d| _d S )NFgid)get_visibler   
open_grouprM   get_gidr\   rZ   r[   re   rf   drawclose_group)rj   rendererrp   r   r   r   r     s   
z	Tick.drawc                    s.   t  | | j| | j| d| _dS )zl
        Set the url of label1 and label2.

        Parameters
        ----------
        url : str
        TN)rD   set_urlre   rf   r   )rj   urlrq   r   r   r     s   
zTick.set_urlc                 C   s   | | jdd d S NFr+   rH   rI   rj   ar   r   r   rh   %  s   zTick._set_artist_propsc                 C      t d)zX
        Return the view limits ``(min, max)`` of the axis the tick belongs to.
        Derived must overrideNotImplementedErrorr~   r   r   r   get_view_interval(  s   zTick.get_view_intervalc                    s  d| j fd| jfd| jfd| jfd| jffD ]\}}| v r&| | qt fdddD r d	| j| _ d
| j	| _	 d| j
| _
|  d| j | j| jfD ]}|| j || j	 qZ|  d }| j| |  d }| j| dd   D }d v r d |d< | jjdi | | jjdi | | D ]\}}t| d| | qd v r|  d | jj| jd d | jj| jd d dd   D }	| jjdi |	 | jjdi |	 dd   D }
| j jdi |
 d S )Nr   r   r   r   r   c                 3   s    | ]}| v V  qd S r|   r   r	   r2   rl   r   r   	<genexpr>6  s    z%Tick._apply_params.<locals>.<genexpr>)r   r   r   r   r   r   r   r   r   c                 S   s   i | ]\}}|d v r||qS ))r   r   r   r1   r   r   r   r4   G  r5   z&Tick._apply_params.<locals>.<dictcomp>r   r9   _r    r@   )rC   c                 S   s&   i | ]\}}|d v r|dd |qS ))r   r   r   r0   Nr   r1   r   r   r   r4   T      c                 S   s&   i | ]\}}|t v r|d d |qS r/   )_gridline_param_namesr1   r   r   r   r4   Y  r   r   )r\   rZ   r[   re   rf   set_visiblepopanyrN   rO   rP   rg   r   set_markersizeset_markeredgewidth_get_text1_transformset_transform_get_text2_transformrY   setsetattrrR   rd   )rj   rl   r   targetlinetranstick_kwr2   r3   label_kwro   r   r   r   r   .  sJ   zTick._apply_paramsc                 C   r   ):Set the location of tick in data coords with scalar *loc*.r   r   rj   rk   r   r   r   ri   ]     zTick.update_positionc                 C   r   Nr   r   r~   r   r   r   r   a     zTick._get_text1_transformc                 C   r   r   r   r~   r   r   r   r   d  r   zTick._get_text2_transformr|   )rM   
__module____qualname____doc__rE   rR   propertyr   rg   r   r}   r   r   r   r   r   r   martistallow_rasterizationr   r   rh   r   r   ri   r   r   __classcell__r   r   rq   r   r   %   sZ     
		
/r   c                       P   e Zd ZdZdZ  fddZdd Zdd Z fd	d
Zdd Zdd Z	  Z
S )XTickzq
    Contains all the Artists needed to make an x tick - the tick line,
    the label text and the grid line
    xtickc                    s   t  j|i | | j}| jjdgdgf|dd | jjdgdgf|dd | jjddgddgf|dd |  \}}}| j	jdd|||d | 
 \}}}| jjdd|||d d S Nr   tick1)datar   r@   tick2gridxyverticalalignmenthorizontalalignmentr   )rD   rE   rJ   rZ   r   get_xaxis_transformr[   r\   r   re   r   rf   rj   argsrl   axr   vaharq   r   r   rE   o  *   
zXTick.__init__c                 C      | j | jS r|   )rJ   get_xaxis_text1_transformr   r~   r   r   r   r        zXTick._get_text1_transformc                 C   r   r|   )rJ   get_xaxis_text2_transformr   r~   r   r   r   r     r   zXTick._get_text2_transformc                    N   t  | tjtjftjtjfdd| j \}}| j| | j| d S )N)|r   r   r   r   )	rD   rg   rS   TICKDOWNTICKUPr   rZ   
set_markerr[   rj   r   mark1mark2rq   r   r   rg        

zXTick._apply_tickdirc                 C   R   | j |f | j|f | j|f | j| | j| || _d| _dS r   TN)	rZ   	set_xdatar[   r\   re   set_xrf   rK   r   r   r   r   r   ri        
zXTick.update_positionc                 C   
   | j jjS r|   )rJ   viewLim	intervalxr~   r   r   r   r        
zXTick.get_view_intervalrM   r   r   r   rE   r   r   rg   ri   r   r   r   r   rq   r   r   h      
r   c                       r   )YTickzp
    Contains all the Artists needed to make a Y tick - the tick line,
    the label text and the grid line
    ytickc                    s   t  j|i | | j}| jjdgdgf|dd | jjdgdgf|dd | jjddgddgf|dd |  \}}}| j	jdd|||d | 
 \}}}| jjdd|||d d S r   )rD   rE   rJ   rZ   r   get_yaxis_transformr[   r\   r   re   r   rf   r   rq   r   r   rE     r   zYTick.__init__c                 C   r   r|   )rJ   get_yaxis_text1_transformr   r~   r   r   r   r     r   zYTick._get_text1_transformc                 C   r   r|   )rJ   get_yaxis_text2_transformr   r~   r   r   r   r     r   zYTick._get_text2_transformc                    r   )N)r   r   r   )	rD   rg   rS   TICKLEFT	TICKRIGHTr   rZ   r   r[   r   rq   r   r   rg     r   zYTick._apply_tickdirc                 C   r   r   )	rZ   	set_ydatar[   r\   re   set_yrf   rK   r   r   r   r   r   ri     r   zYTick.update_positionc                 C   r   r|   )rJ   r   	intervalyr~   r   r   r   r     r   zYTick.get_view_intervalr   r   r   rq   r   r     r   r   c                   @   sL   e Zd ZdZdd Zedd Zejdd Zedd Zejd	d Zd
S )Tickera4  
    A container for the objects defining tick position and format.

    Attributes
    ----------
    locator : `~matplotlib.ticker.Locator` subclass
        Determines the positions of the ticks.
    formatter : `~matplotlib.ticker.Formatter` subclass
        Determines the format of the tick labels.
    c                 C   s   d | _ d | _d| _d| _d S r   )_locator
_formatter_locator_is_default_formatter_is_defaultr~   r   r   r   rE     s   
zTicker.__init__c                 C   r   r|   )r  r~   r   r   r   locator  r   zTicker.locatorc                 C      t |tjs
td|| _d S )Nz7locator must be a subclass of matplotlib.ticker.Locator)ru   mtickerLocator	TypeErrorr  rj   r  r   r   r   r       
c                 C   r   r|   )r  r~   r   r   r   	formatter  r   zTicker.formatterc                 C   r  )Nz;formatter must be a subclass of matplotlib.ticker.Formatter)ru   r  	Formatterr  r  rj   r  r   r   r   r    r  N)	rM   r   r   r   rE   r   r  setterr  r   r   r   r   r    s    


r  c                   @   s    e Zd ZdZdd Zdd ZdS )_LazyTickListz
    A descriptor for lazy instantiation of tick lists.

    See comment above definition of the ``majorTicks`` and ``minorTicks``
    attributes.
    c                 C   s
   || _ d S r|   )rL   )rj   r   r   r   r   rE        
z_LazyTickList.__init__c                 C   sR   |d u r| S | j rg |_|jdd}|g|_|jS g |_|jdd}|g|_|jS )NTr   F)rL   
majorTicks	_get_tick
minorTicks)rj   instanceownertickr   r   r   __get__  s   	z_LazyTickList.__get__N)rM   r   r   r   rE   r  r   r   r   r   r    s    r  c                       s"  e Zd ZdZdZdZejdddZdd Z	d	d
d fdd
Z
edd Zejdd Zedd Zej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ed
d Zed!d Zd"d# Zd$d% Zeeed&d'Zdd(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(ddGdHZ)d dIdJZ*e+ddKdLZ,dއ fdMdN	Z-dOdP Z.ddQdRZ/dSdT Z0ddUdVZ1dWdX Z2dYdZ Z3d[d\ Z4d
d]d^d_Z5d`da Z6dbdc Z7ddddeZ8dd!dfdgdhZ9didj Z:e;j<dkdl Z=dmdn Z>dodp Z?dqdr Z@dsdt ZAdudv ZBdwdx ZCdydz ZDdd{d|ZEd}d~ ZFdd ZGdddZHdd ZIdd ZJd!dddZKdddZLdd ZMdd ZNdd ZOdd ZPdd ZQdd ZRdd ZSdd ZTdddZUdddZVdddZWdd ZXdd ZYdd ZZdd Z[dd Z\dd Z]dd Z^dd Z_dd Z`dddZadd Zbdd Zcdd Zddd Zedd Zfdd ZgeeBegdd'ZheiddĄ Zjd!ddŜddǄZkd!dddɄZldd!ddd˄Zmdd̈́ Znddτ Zoddф ZpdddӄZqddՄ Zrddׄ Zsddل Ztddۄ Zudd݄ Zv  ZwS )Axisa  
    Base class for `.XAxis` and `.YAxis`.

    Attributes
    ----------
    isDefault_label : bool

    axes : `~matplotlib.axes.Axes`
        The `~.axes.Axes` to which the Axis belongs.
    major : `~matplotlib.axis.Ticker`
        Determines the major tick positions and their label format.
    minor : `~matplotlib.axis.Ticker`
        Determines the minor tick positions and their label format.
    callbacks : `~matplotlib.cbook.CallbackRegistry`

    label : `~matplotlib.text.Text`
        The axis label.
    labelpad : float
        The distance between the axis label and the tick labels.
        Defaults to :rc:`axes.labelpad`.
    offsetText : `~matplotlib.text.Text`
        A `.Text` object containing the data offset of the ticks (if any).
    pickradius : float
        The acceptance radius for containment tests. See also `.Axis.contains`.
    majorTicks : list of `.Tick`
        The major ticks.

        .. warning::

            Ticks are not guaranteed to be persistent. Various operations
            can create, delete and modify the Tick instances. There is an
            imminent risk that changes to individual ticks will not
            survive if you work on the figure further (including also
            panning/zooming on a displayed figure).

            Working on the individual ticks is a method of last resort.
            Use `.set_tick_params` instead if possible.

    minorTicks : list of `.Tick`
        The minor ticks.
       Nz3.10z'get_converter and set_converter methods)alternativec                 C   s"   dj t| jg| jjdR  S )Nz	{}({},{})r   r   )formattyperM   rJ   	transAxesr   r~   r   r   r   __str__`  s
   zAxis.__str__   T)
pickradiusclearc                   s   t    d| _| |jdd d| _|| _t | _t | _	t
jdgd| _d| _tjtjtjtjd tjd tjd d	| _| | j ttjtj| _| | j tjd
 | _|| _t | _t | _|rm|   n	d| _d| _d| _d| _ dS )a  
        Parameters
        ----------
        axes : `~matplotlib.axes.Axes`
            The `~.axes.Axes` to which the created Axis belongs.
        pickradius : float
            The acceptance radius for containment tests. See also
            `.Axis.contains`.
        clear : bool, default: True
            Whether to clear the Axis on creation. This is not required, e.g.,  when
            creating an Axis as part of an Axes, as ``Axes.clear`` will call
            ``Axis.clear``.
            .. versionadded:: 3.8
        TFr+   unitssignalsaxes.labelsizeaxes.labelweightaxes.labelcolor)rA   
fontweightr   axes.labelpadN)!rD   rE   _remove_overlapping_locsrH   rI   isDefault_labelrJ   r  r   r*   r   CallbackRegistry	callbacks_autolabelposr`   ra   rb   rc   rF   rG   labelrh   
offsetTextlabelpadr)  dict_major_tick_kw_minor_tick_kwr*  
_converter_converter_is_explicitr+  _autoscale_on)rj   rJ   r)  r*  rq   r   r   rE   d  s8   


zAxis.__init__c                 C      | j jS r|   r   r	  r~   r   r   r   isDefault_majloc  r   zAxis.isDefault_majlocc                 C      || j _d S r|   rB  rj   valuer   r   r   rC       c                 C   rA  r|   r   r
  r~   r   r   r   isDefault_majfmt  r   zAxis.isDefault_majfmtc                 C   rD  r|   rH  rE  r   r   r   rI    rG  c                 C   rA  r|   r*   r	  r~   r   r   r   isDefault_minloc  r   zAxis.isDefault_minlocc                 C   rD  r|   rJ  rE  r   r   r   rK    rG  c                 C   rA  r|   r*   r
  r~   r   r   r   isDefault_minfmt  r   zAxis.isDefault_minfmtc                 C   rD  r|   rL  rE  r   r   r   rM    rG  c                 C   s   | j j|   | j S )z/Return Grouper of shared Axes for current axis.)rJ   _shared_axes_get_axis_nameget_siblingsr~   r   r   r   _get_shared_axes  s
   zAxis._get_shared_axesc                    s   |     fdd|  D S )z,Return list of shared axis for current axis.c                    s   g | ]}|j   qS r   )	_axis_map)r	   r   r   r   r   r         z)Axis._get_shared_axis.<locals>.<listcomp>)rO  rQ  r~   r   rS  r   _get_shared_axis  s   zAxis._get_shared_axisc                    s   t  fdd jj D S )zReturn the axis name.c                 3   s     | ]\}}| u r|V  qd S r|   r   )r	   r   axisr~   r   r   r     s   
 z&Axis._get_axis_name.<locals>.<genexpr>)r   rJ   rR  rY   r~   r   r~   r   rO    s   zAxis._get_axis_namer  Fc                 C   r   r|   )r3  r~   r   r   r   get_remove_overlapping_locs  r   z Axis.get_remove_overlapping_locsc                 C   s   t || _d S r|   )boolr3  r   r   r   r   set_remove_overlapping_locs  r   z Axis.set_remove_overlapping_locszUIf minor ticker locations that overlap with major ticker locations should be trimmed.)docc                 C   s<   d| _ |du r| jj}| j| | j||f d| _dS )a  
        Set the coordinates of the label.

        By default, the x coordinate of the y label and the y coordinate of the
        x label are determined by the tick label bounding boxes, but this can
        lead to poor alignment of multiple labels if there are multiple Axes.

        You can also specify the coordinate system of the label with the
        transform.  If None, the default coordinate system will be the axes
        coordinate system: (0, 0) is bottom left, (0.5, 0.5) is center, etc.
        FNT)r7  rJ   r&  r8  r   set_positionr   )rj   r   r   r   r   r   r   set_label_coords  s   
zAxis.set_label_coordsc                 C   
   | j  S )z,Return the transform used in the Axis' scale)_scaleget_transformr~   r   r   r   r_    r   zAxis.get_transformc                 C   rA  )z#Return this Axis' scale (as a str).)r^  r   r~   r   r   r   	get_scale  r   zAxis.get_scalec                 K   sR   t |tjstj|| fi || _n|| _| j|  d| _d| _d| _d| _	d S r   )
ru   mscale	ScaleBasescale_factoryr^  #set_default_locators_and_formattersrC  rK  rI  rM  )rj   rF  rl   r   r   r   
_set_scale  s   
zAxis._set_scalec                    s   |    |  tj tj}|  D ]}|j  j|fi | |  d|_	q|  tj tj}||krL| j
jdi  fdd| j
jD  dS dS )a;  
        Set this Axis' scale.

        Parameters
        ----------
        value : str or `.ScaleBase`
            The axis scale type to apply.  Valid string values are the names of scale
            classes ("linear", "log", "function",...).  These may be the names of any
            of the :ref:`built-in scales<builtin_scales>` or of any custom scales
            registered using `matplotlib.scale.register_scale`.

        **kwargs
            If *value* is a string, keywords are passed to the instantiation method of
            the respective class.
        Tc                    s   i | ]
}d | | kqS )scaler   r   rS  r   r   r4   #      z(Axis._set_axes_scale.<locals>.<dictcomp>Nr   )rO  get_major_locatornonsingularrb   infrQ  rR  re  _update_transScaler   rJ   autoscale_view_axis_names)rj   rF  rl   old_default_limsr   new_default_limsr   rS  r   _set_axes_scale  s    

zAxis._set_axes_scalec                 C   s   | j |||  S )zs
        Return the range *vmin*, *vmax*, restricted to the domain supported by the
        current scale.
        )r^  limit_range_for_scale
get_minpos)rj   vminvmaxr   r   r   rq  %  s   zAxis.limit_range_for_scalec                 C   r   )z'Return whether this Axis is autoscaled.r@  r~   r   r   r   _get_autoscale_on,  r   zAxis._get_autoscale_onc                 C   s   |dur	|| _ dS dS )z
        Set whether this Axis is autoscaled when drawing or by `.Axes.autoscale_view`.

        If b is None, then the value is not changed.

        Parameters
        ----------
        b : bool
        Nru  )rj   br   r   r   _set_autoscale_on0  s   

zAxis._set_autoscale_onc                 C   s   | j | jg|  |  S r|   )r8  r9  get_major_ticksget_minor_ticksr~   r   r   r   r   =  s
   
zAxis.get_childrenc                 C   ,   | j   tjd otjd dv | j d< d S )Nr(   r%   r&   r   )r<  r*  rF   rG   r~   r   r   r   _reset_major_tick_kwA     

zAxis._reset_major_tick_kwc                 C   r{  )Nr(   r%   r)   r   )r=  r*  rF   rG   r~   r   r   r   _reset_minor_tick_kwG  r}  zAxis._reset_minor_tick_kwc                 C   s   | j   | j tjd  | j tjd  | j tjd  | j  tjd | _| 	  | 
d tjdgd| _tjd oGtjd	 d
v | jd< tjd oVtjd	 dv | jd< |   d| _d| _d| _d| _dS )z
        Clear the axis.

        This resets axis properties to their default values:

        - the label
        - the scale
        - locators, formatters and ticks
        - major and minor grid
        - units
        - registered callbacks
        r0  r.  r/  r2  linearr+  r,  r(   r%   r&   r   r)   NFT)r8  _reset_visual_defaults	set_colorrF   rG   set_fontsizeset_fontweightr9  r:  _initre  r   r5  r6  r<  r=  reset_ticksr>  r?  r+  r   r~   r   r   r   r*  M  s(   





z
Axis.clearc                 C   sb   z| ` W n	 ty   Y nw z| `W n	 ty   Y nw z
| | jj W dS  ty0   Y dS w )zs
        Re-initialize the major and minor Tick lists.

        Each list starts with a single fresh Tick.
        N)r  AttributeErrorr  r   rJ   patchr~   r   r   r   r  x  s   zAxis.reset_ticksc                 C   s   |   }|dkr| j}| t|j|j dS |dkr,| j}| t|j|j dS |dkrC| j}| tj	|j
|j|jd dS |dkrR| tjdd dS | t  dS )	a  
        Display default minor ticks on the Axis, depending on the scale
        (`~.axis.Axis.get_scale`).

        Scales use specific minor locators:

        - log: `~.LogLocator`
        - symlog: `~.SymmetricalLogLocator`
        - asinh: `~.AsinhLocator`
        - logit: `~.LogitLocator`
        - default: `~.AutoMinorLocator`

        Displaying minor ticks may reduce performance; you may turn them off
        using `minorticks_off()` if drawing speed is a problem.
        logsymlogasinh)basesubslogitTr*   N)r`  r^  set_minor_locatorr  
LogLocatorr  r  SymmetricalLogLocator
_transformAsinhLocatorlinear_width_base_subsLogitLocatorAutoMinorLocator)rj   rf  sr   r   r   minorticks_on  s&   zAxis.minorticks_onc                 C   s   |  t  dS )z!Remove minor ticks from the Axis.N)r  r  NullLocatorr~   r   r   r   minorticks_off     zAxis.minorticks_offr   c                 K   s  t jg d|d | |}|r1|dv r|   | j| |dv r,|   | j| |   nV|dv rI| j| | j	D ]
}|j
di | q>|dv ra| j| | jD ]
}|j
di | qVd|v sid|v r{| j| jddpy| jdd d|v r| j|d  d	| _d
S )aW  
        Set appearance parameters for ticks, ticklabels, and gridlines.

        For documentation of keyword arguments, see
        :meth:`matplotlib.axes.Axes.tick_params`.

        See Also
        --------
        .Axis.get_tick_params
            View the current style settings for ticks, ticklabels, and
            gridlines.
        r   r*   r'   rm   r   r'   r*   r'   r   r   Fr   TNr   )r   ry   _translate_tick_paramsr|  r<  updater~  r=  r  r  r   r  r9  r   getr  r   )rj   rm   resetrl   kwtransr  r   r   r   set_tick_params  s4   




zAxis.set_tick_paramsc                 C   s:   t jddg|d |dkr| j| jddS | j| jddS )au  
        Get appearance parameters for ticks, ticklabels, and gridlines.

        .. versionadded:: 3.7

        Parameters
        ----------
        which : {'major', 'minor'}, default: 'major'
            The group of ticks for which the parameters are retrieved.

        Returns
        -------
        dict
            Properties for styling tick elements added to the axis.

        Notes
        -----
        This method returns the appearance parameters for styling *new*
        elements added to this axis and may be different from the values
        on current elements if they were modified directly by the user
        (e.g., via ``set_*`` methods on individual tick objects).

        Examples
        --------
        ::

            >>> ax.yaxis.set_tick_params(labelsize=30, labelcolor='red',
            ...                          direction='out', which='major')
            >>> ax.yaxis.get_tick_params(which='major')
            {'direction': 'out',
            'left': True,
            'right': False,
            'labelleft': True,
            'labelright': False,
            'gridOn': False,
            'labelsize': 30,
            'labelcolor': 'red'}
            >>> ax.yaxis.get_tick_params(which='minor')
            {'left': True,
            'right': False,
            'labelleft': True,
            'labelright': False,
            'gridOn': False}


        r   r*   r  Treverse)r   ry   r  r<  r=  )rj   rm   r   r   r   get_tick_params  s   /zAxis.get_tick_paramsc                    s  i | ddddddddd	d
dddddddddddddddgt }dddddddddddd}|rXi }| jdk}g d}| D ]\}}	|	 v rV|rO||v rOq@ |	||< q@n fdd| D }d v rt d}
|
|d< |
|d<  D ]}||vrtd ||f qv|  |S )!a  
        Translate the kwargs supported by `.Axis.set_tick_params` to kwargs
        supported by `.Tick._apply_params`.

        In particular, this maps axis specific names like 'top', 'left'
        to the generic tick1, tick2 logic of the axis. Additionally, there
        are some other name translations.

        Returns a new dict of translated kwargs.

        Note: Use reverse=True to translate from those supported by
        `.Tick._apply_params` back to those supported by
        `.Axis.set_tick_params`.
        r   r   r   r   r   r   r   r   r   r   r   r   r   r   length	directionleftbottomrighttop	labelleftlabelbottom
labelrightlabeltopr    )r  r  rC   r  r  r  r  r  r  r  r  r   )r  r  r  r  c                    s$   i | ]\}}| v r|  |qS r   )r   )r	   oldkeynewkeykw_r   r   r4   J  s    
z/Axis._translate_tick_params.<locals>.<dictcomp>colorsz3keyword %s is not recognized; valid keywords are %s)r   	axis_namerY   r   
ValueErrorr  )clskwr  allowed_keyskeymapr  	is_x_axisy_axis_keysr  r  ckeyr   r  r   r    sd   





zAxis._translate_tick_paramsc                    s6   t  || | j| j D ]}||| qd| _d S r   )rD   r   r  r  r   )rj   r   r   childrq   r   r   r   [  s   
zAxis.set_clip_pathc                 C   r   )z3Return the ``(min, max)`` view limits of this axis.r   r   r~   r   r   r   r   a  r   zAxis.get_view_intervalc                 C   r   )a7  
        Set the axis view limits.  This method is for internal use; Matplotlib
        users should typically use e.g. `~.Axes.set_xlim` or `~.Axes.set_ylim`.

        If *ignore* is False (the default), this method will never reduce the
        preexisting view limits, only expand them if *vmin* or *vmax* are not
        within them.  Moreover, the order of *vmin* and *vmax* does not matter;
        the orientation of the axis will not change.

        If *ignore* is True, the view limits will be set exactly to ``(vmin,
        vmax)`` in that order.
        r   r   rj   rs  rt  ignorer   r   r   set_view_intervale  s   zAxis.set_view_intervalc                 C   r   )z3Return the ``(min, max)`` data limits of this axis.r   r   r~   r   r   r   get_data_intervalt  r   zAxis.get_data_intervalc                 C   r   )a  
        Set the axis data limits.  This method is for internal use.

        If *ignore* is False (the default), this method will never reduce the
        preexisting data limits, only expand them if *vmin* or *vmax* are not
        within them.  Moreover, the order of *vmin* and *vmax* does not matter;
        the orientation of the axis will not change.

        If *ignore* is True, the data limits will be set exactly to ``(vmin,
        vmax)`` in that order.
        r   r   r  r   r   r   set_data_intervalx  s   zAxis.set_data_intervalc                 C   s   |   \}}||k S )a.  
        Return whether this Axis is oriented in the "inverse" direction.

        The "normal" direction is increasing to the right for the x-axis and to
        the top for the y-axis; the "inverse" direction is increasing to the
        left for the x-axis and to the bottom for the y-axis.
        )r   )rj   lowhighr   r   r   get_inverted  s   zAxis.get_invertedc                 C   s0   |   \}}| jt||ft|dddi dS )a+  
        Set whether this Axis is oriented in the "inverse" direction.

        The "normal" direction is increasing to the right for the x-axis and to
        the top for the y-axis; the "inverse" direction is increasing to the
        left for the x-axis and to the bottom for the y-axis.
        r  rt   N)r   _set_limsortedrX  )rj   invertedr   rw  r   r   r   set_inverted  s   $zAxis.set_invertedc                 C   s   dS )z{
        Set the default limits for the axis data and view interval if they
        have not been not mutated yet.
        Nr   r~   r   r   r   set_default_intervals  s    zAxis.set_default_intervals)emitc                C   s  |   }| jj|||ffgdd | j|| j}| j|| j}|du s)|du r;|  \}}|du r5|}|du r;|}|  dkrm|dksI|dkrm|  \}}|dkr^td| d |}|dkrmtd| d |}||krztd| d	 t	||k}| 
 ||\}}| ||\}}t||gt	|d
\}}| j||dd |  D ]}	d|	j|< q| | |r| jj| d| j |  D ]3}
|
| ju rq|
j| j||d|d |r|
j| d|
 |
jdd }| jddkr|j  qd| _||fS )a`  
        Set view limits.

        This method is a helper for the Axes ``set_xlim``, ``set_ylim``, and
        ``set_zlim`` methods.

        Parameters
        ----------
        v0, v1 : float
            The view limits.  (Passing *v0* as a (low, high) pair is not
            supported; normalization must occur in the Axes setters.)
        emit : bool, default: True
            Whether to notify observers of limit change.
        auto : bool or None, default: False
            Whether to turn on autoscaling of the x-axis. True turns on, False
            turns off, None leaves unchanged.
        F)convertNr  r   zAttempt to set non-positive z)lim on a log-scaled axis will be ignored.z)Attempting to set identical low and high z<lims makes transformation singular; automatically expanding.r  Tr  lim_changed)r  rt   r+   )rO  rJ   _process_unit_info_validate_converted_limitsconvert_unitsr   r`  r   warn_externalrX  rh  ri  rq  r  r  rQ  _stale_viewlimsrx  r6  processrR  r  rI   canvas	draw_idler   )rj   v0v1r  rt   r   old0old1r  r   other	other_figr   r   r   r    sZ   




zAxis._set_limc                 C   s"   |d u rd S | | jdd d S r   r   r   r   r   r   rh     s   zAxis._set_artist_propsc              	   C   s  |   }| jj|}| t|}t|||D ]\}}}|| |j	| |j
	| q|  }| jj|}| t|}	t|	||D ]\}}}|| |j	| |j
	| qGg ||	}
|  \}}||krs||}}t| dr| jjdkrtjd rd}|| }|||  }|||  }|  ||g}g }|
D ]"}z|  | }W n	 ty   Y qw t||r|| q|S )z
        Update ticks (position and labels) using the current data interval of
        the axes.  Return the list of ticks that will be drawn.
        rJ   3dzaxes3d.automargingqq?)get_majorticklocsr   r  format_ticksry  lenzipri   re   set_textrf   get_minorticklocsr*   rz  r   hasattrrJ   r   rF   rG   r_  r   r   AssertionErrormtransforms_interval_contains_closeappend)rj   
major_locsmajor_labelsmajor_ticksr  rk   r8  
minor_locsminor_labelsminor_ticksticksview_low	view_highmargindelta
interval_tticks_to_drawloc_tr   r   r   _update_ticks  sJ   



zAxis._update_ticksc                    s<    du r| j dd   fdd|D  fdd|D fS )z8Return lists of bboxes for ticks' label1's and label2's.NTr+   c                    "   g | ]}|j  r|j  qS r   )re   r   get_window_extentr	   r  r   r   r   r   4      
z.Axis._get_ticklabel_bboxes.<locals>.<listcomp>c                    r  r   )rf   r   r   r  r  r   r   r   6  r  )rI   _get_renderer)rj   r  r   r   r  r   _get_ticklabel_bboxes0  s   

zAxis._get_ticklabel_bboxes)for_layout_onlyc                   sF  |   r
|r|  sdS  du r| jdd  |  }|   | | \}}| || | j	| j
j  g  fdd| jfD ||}| j  r| j }|r| jdkrr|jdkrr|j|j d d	 |_|jd
 |_| jdkr|jdkr|j|j d d	 |_|jd
 |_|| dd |D }|rtj|S dS )a  
        Return a bounding box that encloses the axis. It only accounts
        tick labels, axis label, and offsetText.

        If *for_layout_only* is True, then the width of the label (if this
        is an x-axis) or the height of the label (if this is a y-axis) is
        collapsed to near zero.  This allows tight/constrained_layout to ignore
        too-long labels when doing their layout.
        NTr+   c                 3   s"    | ]}|  r| V  qd S r|   )r   r   )r	   r   r  r   r   r   R  s
    z%Axis.get_tightbbox.<locals>.<genexpr>r   r      r   r   r   c                 S   sH   g | ] }d |j   k rtjk rn nd |j  k rtjk rn n|qS )r   )r   rb   rj  height)r	   rw  r   r   r   r   e  s    8z&Axis.get_tightbbox.<locals>.<listcomp>)r   get_in_layoutrI   r  r  _update_label_positionr  _update_offset_text_positionr9  r  r   r  
get_offsetr8  r   r  r   x0x1r  y0y1r  r  Bboxunion)rj   r   r  r  tlb1tlb2bboxesbbr   r  r   get_tightbbox9  s@   




zAxis.get_tightbboxc                 C   sL   g }t | jr|| jd   t | jr || jd   t|ddS )Nr   )rs   )r  r  r  r}   r  max)rj   valuesr   r   r   r}   l  s   

zAxis.get_tick_paddingc                 C   s   |   sd S |jt|  d |  }| ||\}}|D ]}|| q| | | j| | 	|| | j
| jj  | j
| |t d| _d S )Nr   F)r   r   rM   r   r  r  r   r
  r8  r  r9  r  r   r  r  r   r   )rj   r   r  r  r  r  r   r   r   r   t  s   


z	Axis.drawc                 C   s   |   }tddd |D S )z6Return this Axis' grid lines as a list of `.Line2D`\s.zLine2D gridlinec                 S      g | ]}|j qS r   )r\   r  r   r   r   r         z&Axis.get_gridlines.<locals>.<listcomp>)ry  r   silent_list)rj   r  r   r   r   get_gridlines  s   zAxis.get_gridlinesc                 C   r   )z>Assigning legend labels is not supported. Raises RuntimeError.zfA legend label cannot be assigned to an Axis. Did you mean to set the axis label via set_label_text()?)RuntimeError)rj   r  r   r   r   	set_label  s   zAxis.set_labelc                 C   r   )a  
        Return the axis label as a Text instance.

        .. admonition:: Discouraged

           This overrides `.Artist.get_label`, which is for legend labels, with a new
           semantic. It is recommended to use the attribute ``Axis.label`` instead.
        )r8  r~   r   r   r   	get_label  s   	zAxis.get_labelc                 C   r   )z.Return the axis offsetText as a Text instance.)r9  r~   r   r   r   get_offset_text  r   zAxis.get_offset_textc                 C   r   )z0Return the depth of the axis used by the picker.)_pickradiusr~   r   r   r   get_pickradius  r   zAxis.get_pickradiusc                 C   4   |    |  }dd |D }dd |D }|| S )z@Return this Axis' major tick labels, as a list of `~.text.Text`.c                 S      g | ]
}|j  r|j qS r   re   r   r  r   r   r   r     rg  z,Axis.get_majorticklabels.<locals>.<listcomp>c                 S   r%  r   rf   r   r  r   r   r   r     rg  )r  ry  rj   r  labels1labels2r   r   r   get_majorticklabels  
   zAxis.get_majorticklabelsc                 C   r$  )z@Return this Axis' minor tick labels, as a list of `~.text.Text`.c                 S   r%  r   r&  r  r   r   r   r     rg  z,Axis.get_minorticklabels.<locals>.<listcomp>c                 S   r%  r   r'  r  r   r   r   r     rg  )r  rz  r(  r   r   r   get_minorticklabels  r,  zAxis.get_minorticklabelsc                 C   sf   |dur)|dkr|   S |dkr|  S |dkr |  |    S tjg d|d |r/|   S |  S )aq  
        Get this Axis' tick labels.

        Parameters
        ----------
        minor : bool
           Whether to return the minor or the major ticklabels.

        which : None, ('minor', 'major', 'both')
           Overrides *minor*.

           Selects which ticklabels to return

        Returns
        -------
        list of `~matplotlib.text.Text`
        Nr*   r   r'   r  r  )r-  r+  r   ry   )rj   r*   rm   r   r   r   get_ticklabels  s   zAxis.get_ticklabelsc                 C   :   g }|   }|D ]}||j ||j qtd|S )z<Return this Axis' major tick lines as a list of `.Line2D`\s.Line2D ticklines)ry  r  rZ   r[   r   r  rj   linesr  r  r   r   r   get_majorticklines     zAxis.get_majorticklinesc                 C   r/  )z<Return this Axis' minor tick lines as a list of `.Line2D`\s.r0  )rz  r  rZ   r[   r   r  r1  r   r   r   get_minorticklines  r4  zAxis.get_minorticklinesc                 C      |r|   S |  S )z6Return this Axis' tick lines as a list of `.Line2D`\s.)r5  r3  rj   r*   r   r   r   get_ticklines  s   zAxis.get_ticklinesc                 C   r]  )z;Return this Axis' major tick locations in data coordinates.r   r  r~   r   r   r   r    r   zAxis.get_majorticklocsc           
      C   s   t | j }| jrN| j }| j }||}||}t	|| 
 \}}|| d }t j|dddf |dddf |ddjdd}	||	  }|S )z;Return this Axis' minor tick locations in data coordinates.gh㈵>Nr   )atolrtolr@   )rV  )rb   asarrayr*   r  remove_overlapping_locsr   r^  r_  r   r  r   iscloser   )
rj   r  r  r   tr_minor_locstr_major_locslohitolmaskr   r   r   r    s   



 
zAxis.get_minorticklocsr  c                C   r6  )a  
        Return this Axis' tick locations in data coordinates.

        The locations are not clipped to the current axis limits and hence
        may contain locations that are not visible in the output.

        Parameters
        ----------
        minor : bool, default: False
            True to return the minor tick directions,
            False to return the major tick directions.

        Returns
        -------
        array of tick locations
        )r  r  r7  r   r   r   get_ticklocs	  s   zAxis.get_ticklocsc                 C   s4   |rt dd |  D S t dd |  D S )a;  
        Return an array of this Axis' tick directions.

        Parameters
        ----------
        minor : bool, default: False
            True to return the minor tick directions,
            False to return the major tick directions.

        Returns
        -------
        array of tick directions
        c                 S   r  r   r   r  r   r   r   r   ,  r  z,Axis.get_ticks_direction.<locals>.<listcomp>c                 S   r  r   r   r  r   r   r   r   /  r  )rb   arrayrz  ry  r7  r   r   r   get_ticks_direction  s   zAxis.get_ticks_directionc                 C   sH   | j du rtd| jj d|r| jn| j}| j | jdfd|i|S )z!Return the default tick instance.NzThe Axis subclass z3 must define _tick_class or reimplement _get_tick()r   r   )_tick_classr   rr   rM   r<  r=  rJ   )rj   r   r   r   r   r   r  1  s   
zAxis._get_tickc                 C   s.   | j }|dtj| d }tj|d S )z
        Return the text size of tick labels for this Axis.

        This is a convenience function to avoid having to create a `Tick` in
        `.get_tick_space`, since it is expensive.
        r   ztick.labelsize)r   )r<  r  rF   rG   r`   FontPropertiesget_size_in_points)rj   r  r   r   r   r   r   _get_tick_label_size:  s
   zAxis._get_tick_label_sizec                 C   s   |du s|du r
dS |j |j  |j|j |j|j |j|j |j|j || |j|_|j|_|j|_|j	|_	|j
|_
|j|_|j|_dS )z3Copy the properties from *src* tick to *dest* tick.N)re   update_fromrf   rZ   r[   r\   rK   rN   rO   rP   rd   rU   r   )rj   srcdestr   r   r   _copy_tick_propsF  s   
zAxis._copy_tick_propsc                 C   r]  )zGet the text of the label.)r8  get_textr~   r   r   r   get_label_textX  r   zAxis.get_label_textc                 C   rA  )z$Get the locator of the major ticker.r9  r~   r   r   r   rh  \  r   zAxis.get_major_locatorc                 C   rA  )z$Get the locator of the minor ticker.)r*   r  r~   r   r   r   get_minor_locator`  r   zAxis.get_minor_locatorc                 C   rA  )z&Get the formatter of the major ticker.)r   r  r~   r   r   r   get_major_formatterd  r   zAxis.get_major_formatterc                 C   rA  )z&Get the formatter of the minor ticker.)r*   r  r~   r   r   r   get_minor_formatterh  r   zAxis.get_minor_formatterc                 C   h   |du r
t |  }t | j|k r-| jdd}| j| | | jd | t | j|k s| jd| S )a  
        Return the list of major `.Tick`\s.

        .. warning::

            Ticks are not guaranteed to be persistent. Various operations
            can create, delete and modify the Tick instances. There is an
            imminent risk that changes to individual ticks will not
            survive if you work on the figure further (including also
            panning/zooming on a displayed figure).

            Working on the individual ticks is a method of last resort.
            Use `.set_tick_params` instead if possible.
        NTr  r   )r  r  r  r  r  rO  rj   numticksr  r   r   r   ry  l     zAxis.get_major_ticksc                 C   rU  )a  
        Return the list of minor `.Tick`\s.

        .. warning::

            Ticks are not guaranteed to be persistent. Various operations
            can create, delete and modify the Tick instances. There is an
            imminent risk that changes to individual ticks will not
            survive if you work on the figure further (including also
            panning/zooming on a displayed figure).

            Working on the individual ticks is a method of last resort.
            Use `.set_tick_params` instead if possible.
        NFr  r   )r  r  r  r  r  rO  rV  r   r   r   rz    rX  zAxis.get_minor_ticksc                 K   s   |r|du r	d}n	|st d d}| }t jg d|d dd | D }|dv rD|du r6| jd	  n||d	< | jdd
di| |dv r`|du rR| jd	  n||d	< | jdd
di| d| _dS )a  
        Configure the grid lines.

        Parameters
        ----------
        visible : bool or None
            Whether to show the grid lines.  If any *kwargs* are supplied, it
            is assumed you want the grid on and *visible* will be set to True.

            If *visible* is *None* and there are no *kwargs*, this toggles the
            visibility of the lines.

        which : {'major', 'minor', 'both'}
            The grid lines to apply the changes on.

        **kwargs : `~matplotlib.lines.Line2D` properties
            Define the line properties of the grid, e.g.::

                grid(color='r', linestyle='-', linewidth=2)
        NTz_First parameter to grid() is false, but line properties are supplied. The grid will be enabled.r  r  c                 S   s   i | ]
\}}d | |qS r   r   )r	   r   rF  r   r   r   r4     rg  zAxis.grid.<locals>.<dictcomp>r  r   rm   r*   r  r   r   )	r   r  lowerry   rY   r=  r  r<  r   )rj   r8   rm   rl   gridkwr   r   r   r     s,   

z	Axis.gridc                 C   s|   | j s
tj|}n| j}|du rdS | j|k}| | | j|| }|dur3| jdu r3| | n|r9| 	  d| _
dS )z
        Introspect *data* for units converter and update the
        ``axis.get_converter`` instance if necessary. Return *True*
        if *data* is registered for unit conversion.
        NFT)r?  munitsregistryget_converterr>  _set_converterdefault_unitsr+  	set_units_update_axisinfor   )rj   r   	converterneednewrs   r   r   r   update_units  s   

zAxis.update_unitsc                 C   s  | j du rdS | j | j| }|du rdS |jdur-| jj|jkr-| jr-| |j d| _|jdurE| j	j|jkrE| j
rE| |j d| _
|jdur]| jj|jkr]| jr]| |j d| _|jduru| j	j|jkru| jru| |j d| _|jdur| jr| |j d| _|   dS )zt
        Check the axis converter for the stored units to see if the
        axis info needs to be updated.
        NT)r>  axisinfor+  majlocr   r  rC  set_major_locatorminlocr*   rK  r  majfmtr  rI  set_major_formatterminfmtrM  set_minor_formatterr8  r4  set_label_textr  )rj   infor   r   r   ra    s2   




zAxis._update_axisinfoc                 C   s   | j d up	| jd uS r|   )r>  r+  r~   r   r   r   
have_units  s   zAxis.have_unitsc              
   C   s|   t |r|S | jd u r| t j| | jd u r|S z| j|| j| }W |S  ty= } z	t 	d||d }~ww )Nz*Failed to convert value(s) to axis units: )
r[  _is_natively_supportedr>  r^  r\  r]  r  r+  	ExceptionConversionError)rj   r   reter   r   r   r    s"   


zAxis.convert_unitsc                 C   r   )z
        Get the unit converter for axis.

        Returns
        -------
        `~matplotlib.units.ConversionInterface` or None
        )r>  r~   r   r   r   r]       zAxis.get_converterc                 C   s   |  | d| _dS )z
        Set the unit converter for axis.

        Parameters
        ----------
        converter : `~matplotlib.units.ConversionInterface`
        TN)r^  r?  rj   rb  r   r   r   set_converter#  s   

zAxis.set_converterc                 C   sd   | j |u s
| j |krd S | jrtd| j d ur-t|t| j s-t| j t|s-td || _ d S )Nz*Axis already has an explicit converter setz]This axis already has a converter set and is updating to a potentially incompatible converter)r>  r?  r  ru   r%  r   r  rv  r   r   r   r^  .  s   

zAxis._set_converterc                 C   s@   || j krdS |  D ]}||_ |  |jd d|_qdS )z
        Set the units for axis.

        Parameters
        ----------
        u : units tag

        Notes
        -----
        The units of any shared axis will also be updated.
        Nr+  T)r+  rU  ra  r6  r  r   )rj   urV  r   r   r   r`  >  s   
zAxis.set_unitsc                 C   r   )zReturn the units for axis.)r+  r~   r   r   r   	get_unitsR  r   zAxis.get_unitsc                 K   s>   d| _ | j| |dur| j| | j| d| _| jS )a  
        Set the text value of the axis label.

        Parameters
        ----------
        label : str
            Text string.
        fontdict : dict
            Text properties.

            .. admonition:: Discouraged

               The use of *fontdict* is discouraged. Parameters should be passed as
               individual keyword arguments or using dictionary-unpacking
               ``set_label_text(..., **fontdict)``.

        **kwargs
            Merged into fontdict.
        FNT)r4  r8  r  r  r   )rj   r8  fontdictrl   r   r   r   rm  V  s   zAxis.set_label_textc                 C      |  || j dS )a  
        Set the formatter of the major ticker.

        In addition to a `~matplotlib.ticker.Formatter` instance,
        this also accepts a ``str`` or function.

        For a ``str`` a `~matplotlib.ticker.StrMethodFormatter` is used.
        The field used for the value must be labeled ``'x'`` and the field used
        for the position must be labeled ``'pos'``.
        See the  `~matplotlib.ticker.StrMethodFormatter` documentation for
        more information.

        For a function, a `~matplotlib.ticker.FuncFormatter` is used.
        The function must take two inputs (a tick value ``x`` and a
        position ``pos``), and return a string containing the corresponding
        tick label.
        See the  `~matplotlib.ticker.FuncFormatter` documentation for
        more information.

        Parameters
        ----------
        formatter : `~matplotlib.ticker.Formatter`, ``str``, or function
        N)_set_formatterr   r  r   r   r   rj  r  s   zAxis.set_major_formatterc                 C   r{  )aZ  
        Set the formatter of the minor ticker.

        In addition to a `~matplotlib.ticker.Formatter` instance,
        this also accepts a ``str`` or function.
        See `.Axis.set_major_formatter` for more information.

        Parameters
        ----------
        formatter : `~matplotlib.ticker.Formatter`, ``str``, or function
        N)r|  r*   r  r   r   r   rl    s   zAxis.set_minor_formatterc                 C   s   t |trt|}nt|rt |tjst|}ntjtj	|d t |tj
r<t|jdkr<t |jtjs<td || jkrEd| _nd| _||_||  d| _d S )N)r  r   =FixedFormatter should only be used together with FixedLocatorFT)ru   rv   r  StrMethodFormattercallable
TickHelperFuncFormatterr   check_isinstancer  FixedFormatterr  seqr  FixedLocatorr  r   rI  rM  r  set_axisr   )rj   r  levelr   r   r   r|    s$   





zAxis._set_formatterc                 C   H   t jtj|d d| _|| j_| jjr| jj| |	|  d| _
dS )z
        Set the locator of the major ticker.

        Parameters
        ----------
        locator : `~matplotlib.ticker.Locator`
        r  FTN)r   r  r  r  rC  r   r  r  _set_locatorr  r   r  r   r   r   rg       

zAxis.set_major_locatorc                 C   r  )z
        Set the locator of the minor ticker.

        Parameters
        ----------
        locator : `~matplotlib.ticker.Locator`
        r  FTN)r   r  r  r  rK  r*   r  r  r  r  r   r  r   r   r   r    r  zAxis.set_minor_locatorc                 C   s$   t |tr	|dk rtd|| _dS )z
        Set the depth of the axis used by the picker.

        Parameters
        ----------
        pickradius : float
            The acceptance radius for containment tests.
            See also `.Axis.contains`.
        r   z pick radius should be a distanceN)ru   r   r  r"  )rj   r)  r   r   r   set_pickradius  s   

zAxis.set_pickradiuszGThe acceptance radius for containment tests. See also `.Axis.contains`.c                 C   s   |  |dS )Nr<   )r  )tickdr   posr   r   r   _format_with_dict  rG  zAxis._format_with_dict)r*   rz  c                K   s  z	dd |D }W n t y   t |dddw |r |  n|  }|s+t }nGt|tjrht|jt|krPt|dkrPt	dt|j dt| d	d
d t
|j|D }t| j|}t|}n
td t|}t 2 tjddd |r| | |  }	| t|	}
n| | |  }	| t|	}
W d   n1 sw   Y  g }|dur|| tt
|	|
D ]?\}\}}|| |||}|j| |j | |j!| |j! | |j" r|#|j |j!" r|#|j! qd| _$|S )a	  
        [*Discouraged*] Set this Axis' tick labels with list of string labels.

        .. admonition:: Discouraged

            The use of this method is discouraged, because of the dependency on
            tick positions. In most cases, you'll want to use
            ``Axes.set_[x/y/z]ticks(positions, labels)`` or ``Axis.set_ticks``
            instead.

            If you are using this method, you should always fix the tick
            positions before, e.g. by using `.Axis.set_ticks` or by explicitly
            setting a `~.ticker.FixedLocator`. Otherwise, ticks are free to
            move and the labels may end up in unexpected positions.

        Parameters
        ----------
        labels : sequence of str or of `.Text`\s
            Texts for labeling each tick location in the sequence set by
            `.Axis.set_ticks`; the number of labels must match the number of locations.
            The labels are used as is, via a `.FixedFormatter` (without further
            formatting).

        minor : bool
            If True, set minor ticks instead of major ticks.

        fontdict : dict, optional

            .. admonition:: Discouraged

               The use of *fontdict* is discouraged. Parameters should be passed as
               individual keyword arguments or using dictionary-unpacking
               ``set_ticklabels(..., **fontdict)``.

            A dictionary controlling the appearance of the ticklabels.
            The default *fontdict* is::

               {'fontsize': rcParams['axes.titlesize'],
                'fontweight': rcParams['axes.titleweight'],
                'verticalalignment': 'baseline',
                'horizontalalignment': loc}

        **kwargs
            Text properties.

            .. warning::

                This only sets the properties of the current ticks, which is
                only sufficient for static plots.

                Ticks are not guaranteed to be persistent. Various operations
                can create, delete and modify the Tick instances. There is an
                imminent risk that these settings can get lost if you work on
                the figure further (including also panning/zooming on a
                displayed figure).

                Use `.set_tick_params` instead if possible.

        Returns
        -------
        list of `.Text`\s
            For each tick, includes ``tick.label1`` if it is visible, then
            ``tick.label2`` if it is visible, in that order.
        c                 S   s"   g | ]}t |d r| n|qS )rP  )r  rP  )r	   tr   r   r   r   -  s    z'Axis.set_ticklabels.<locals>.<listcomp>=z must be a sequenceNr   z&The number of FixedLocator locations (zJ), usually from a call to set_ticks, does not match the number of labels (z).c                 S   s   i | ]\}}||qS r   r   )r	   rk   labr   r   r   r4   ?  rT  z'Axis.set_ticklabels.<locals>.<dictcomp>zrset_ticklabels() should only be used with a fixed number of ticks, i.e. after set_ticks() or using a FixedLocator.r  r}  )messageT)%r  rR  rh  r  NullFormatterru   r  r  locsr  r  	functoolspartialr  r  r   r  r  warningscatch_warningsfilterwarningsrl  r  rz  rj  r  ry  r  	enumerateri   re   r  _internal_updaterf   r   r  r   )rj   labelsr*   rz  rl   r  r  r  funcr  r  rs  r  rk   r  
tick_labelr   r   r   set_ticklabels  sv   A









zAxis.set_ticklabelsc                C   sz   |  |}t|}t|r|  D ]}|t|t| qd| j_	|r1| 
| | t|S | | | t|S r   )r  r  r  r  rU  r  minr  rJ   r   r  rz  rg  ry  )rj   r  r*   r  rV  r   r   r   _set_tick_locationsj  s   



zAxis._set_tick_locationsc                K   sX   |du r|rt t|}td|d| j||d}|dur*| j|fd|i| |S )al  
        Set this Axis' tick locations and optionally tick labels.

        If necessary, the view limits of the Axis are expanded so that all
        given ticks are visible.

        Parameters
        ----------
        ticks : 1D array-like
            Array of tick locations (either floats or in axis units). The axis
            `.Locator` is replaced by a `~.ticker.FixedLocator`.

            Pass an empty list (``set_ticks([])``) to remove all ticks.

            Some tick formatters will not label arbitrary tick positions;
            e.g. log formatters only label decade ticks by default. In
            such a case you can set a formatter explicitly on the axis
            using `.Axis.set_major_formatter` or provide formatted
            *labels* yourself.

        labels : list of str, optional
            Tick labels for each location in *ticks*; must have the same length as
            *ticks*. If set, the labels are used as is, via a `.FixedFormatter`.
            If not set, the labels are generated using the axis tick `.Formatter`.

        minor : bool, default: False
            If ``False``, set only the major ticks; if ``True``, only the minor ticks.

        **kwargs
            `.Text` properties for the labels. Using these is only allowed if
            you pass *labels*. In other cases, please use `~.Axes.tick_params`.

        Notes
        -----
        The mandatory expansion of the view limits is an intentional design
        choice to prevent the surprise of a non-visible tick. If you need
        other limits, you should set the limits explicitly after setting the
        ticks.
        Nz"Incorrect use of keyword argument zr. Keyword arguments other than 'minor' modify the text labels and can only be used if 'labels' are passed as well.r  r*   )r   r   r  r  r  )rj   r  r  r*   rl   	first_keyresultr   r   r   	set_ticks|  s   (
zAxis.set_ticksc                 C   s   |   }|| jddjvrg g fS | jddj| }g }g }|| jD ]}|j| }| }|||\}	}
||	 ||
 q$||fS )z
        Get the bounding boxes for this `.axis` and its siblings
        as set by `.Figure.align_xlabels` or  `.Figure.align_ylabels`.

        By default, it just gets bboxes for *self*.
        Fr+   )	rO  rI   _align_label_groupsrP  rJ   rR  r  r  extend)rj   r   r   grouperr  bboxes2r   rV  r  tlbr  r   r   r   _get_tick_boxes_siblings  s   

zAxis._get_tick_boxes_siblingsc                 C   r   )zz
        Update the label position based on the bounding box enclosing
        all the ticklabels and axis spine.
        r   r   )rj   r   r   r   r   r
       zAxis._update_label_positionc                 C   r   )zx
        Update the offset text position based on the sequence of bounding
        boxes of all the ticklabels.
        r   r   )rj   r  r  r   r   r   r    r  z!Axis._update_offset_text_positionc                 C   s@   t |trddl}|j|}| tddddddd| dS )z
        Set up axis ticks and labels to treat data along this Axis as dates.

        Parameters
        ----------
        tz : str or `datetime.tzinfo`, default: :rc:`timezone`
            The timezone used to create date labels.
        r   Ni  r@   )ru   rv   dateutil.tztzgettzrd  datetime)rj   r  dateutilr   r   r   	axis_date  s   
"zAxis.axis_datec                 C      t  )z>Return the estimated number of ticks that can fit on the axis.r   r~   r   r   r   get_tick_space  s   zAxis.get_tick_spacec                 C   sf   | j d }| jd }tdd ||fD rdS tdd ||fD r$dS tdd ||fD r1dS d	S )
a[  
        Helper for `XAxis.get_ticks_position` and `YAxis.get_ticks_position`.

        Check the visibility of tick1line, label1, tick2line, and label2 on
        the first major and the first minor ticks, and return

        - 1 if only tick1line and label1 are visible (which corresponds to
          "bottom" for the x-axis and "left" for the y-axis);
        - 2 if only tick2line and label2 are visible (which corresponds to
          "top" for the x-axis and "right" for the y-axis);
        - "default" if only tick1line, tick2line and label1 are visible;
        - "unknown" otherwise.
        r   c                 s   <    | ]}|j  o|j  o|j o|j  V  qd S r|   rZ   r   r[   re   rf   r  r   r   r   r         



z+Axis._get_ticks_position.<locals>.<genexpr>r@   c                 s   r  r|   )r[   r   rZ   rf   re   r  r   r   r   r    	  r  r  c                 s   s:    | ]}|j  o|j o|j o|j  V  qd S r|   r  r  r   r   r   r   	  s    


rs   unknown)r  r  all)rj   r   r*   r   r   r   _get_ticks_position  s   

zAxis._get_ticks_positionc                 C   r   )z;
        Return the label position (top or bottom)
        )label_positionr~   r   r   r   get_label_position	  s   zAxis.get_label_positionc                 C   r  )
        Set the label position (top or bottom)

        Parameters
        ----------
        position : {'top', 'bottom'}
        r   rj   positionr   r   r   set_label_position	  ru  zAxis.set_label_positionc                 C   r  r|   r   r~   r   r   r   rr  	  r   zAxis.get_minposr|   )r   FF)FN)Nr   )xrM   r   r   r   OFFSETTEXTPADrH  r   deprecate_privatize_attributerb  r'  rE   r   rC  r  rI  rK  rM  rQ  rU  rO  r  r  r  rW  rY  r=  r\  r_  r`  re  rp  rq  rv  rx  r   r|  r~  r*  r  r  r  r  r  classmethodr  r   r   r  r  r  r  r  r  r  rh   r  r  r  r}   r   r   r   r  r  r   r!  r#  r+  r-  r.  r3  r5  r8  r  r  rE  rG  r  rK  rO  rQ  rh  rR  rS  rT  ry  rz  r   rd  ra  ro  r  r]  rw  r^  r`  ry  rm  rj  rl  r|  rg  r  r  r)  staticmethodr  r  r  r  r  r
  r  r  r  r  r  r  rr  r   r   r   rq   r   r   -  s   )9










+"

-6E

L
4	3

	
	
	


*"


3
%
r   c                    sF    fddd
 fdd	d|  d_ d|  d_ fS )zo
    Helper to generate ``get_{data,view}_interval`` and
    ``set_{data,view}_interval`` implementations.
    c                    s   t t | j S r|   )getattrrJ   r~   )	attr_namelim_namer   r   getter)	  r  z%_make_getset_interval.<locals>.getterFc                    s~   |rt t| j ||f n+| \}}||k r*| t|||t|||dd n| t|||t|||dd d| _d S )NTr  )r   r  rJ   r  r  r   )rj   rs  rt  r  oldminoldmaxr  r  r  r  r   r   r  -	  s   
z%_make_getset_interval.<locals>.setterget_	_intervalset_Nr  )rM   )method_namer  r  r   r  r   _make_getset_interval#	  s
   r  c                       s   e Zd ZdZ dZeZ f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eddd\ZZeddd\ZZdd Zdd Zd d! Z  ZS )"XAxisxaxisr   c                       t  j|i | |   d S r|   rD   rE   r  rj   r   rl   rq   r   r   rE   F	     zXAxis.__init__c              
   C   s   | j jddddt| jjt d d| _tj	d dkr#tj	d	 }ntj	d }| j
jd
dddt| jjt tj	d |d d| _dS )|
        Initialize the label and offsetText instance values and
        `label_position` / `offset_text_position`.
        r   r   r  centerr   r  zxtick.labelcolorr.   zxtick.colorr@   r  zxtick.labelsizer   r   r   r   r   rA   r   N)r8  r   r  blended_transform_factoryrJ   r&  IdentityTransformr  rF   rG   r9  offset_text_positionrj   
tick_colorr   r   r   r  J	  s*   

zXAxis._initc                 C   s   |  |r	di fS |j|j}}z| jj }|||f\}}W n ty.   di f Y S w | jjddg\\}}\}	}
d|  koGdkn  og|| j |  k oV|k n  pg|
|  k oe|
| j k n  }|i fS )z4Test whether the mouse event occurred in the x-axis.Fr#  r@   r@   r   r@   	_different_canvasr   r   rJ   r&  r  r   r  r"  rj   r   r   r   r   xaxesyaxeslrw  rr  inaxisr   r   r   r   h	     
zXAxis.containsc                 C   s,   | j tjddd|d || _d| _dS )r  baseliner  )r  r  r  TN)r8  set_verticalalignmentr   check_getitemr  r   r  r   r   r   r  x	  s   

zXAxis.set_label_positionc                 C   s   | j sdS | j|d\}}| j \}}| jdkrCtjg || jj	
d| j }| j||j| j| jddj d  f dS tjg || jj	
d| j }| j||j| j| jddj d  f dS )y
        Update the label position based on the bounding box enclosing
        all the ticklabels and axis spine
        Nr  r  Tr+   H   r  )r7  r  r8  get_positionr  r  r  r  rJ   spinesr  r   r[  r  r:  rI   dpir  rj   r   r  r  r   r   bboxr   r   r   r
  	  *   
  zXAxis._update_label_positionc                 C   s   | j  \}}t| dsd| _| jdkr6t|s| jjj}n	tj	
|}|j}|| j| jddj d  }n!t|s@| jjj}n	tj	
|}|j}|| j| jddj d  }| j ||f dS )w
        Update the offset_text position based on the sequence of bounding
        boxes of all the ticklabels
        _tick_positionr  Tr+   r  N)r9  r  r  r  r  rJ   r  yminr  r  r  r  r  rI   r  ymaxr  r[  )rj   r  r  r   r   r  r  r  r   r   r   r  	  s   

z"XAxis._update_offset_text_positionc                 C   s   |dkr| j dddddd d| _| jd nS|dkr0| j dddddd d| _| jd n;|dkr=| j dddd n.|dkrJ| j dddd n!|d	krb| j dddddd d| _| jd n	tjg d
|d d| _dS )a  
        Set the ticks position.

        Parameters
        ----------
        position : {'top', 'bottom', 'both', 'default', 'none'}
            'both' sets the ticks to appear on both positions, but does not
            change the tick labels.  'default' resets the tick positions to
            the default: ticks on both positions, labels at bottom.  'none'
            can be used if you don't want any ticks. 'none' and 'both'
            affect only the ticks, not the labels.
        r  r'   TF)rm   r  r  r  r  r  )rm   r  r  r6   rs   )r  r  r'   rs   r6   r  N)r  r  r9  r  r   ry   r   r  r   r   r   set_ticks_position	  s<   




zXAxis.set_ticks_positionc                 C   >   d}d| j v r| j d p| j d }| d | jd|d dS )zP
        Move ticks and ticklabels (if present) to the top of the Axes.
        Tr   r   r  r'   )rm   r  Nr<  r  r  rj   r8  r   r   r   tick_top	     


zXAxis.tick_topc                 C   r  )zS
        Move ticks and ticklabels (if present) to the bottom of the Axes.
        Tr   r   r  r'   )rm   r  Nr  r  r   r   r   tick_bottom	  r  zXAxis.tick_bottomc                 C      ddddd|    S )zW
        Return the ticks position ("top", "bottom", "default", or "unknown").
        r  r  rs   r  r@   r  rs   r  r  r~   r   r   r   get_ticks_position	  
   zXAxis.get_ticks_positionviewr   r   r   dataLimc                 C   r   r|   )rJ   r  minposxr~   r   r   r   rr  
  r  zXAxis.get_minposc                 C   d   | j j s-| j j s-| jd ur-| j| j| }|jd ur-| |j\}}||f| j j_	d| _
d S r   )rJ   r  mutatedxr   r>  re  r+  default_limitsr  r   r   )rj   rn  xminxmaxr   r   r   r  
     



zXAxis.set_default_intervalsc                 C   X   t j | jj| jddj }|jd }| 	dd }|dkr*t
t|| S dS )NFr+   r  r   r!  r   )r  r  unittransformedrJ   r&  rI   dpi_scale_transr   rK  intrb   floorrj   endsr  r   r   r   r   r  
  s   

zXAxis.get_tick_space)rM   r   r   r  r   rH  rE   r  r   r  r
  r  r  r  r   r  r  r   r  r  r  rr  r  r  r   r   r   rq   r   r  A	  s.    'r  c                       s   e Zd ZdZ dZeZ f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eddd\ZZeddd\ZZdd Zd d! Zd"d# Z  ZS )$YAxisyaxisr   c                    r  r|   r  r  rq   r   r   rE   &
  r  zYAxis.__init__c                 C   s   | j jddddddtt | jjd d| _tj	d	 d
kr%tj	d }ntj	d	 }| j
jddddt| jjt tj	d |d d| _dS )r  r   r   r  r  verticalanchor)r   r   r   r   rC   rotation_moder   r  zytick.labelcolorr.   zytick.colorr  zytick.labelsizer  N)r8  r   r  r  r  rJ   r&  r  rF   rG   r9  r  r  r   r   r   r  *
  s,   

zYAxis._initc                 C   s   |  |r	di fS |j|j}}z| jj }|||f\}}W n ty.   di f Y S w | jjddg\\}}\}	}
d|  koGdkn  og|| j |  k oV|k n  pg|	|  k oe|	| j k n  }|i fS )NFr#  r  r   r@   r  r  r   r   r   r   J
  r  zYAxis.containsc                 C   s8   | j d | j tjddd|d || _d| _dS )z
        Set the label position (left or right)

        Parameters
        ----------
        position : {'left', 'right'}
        r  r  r  r  r  r  TN)r8  set_rotation_moder  r   r  r  r   r  r   r   r   r  Z
  s   

zYAxis.set_label_positionc                 C   s   | j sdS | j|d\}}| j \}}| jdkrCtjg || jj	
d| j }| j|j| j| jddj d  |f dS tjg || jj	
d| j }| j|j| j| jddj d  |f dS )r  Nr  r  Tr+   r  r  )r7  r  r8  r  r  r  r  r  rJ   r  r  r   r[  r  r:  rI   r  r  r  r   r   r   r
  i
  r  zYAxis._update_label_positionc                 C   sf   | j  \}}d| jjv r| jjd  }n| jj}|j}| j ||| j| j	ddj
 d  f dS )r  outlineTr+   r  N)r9  r  rJ   r  r   r  r  r[  r  rI   r  )rj   r  r  r   r   r  r  r   r   r   r  
  s   z"YAxis._update_offset_text_positionc                 C   sH   | j  \}}tjddd|d}| j | | j ||f d| _dS )zT
        Parameters
        ----------
        position : {'left', 'right'}
        r   r@   r  r  TN)r9  r  r   r  set_har[  r   )rj   r  r   r   r   r   r   set_offset_position
  s
   
zYAxis.set_offset_positionc                 C   s   |dkr| j dddddd | | nF|dkr(| j dddddd | | n2|dkr5| j dddd n%|dkrB| j dddd n|d	krQ| j dddddd n	tjg d
|d d| _dS )a  
        Set the ticks position.

        Parameters
        ----------
        position : {'left', 'right', 'both', 'default', 'none'}
            'both' sets the ticks to appear on both positions, but does not
            change the tick labels.  'default' resets the tick positions to
            the default: ticks on both positions, labels at left.  'none'
            can be used if you don't want any ticks. 'none' and 'both'
            affect only the ticks, not the labels.
        r  r'   TF)rm   r  r  r  r  r  )rm   r  r  r6   rs   )r  r  r'   rs   r6   r  N)r  r!  r   ry   r   r  r   r   r   r  
  s4   




zYAxis.set_ticks_positionc                 C   r  )zR
        Move ticks and ticklabels (if present) to the right of the Axes.
        Tr   r   r  r'   )rm   r  Nr  r  r   r   r   
tick_right
     


zYAxis.tick_rightc                 C   r  )zQ
        Move ticks and ticklabels (if present) to the left of the Axes.
        Tr   r   r  r'   )rm   r  Nr  r  r   r   r   	tick_left
  r#  zYAxis.tick_leftc                 C   r  )zW
        Return the ticks position ("left", "right", "default", or "unknown").
        r  r  rs   r  r  r  r~   r   r   r   r  
  r  zYAxis.get_ticks_positionr  r   r  r   r  c                 C   r   r|   )rJ   r  minposyr~   r   r   r   rr  
  r  zYAxis.get_minposc                 C   r	  r   )rJ   r  mutatedyr   r>  re  r+  r  r  r  r   )rj   rn  r  r  r   r   r   r  
  r  zYAxis.set_default_intervalsc                 C   r  )NFr+   r  r   r  r   r  )r  r  r  r  rJ   r&  rI   r  r  rK  r  rb   r  r  r   r   r   r  
  s   

zYAxis.get_tick_space)rM   r   r   r  r   rH  rE   r  r   r  r
  r  r!  r  r"  r$  r  r  r   r  r  r  rr  r  r  r   r   r   rq   r   r  !
  s0     #r  )<r   r  r  loggingnumbersr   r  numpyrb   
matplotlibrF   r   r   matplotlib.artistrp   r   matplotlib.colorsr  rW   matplotlib.linesr2  rS   matplotlib.scalerf  ra  matplotlib.texttextr`   matplotlib.tickertickerr  matplotlib.transforms
transformsr  matplotlib.unitsr+  r[  	getLoggerrM   _logr]   ArtistInspectorrT   _line_inspectorget_setters_line_param_namesaliasdr  _line_param_aliasesr   Artistr   r   r   r  r  r   r  r  r  r   r   r   r   <module>   sf    
  E==)"               a