Ë
    ¨ehët  ã                   óš  — d Z ddlmZ ddlZddlmZ ddlmZ ddl	m
Z
 ddlmZ d„ Z G d„ d	«      Z G d
„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d „ d!e«      Z G d"„ d#e«      Z G d$„ 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 :ref:`legend guide
    <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 an
`.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 need to
be scaled according to the *fontsize* (note that the size is in pixels,
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)
é    )ÚcycleN)Úcbook)ÚLine2D)Ú	Rectanglec                 ór   — t        t        |j                  «       «      d «      }|�| j                  |«       y y ©N)ÚnextÚiterÚget_childrenÚupdate_from)ÚtgtÚsrcÚfirst_childs      úW/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/matplotlib/legend_handler.pyÚupdate_from_first_childr   (   s3   € Ü”t˜C×,Ñ,Ó.Ó/°Ó6€KØÐØ�‰˜Õ$ð ó    c                   ó<   — e Zd ZdZd
d„Zd„ Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
y)ÚHandlerBasea  
    A base class for default legend handlers.

    The derived classes are meant to override *create_artists* method, which
    has the 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| _         | _        || _        y)ak  
        Parameters
        ----------
        xpad : float, optional
            Padding in x-direction.
        ypad : float, optional
            Padding in y-direction.
        update_func : callable, optional
            Function for updating the legend handler properties from another
            legend handler, used by `~HandlerBase.update_prop`.
        N)Ú_xpadÚ_ypadÚ_update_prop_func)ÚselfÚxpadÚypadÚupdate_funcs       r   Ú__init__zHandlerBase.__init__>   s   € ð "& tÐˆŒ
�D”JØ!,ˆÕr   c                 óf   — | j                   €| j                  ||«       y | j                  ||«       y r   )r   Ú_default_update_prop©r   Úlegend_handleÚorig_handles      r   Ú_update_propzHandlerBase._update_propM   s.   € Ø×!Ñ!Ð)Ø×%Ñ% m°[ÕAà×"Ñ" =°+Õ>r   c                 ó&   — |j                  |«       y r   )r   r    s      r   r   z HandlerBase._default_update_propS   s   € Ø×!Ñ! +Õ.r   c                 óŽ   — | j                  ||«       |j                  |«       |j                  d «       |j                  d «       y r   )r#   Ú_set_artist_propsÚset_clip_boxÚset_clip_path©r   r!   r"   Úlegends       r   Úupdate_propzHandlerBase.update_propV   s<   € à×Ñ˜-¨Ô5à× Ñ  Ô/Ø×"Ñ" 4Ô(Ø×#Ñ# DÕ)r   c                 óž   — || j                   |z  z
  }|| j                  |z  z
  }|| j                   |z  z
  }|| j                  |z  z
  }||||fS r   )r   r   )r   r*   r"   ÚxdescentÚydescentÚwidthÚheightÚfontsizes           r   Úadjust_drawing_areazHandlerBase.adjust_drawing_area^   s_   € ð ˜dŸj™j¨8Ñ3Ñ3ˆØ˜dŸj™j¨8Ñ3Ñ3ˆØ˜Ÿ
™
 XÑ-Ñ-ˆØ˜$Ÿ*™* xÑ/Ñ/ˆØ˜ 5¨&Ð0Ð0r   c                 ó  — | j                  |||j                  |j                  |j                  |j                  |«      \  }}}}| j                  ||||||||j                  «       «      }	|	D ]  }
|j                  |
«       Œ |	d   S )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   )r2   r-   r.   r/   r0   Úcreate_artistsÚget_transformÚ
add_artist)r   r*   r"   r1   Ú	handleboxr-   r.   r/   r0   ÚartistsÚas              r   Úlegend_artistzHandlerBase.legend_artistg   sž   € ð* -1×,DÑ,DØ˜Ø×#Ñ# Y×%7Ñ%7Ø—‘ )×"2Ñ"2Øó	-Ñ)ˆ�(˜E 6ð
 ×%Ñ% f¨kØ&.°¸%ÀØ&.°	×0GÑ0GÓ0IóKˆð
 ò 	$ˆAØ× Ñ  Õ#ð	$ð �q‰zÐr   c	                 ó   — t        d«      ‚)a’  
        Return the legend artists generated.

        Parameters
        ----------
        legend : `~matplotlib.legend.Legend`
            The legend for which these legend artists are being created.
        orig_handle : `~matplotlib.artist.Artist` or similar
            The object for which these legend artists are being created.
        xdescent, ydescent, width, height : int
            The rectangle (*xdescent*, *ydescent*, *width*, *height*) that the
            legend artists being created should fit within.
        fontsize : int
            The fontsize in pixels. The legend artists being created should
            be scaled according to the given fontsize.
        trans : `~matplotlib.transforms.Transform`
            The transform that is applied to the legend artists being created.
            Typically from unit coordinates in the handler box to screen
            coordinates.
        zDerived must override)ÚNotImplementedError)	r   r*   r"   r-   r.   r/   r0   r1   Útranss	            r   r4   zHandlerBase.create_artistsŒ   s   € ô. "Ð"9Ó:Ð:r   )ç        r>   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r#   r   r+   r2   r:   r4   © r   r   r   r   .   s+   „ ñó-ò?ò/ò*ò1ò#óJ;r   r   c                   ó0   ‡ — e Zd ZdZdˆ fd„	Zd„ Zd„ Zˆ xZS )ÚHandlerNpointszM
    A legend handler that shows *numpoints* points in the legend entry.
    c                 ó@   •— t        ‰| �  di |¤Ž || _        || _        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`.
        NrC   )Úsuperr   Ú
_numpointsÚ_marker_pad)r   Ú
marker_padÚ	numpointsÚkwargsÚ	__class__s       €r   r   zHandlerNpoints.__init__«   s$   ø€ ô 	‰ÑÑ"˜6Ò"à#ˆŒØ%ˆÕr   c                 óJ   — | j                   €|j                  S | j                   S r   )rH   rK   ©r   r*   s     r   Úget_numpointszHandlerNpoints.get_numpoints»   s"   € Ø�?‰?Ð"Ø×#Ñ#Ð#à—?‘?Ð"r   c                 óÊ   — | j                  |«      }|dkD  r7| j                  |z  }t        j                  | |z   | |z   |z
  |«      }	|	}
|	|
fS | | |z   g}	| d|z  z   g}
|	|
fS )Né   ç      à?)rP   rI   ÚnpÚlinspace)r   r*   r-   r.   r/   r0   r1   rK   ÚpadÚxdataÚxdata_markers              r   Ú	get_xdatazHandlerNpoints.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)r?   r@   rA   rB   r   rP   rY   Ú__classcell__©rM   s   @r   rE   rE   ¦   s   ø„ ñõ&ò #ö#r   rE   c                   ó*   ‡ — e Zd ZdZdˆ fd„	Zd„ Zˆ xZS )ÚHandlerNpointsYoffsetsz‚
    A legend handler that shows *numpoints* in the legend, and allows them to
    be individually offset in the y-direction.
    c                 ó6   •— t        ‰| �  dd|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`.
        rK   NrC   )rG   r   Ú	_yoffsets)r   rK   ÚyoffsetsrL   rM   s       €r   r   zHandlerNpointsYoffsets.__init__Ö   s!   ø€ ô 	‰ÑÑ7 9Ð7°Ò7Ø!ˆ�r   c                 ó„   — | j                   €||j                  z  }|S |t        j                  | j                   «      z  }|S r   ©r`   Ú_scatteryoffsetsrT   Úasarray©r   r*   r-   r.   r/   r0   r1   Úydatas           r   Ú	get_ydataz HandlerNpointsYoffsets.get_ydataå   sA   € Ø�>‰>Ð!Ø˜V×4Ñ4Ñ4ˆEð ˆð œRŸZ™Z¨¯©Ó7Ñ7ˆEàˆr   ©NN)r?   r@   rA   rB   r   rh   r[   r\   s   @r   r^   r^   Ð   s   ø„ ñõ
"ör   r^   c                   ó   — e Zd ZdZd„ Zy)Ú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                  ||||||«      \  }	}
t        j                  |	||z
  dz  «      }t        |	|«      }| j	                  |||«       |j                  d«       |j                  d«       t        |
|d t        |
«       «      }| j	                  |||«       |j                  d«       |j                  dk7  r.|j                  «       |j                  z  }|j                  |«       ||_        |j                  |«       |j                  |«       ||gS )Né   ÚdefaultÚ ÚNonerR   )rY   rT   Ú	full_liker   r+   Úset_drawstyleÚ
set_markerÚlenÚset_linestyleÚmarkerscaleÚget_markersizeÚset_markersizeÚ
_legmarkerÚset_transform)r   r*   r"   r-   r.   r/   r0   r1   r=   rW   rX   rg   ÚleglineÚlegline_markerÚnewszs                  r   r4   z$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Ô+à˜Ð(Ð(r   N©r?   r@   rA   rB   r4   rC   r   r   rk   rk   î   s   „ ñó
)r   rk   c                   ó   — e Zd ZdZd„ Zy)Ú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                  |«      dk(  r t        j                  |	d   |	d   d«      }	dg}t        j                  |	||z
  dz  «      }t        |	||¬«      }| j                  |||«       |j                  dk7  r.|j                  «       |j                  z  }|j                  |«       |j                  |«       |gS )NrR   r   éÿÿÿÿé   rm   )Ú	markevery)rY   rP   rT   rU   rq   r   r+   rv   rw   rx   rz   )r   r*   r"   r-   r.   r/   r0   r1   r=   rW   rX   r„   rg   r{   r}   s                  r   r4   zHandlerLine2D.create_artists  sç   € ð #Ÿ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Ô$àˆyÐr   Nr~   rC   r   r   r€   r€     s   „ ñór   r€   c                   ó0   ‡ — e Zd ZdZdˆ fd„	Zd„ Zd„ Zˆ xZS )ÚHandlerPatchz)
    Handler for `.Patch` instances.
    c                 ó2   •— t        ‰| �  di |¤Ž || _        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`.
        NrC   )rG   r   Ú_patch_func)r   Ú
patch_funcrL   rM   s      €r   r   zHandlerPatch.__init__?  s   ø€ ô$ 	‰ÑÑ"˜6Ò"Ø%ˆÕr   c           	      óv   — | j                   €t        | | f||¬«      }|S | j                  |||||||¬«      }|S )N©Úxyr/   r0   )r*   r"   r-   r.   r/   r0   r1   )rˆ   r   )	r   r*   r"   r-   r.   r/   r0   r1   Úps	            r   Ú_create_patchzHandlerPatch._create_patchT  s^   € à×ÑÐ#Ü˜x˜i¨(¨Ð3Ø %¨fô6ˆAð ˆð × Ñ ¨¸KØ*2¸XØ',°VÀhð !ó PˆAð ˆr   c	           	      ó~   — | j                  |||||||«      }	| j                  |	||«       |	j                  |«       |	gS r   )rŽ   r+   rz   ©
r   r*   r"   r-   r.   r/   r0   r1   r=   r�   s
             r   r4   zHandlerPatch.create_artists_  sI   € ð ×Ñ˜v {Ø'¨°5¸&À(óLˆà×Ñ˜˜K¨Ô0Ø	�‰˜ÔØˆsˆ
r   r   )r?   r@   rA   rB   r   rŽ   r4   r[   r\   s   @r   r†   r†   :  s   ø„ ñõ&ò*	ör   r†   c                   ó6   — e Zd ZdZed„ «       Zed„ «       Zd„ Zy)ÚHandlerStepPatchzA
    Handler for `~.matplotlib.patches.StepPatch` instances.
    c                 óD   — t        | | f||| j                  «       ¬«      S )N)rŒ   r/   r0   Úcolor)r   Úget_facecolor)r"   r-   r.   r/   r0   s        r   rŽ   zHandlerStepPatch._create_patchn  s,   € ä˜h˜Y¨¨	Ð2¸%Ø &¨k×.GÑ.GÓ.IôKð 	Kr   c                 óÒ   — t        d|g|dz  |dz  g| j                  «       | j                  «       | j                  «       ¬«      }|j	                  d«       |j                  d«       |S )Nr   rm   )r”   Ú	linestyleÚ	linewidthrn   ro   )r   Úget_edgecolorÚget_linestyleÚget_linewidthrr   rs   )r"   r/   r0   r{   s       r   Ú_create_linezHandlerStepPatch._create_lines  sj   € ô ˜!˜U˜ f¨Q¡h°°q±Ð%9Ø*×8Ñ8Ó:Ø#.×#<Ñ#<Ó#>Ø#.×#<Ñ#<Ó#>ôˆð 	×Ñ˜iÔ(Ø×Ñ˜2ÔØˆr   c	                 óâ   — |j                  «       s|j                  «       �)| j                  |||||«      }	| j                  |	||«       n| j	                  |||«      }	|	j                  |«       |	gS r   )Úget_fillÚ	get_hatchrŽ   r+   rœ   rz   r�   s
             r   r4   zHandlerStepPatch.create_artists�  sr   € ð ×ÑÔ! k×&;Ñ&;Ó&=Ð&IØ×"Ñ" ;°¸(ÀEØ#)ó+ˆAà×Ñ˜Q ¨VÕ4à×!Ñ! +¨u°fÓ=ˆAØ	�‰˜ÔØˆsˆ
r   N)r?   r@   rA   rB   ÚstaticmethodrŽ   rœ   r4   rC   r   r   r’   r’   i  s6   „ ñð ñKó ðKð ñó ðó
r   r’   c                   ó"   — e Zd ZdZd„ Zd„ Zd„ Zy)ÚHandlerLineCollectionz2
    Handler for `.LineCollection` instances.
    c                 óJ   — | j                   €|j                  S | j                   S r   ©rH   ÚscatterpointsrO   s     r   rP   z#HandlerLineCollection.get_numpoints’  ó"   € Ø�?‰?Ð"Ø×'Ñ'Ð'à—?‘?Ð"r   c                 óÔ   — |j                  «       d   }|j                  d   }|j                  «       d   }|j                  |«       |j	                  |«       |j                  |«       y ©Nr   )Úget_linewidthsÚ_us_linestylesÚ
get_colorsÚ	set_colorru   Úset_linewidth)r   r!   r"   ÚlwÚdashesr”   s         r   r   z*HandlerLineCollection._default_update_prop˜  sb   € Ø×'Ñ'Ó)¨!Ñ,ˆØ×+Ñ+¨AÑ.ˆØ×&Ñ&Ó(¨Ñ+ˆØ×Ñ Ô&Ø×#Ñ# FÔ+Ø×#Ñ# BÕ'r   c	                 óÒ   — | j                  ||||||«      \  }	}
t        j                  |	||z
  dz  «      }t        |	|«      }| j	                  |||«       |j                  |«       |gS )Nrm   )rY   rT   rq   r   r+   rz   )r   r*   r"   r-   r.   r/   r0   r1   r=   rW   rX   rg   r{   s                r   r4   z$HandlerLineCollection.create_artists   ss   € ð #Ÿn™n¨V°X¸xØ-2°F¸HóFÑˆˆ|ä—‘˜U V¨hÑ%6¸!Ñ$;Ó<ˆÜ˜ Ó&ˆà×Ñ˜ +¨vÔ6Ø×Ñ˜eÔ$àˆyÐr   N)r?   r@   rA   rB   rP   r   r4   rC   r   r   r¢   r¢   Ž  s   „ ñò#ò(ór   r¢   c                   óB   ‡ — e Zd ZdZdˆ fd„	Zd„ Zd„ Zd„ Zd„ Zd„ Z	ˆ xZ
S )	ÚHandlerRegularPolyCollectionz'Handler for `.RegularPolyCollection`\s.c                 ó6   •— t        ‰| �  dd|i|¤Ž || _        y )Nra   rC   )rG   r   Ú_sizes)r   ra   ÚsizesrL   rM   s       €r   r   z%HandlerRegularPolyCollection.__init__±  s   ø€ Ü‰ÑÑ5 (Ð5¨fÒ5àˆ�r   c                 óJ   — | j                   €|j                  S | j                   S r   r¤   rO   s     r   rP   z*HandlerRegularPolyCollection.get_numpoints¶  r¦   r   c                 ór  — | j                   €ž|j                  «       }t        |«      sdg}t        |«      |j                  dz  z  }	t        |«      |j                  dz  z  }
| j                  |«      }|dk  rd|	|
z   z  |	|
gd | }|S |	|
z
  }|t        j                  dd|«      z  |
z   }|S | j                   }|S )NrR   rm   é   rS   r   )	r´   Ú	get_sizesrt   Úmaxrv   ÚminrP   rT   rU   )r   r*   r"   r-   r.   r/   r0   r1   Úhandle_sizesÚsize_maxÚsize_minrK   rµ   Úrngs                 r   r¹   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àˆr   c                 ó®   — | j                  ||«       |j                  |j                  d¬«      «       |j                  d «       |j	                  d «       y )NF)Úroot)r#   Ú
set_figureÚ
get_figurer'   r(   r)   s       r   r+   z(HandlerRegularPolyCollection.update_propÑ  sJ   € à×Ñ˜-¨Ô5à× Ñ  ×!2Ñ!2¸Ð!2Ó!>Ô?à×"Ñ" 4Ô(Ø×#Ñ# DÕ)r   c                 óf   —  t        |«      |j                  «       |j                  «       |||¬«      S )N)Úrotationrµ   ÚoffsetsÚoffset_transform)ÚtypeÚget_numsidesÚget_rotation©r   r"   rµ   rÆ   rÇ   s        r   Úcreate_collectionz.HandlerRegularPolyCollection.create_collectionÚ  s6   € Ø Œt�KÓ Ø×$Ñ$Ó&Ø ×-Ñ-Ó/°uØÐ.>ô
ð 	
r   c	           
      ó,  — | j                  ||||||«      \  }	}
| j                  ||||||«      }| j                  |||||||«      }| j                  ||t	        t        |
|«      «      |¬«      }| j                  |||«       |j                  |«       |gS ©N)rÆ   rÇ   )rY   rh   r¹   rÌ   ÚlistÚzipr+   Úset_offset_transform)r   r*   r"   r-   r.   r/   r0   r1   r=   rW   rX   rg   rµ   r�   s                 r   r4   z+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ˆ
r   ri   )r?   r@   rA   rB   r   rP   r¹   r+   rÌ   r4   r[   r\   s   @r   r²   r²   ®  s$   ø„ Ù2õò
#òò**ò
ör   r²   c                   ó   — e Zd ZdZd„ Zy)ÚHandlerPathCollectionzDHandler for `.PathCollection`\s, which are used by `~.Axes.scatter`.c                 óP   —  t        |«      |j                  «       d   g|||¬«      S )Nr   )rµ   rÆ   rÇ   )rÈ   Ú	get_pathsrË   s        r   rÌ   z'HandlerPathCollection.create_collectionú  s2   € Ø Œt�KÓ Ø×"Ñ"Ó$ QÑ'Ð(°ØÐ.>ô
ð 	
r   N©r?   r@   rA   rB   rÌ   rC   r   r   rÓ   rÓ   ÷  s
   „ ÙOó
r   rÓ   c                   ó   — e Zd ZdZd„ Zy)ÚHandlerCircleCollectionz"Handler for `.CircleCollection`\s.c                 ó*   —  t        |«      |||¬«      S rÎ   )rÈ   rË   s        r   rÌ   z)HandlerCircleCollection.create_collection  s    € Ø Œt�KÓ Ø˜7Ð5EôGð 	Gr   NrÖ   rC   r   r   rØ   rØ     s   „ Ù-óGr   rØ   c                   ó4   ‡ — e Zd ZdZ	 	 dˆ fd„	Zd„ Zd„ Zˆ xZS )ÚHandlerErrorbarzHandler for Errorbars.c                 óF   •— || _         || _        t        ‰| �  d||dœ|¤Ž y )N)rJ   rK   rC   )Ú
_xerr_sizeÚ
_yerr_sizerG   r   )r   Ú	xerr_sizeÚ	yerr_sizerJ   rK   rL   rM   s         €r   r   zHandlerErrorbar.__init__  s*   ø€ ð $ˆŒØ#ˆŒä‰ÑÐN J¸)ÑNÀvÓNr   c                 ój   — | j                   |z  }| j                  €|}||fS | j                  |z  }||fS r   )rÝ   rÞ   )	r   r*   r-   r.   r/   r0   r1   rß   rà   s	            r   Úget_err_sizezHandlerErrorbar.get_err_size  sG   € à—O‘O hÑ.ˆ	à�?‰?Ð"Ø!ˆIð ˜)Ð#Ð#ð Ÿ™¨(Ñ2ˆIà˜)Ð#Ð#r   c	                 ó,  — |\  }	}
}| j                  ||||||«      \  }}t        j                  |||z
  dz  «      }t        ||«      }t        j                  |«      }t        j                  |d t        |«       «      }| j                  ||||||«      \  }}t        ||«      }|	€#|j                  d«       |j                  d«       n–| j                  ||	|«       |j                  d«       |j                  d«       | j                  ||	|«       |j                  d«       |j                  dk7  r.|j                  «       |j                  z  }|j                  |«       g }g }|j                  röt!        ||«      D ��cg c]  \  }}||z
  |f||z   |ff‘Œ }}}t#        j$                  |«      }| j                  ||d   |«       |j'                  |«       |
rŽt        ||z
  |«      }t        ||z   |«      }| j                  ||
d   |«       | j                  ||
d   |«       |j                  d«       |j                  d«       |j'                  |«       |j'                  |«       |j(                  röt!        ||«      D ��cg c]  \  }}|||z
  f|||z   ff‘Œ }}}t#        j$                  |«      }| j                  ||d   |«       |j'                  |«       |
rŽt        |||z
  «      }t        |||z   «      }| j                  ||
d   |«       | j                  ||
d   |«       |j                  d	«       |j                  d	«       |j'                  |«       |j'                  |«       g |¢|¢|‘|‘}|D ]  }|j+                  |«       Œ |S c c}}w c c}}w )
Nrm   Frn   Únonerp   rR   r   ú|Ú_)rY   rT   rq   r   re   rt   râ   Úset_visibler+   rr   rs   ru   rv   rw   rx   Úhas_xerrrÐ   ÚmcollÚLineCollectionÚappendÚhas_yerrrz   )r   r*   r"   r-   r.   r/   r0   r1   r=   Ú	plotlinesÚcaplinesÚbarlinecolsrW   rX   rg   r{   Úydata_markerrß   rà   r|   r}   Úhandle_barlinecolsÚhandle_caplinesÚxÚyÚvertsÚcollÚcapline_leftÚcapline_rightr8   Úartists                                  r   r4   zHandlerErrorbar.create_artists  sÍ  € ð ,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Ø× Ñ  Õ'ð	(àˆùóQBùó$Bs   Å=N
É?N)rS   NrZ   N)r?   r@   rA   rB   r   râ   r4   r[   r\   s   @r   rÛ   rÛ   	  s   ø„ Ù à04Ø+/õOò	$öRr   rÛ   c                   ó:   ‡ — e Zd ZdZ	 	 dˆ fd„	Zd„ Zd„ Zd„ Zˆ xZS )Ú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`.
        )rJ   rK   ra   NrC   )rG   r   Ú_bottom)r   rJ   rK   Úbottomra   rL   rM   s         €r   r   zHandlerStem.__init__y  s-   ø€ ô" 	‰Ñð 	6 J¸)Ø"*ñ	6Ø.4ò	6àˆ�r   c                 ó�   — | j                   €|d|j                  z  dz   z  }|S |t        j                  | j                   «      z  }|S )NrS   rc   rf   s           r   rh   zHandlerStem.get_ydataŽ  sK   € Ø�>‰>Ð!Ø˜c F×$;Ñ$;Ñ;¸cÑAÑBˆEð ˆð œRŸZ™Z¨¯©Ó7Ñ7ˆEàˆr   c	           	      ó\  — |\  }	}
}t        |
t        j                  «      }| j                  ||||||«      \  }}| j	                  ||||||«      }| j
                  €d}n| j
                  }t        ||d t        |«       «      }| j                  ||	|«       t        ||«      D ��cg c]  \  }}t        ||g||g«      ‘Œ }}}|rFt        j                  | | j                  ¬«      5  |D ]  }| j                  ||
|«       Œ 	 d d d «       n't        ||
«      D ]  \  }}| j                  |||«       Œ t        t        j                  |«      t        j                  |«      g||g«      }| j                  |||«       g |¢|‘|‘}|D ]  }|j!                  |«       Œ |S c c}}w # 1 sw Y   ŒzxY w)Nr>   )r   )Ú
isinstanceré   rê   rY   rh   rý   r   rt   r+   rÐ   r   Ú_setattr_cmÚ_copy_collection_propsrT   r»   rº   rz   )r   r*   r"   r-   r.   r/   r0   r1   r=   Ú
markerlineÚ	stemlinesÚbaselineÚusing_linecollrW   rX   rg   rþ   Úleg_markerlineró   rô   Úleg_stemlinesÚlineÚlmÚmÚleg_baseliner8   rù   s                              r   r4   zHandlerStem.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*.
        r   N)r¬   Ú	get_colorru   rš   r    s      r   r  z"HandlerStem._copy_collection_propsÆ  s<   € ð
 	×Ñ × 5Ñ 5Ó 7¸Ñ :Ô;Ø×#Ñ# K×$=Ñ$=Ó$?ÀÑ$BÕCr   )rZ   NNN)	r?   r@   rA   rB   r   rh   r4   r  r[   r\   s   @r   rû   rû   t  s&   ø„ ñð 26Ø'+õò*ò.ö`Dr   rû   c                   ó*   ‡ — e Zd ZdZdˆ fd„	Zd„ Zˆ xZS )ÚHandlerTuplez
    Handler for Tuple.
    c                 ó@   •— || _         || _        t        ‰| �  di |¤Ž y)a�  
        Parameters
        ----------
        ndivide : int or None, 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`.
        NrC   )Ú_ndivideÚ_padrG   r   )r   ÚndividerV   rL   rM   s       €r   r   zHandlerTuple.__init__Ô  s#   ø€ ð  ˆŒØˆŒ	Ü‰ÑÑ"˜6Ó"r   c	                 óÒ  — |j                  «       }	| j                  €t        |«      }
n| j                  }
| j                  €|j                  |z  }n| j                  |z  }|
dkD  r|||
dz
  z  z
  |
z  }t        |||z   t        j                  |
«      z  z
  «      }g }|D ]F  }|j                  |	|«      }|j                  ||t        |«      |||||«      }|j                  |«       ŒH |S )NrR   )Úget_legend_handler_mapr  rt   r  Ú	borderpadr   rT   ÚarangeÚget_legend_handlerr4   r	   Úextend)r   r*   r"   r-   r.   r/   r0   r1   r=   Úhandler_mapr  rV   Ú	xds_cycleÚa_listÚhandle1ÚhandlerÚ_a_lists                    r   r4   zHandlerTuple.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ð �M‰M˜'Õ"ð	#ð ˆr   )rR   N)r?   r@   rA   rB   r   r4   r[   r\   s   @r   r  r  Ï  s   ø„ ñõ#ö r   r  c                   ó   — e Zd ZdZd„ Zd„ Zy)Ú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                 ó>   — | j                   dk(  ryt        | d   «      S )Nr   )r   r   r   r   )ÚsizeÚtuple)Úcolorss    r   Úfirst_colorz7HandlerPolyCollection._update_prop.<locals>.first_color
  s    € Ø�{‰{˜aÒØ#Ü˜ ™Ó#Ð#r   c                 ó$   — t        | «      r| d   S y r¨   )rt   )Ú
prop_arrays    r   Ú	get_firstz5HandlerPolyCollection._update_prop.<locals>.get_first  s   € Ü�:ŒØ! !‘}Ð$àr   )r•   Ú
_facecolorr™   Ú
_edgecolorÚ_original_facecolorÚ_original_edgecolorrž   Ú_fillrŸ   Ú_hatchÚ_hatch_colorr­   r©   ru   Úget_linestylesrz   Úget_transformsrÂ   rÃ   )r   r!   r"   r)  r,  s        r   r#   z"HandlerPolyCollection._update_prop	  sñ   € ò	$ò
	ñ $/¨{×/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Õ:r   c	                 ót   — t        | | f||¬«      }	| j                  |	||«       |	j                  |«       |	gS )Nr‹   )r   r+   rz   r�   s
             r   r4   z$HandlerPolyCollection.create_artists&  sC   € ô ˜8˜) h YÐ/Ø!¨&ô2ˆà×Ñ˜˜K¨Ô0Ø	�‰˜ÔØˆsˆ
r   N)r?   r@   rA   rB   r#   r4   rC   r   r   r#  r#    s   „ ñò;ó:r   r#  )rB   Ú	itertoolsr   ÚnumpyrT   Ú
matplotlibr   Úmatplotlib.linesr   Úmatplotlib.patchesr   Úmatplotlib.collectionsÚcollectionsré   r   r   rE   r^   rk   r€   r†   r’   r¢   r²   rÓ   rØ   rÛ   rû   r  r#  rC   r   r   ú<module>r>     sð   ðñõ: ã å Ý #Ý (Ý &ò%÷u;ñ u;ôp'#�[ô '#ôT˜^ô ô<")˜Nô ")ôJ$�Nô $ôN,�;ô ,ô^"�{ô "ôJ˜Mô ô@FÐ#9ô FôR
Ð8ô 
ôGÐ:ô Gôh�mô hôVXDÐ(ô XDôv2�;ô 2ôj)˜Kõ )r   