ó
    {ñ:i°t  ã                   óš  • S r SSKJr  SSKrSSKJr  SSKJr  SSK	J
r
  SSKJr  S r " S S	5      r " S
 S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S  S!\5      r " S" S#\5      r " S$ S%\5      rg)&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                 ót   • [        [        UR                  5       5      S 5      nUb  U R                  U5        g g ©N)ÚnextÚiterÚget_childrenÚupdate_from)ÚtgtÚsrcÚfirst_childs      Ú\/srv/projetos/modelo_ml_acdoc/venv/lib/python3.13/site-packages/matplotlib/legend_handler.pyÚupdate_from_first_childr   (   s3   € Ü”t˜C×,Ñ,Ó.Ó/°Ó6€KØÑØ�‰˜Õ$ð ó    c                   óF   • \ rS rSrSrSS jrS rS rS rS r	S	 r
S
 rSrg)ÚHandlerBaseé.   aÙ  
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                 ó,   • XsU l         U l        X0l        g)a  
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__ÚHandlerBase.__init__>   s   € ð "&ÐˆŒ
�D”JØ!,Õr   c                 ód   • U R                   c  U R                  X5        g U R                  X5        g r   )r   Ú_default_update_prop©r   Úlegend_handleÚorig_handles      r   Ú_update_propÚHandlerBase._update_propM   s*   € Ø×!Ñ!Ñ)Ø×%Ñ% mÕAà×"Ñ" =Õ>r   c                 ó&   • UR                  U5        g r   )r   r"   s      r   r!   Ú HandlerBase._default_update_propS   s   € Ø×!Ñ! +Õ.r   c                 óŒ   • U R                  X5        UR                  U5        UR                  S 5        UR                  S 5        g r   )r%   Ú_set_artist_propsÚset_clip_boxÚset_clip_path©r   r#   r$   Úlegends       r   Úupdate_propÚHandlerBase.update_propV   s:   € à×Ñ˜-Ô5à× Ñ  Ô/Ø×"Ñ" 4Ô(Ø×#Ñ# DÕ)r   c                 ó’   • X0R                   U-  -
  nX@R                  U-  -
  nXPR                   U-  -
  nX`R                  U-  -
  nX4XV4$ r   )r   r   )r   r.   r$   ÚxdescentÚydescentÚwidthÚheightÚfontsizes           r   Úadjust_drawing_areaÚHandlerBase.adjust_drawing_area^   sS   € ð Ÿj™j¨8Ñ3Ñ3ˆØŸj™j¨8Ñ3Ñ3ˆØŸ
™
 XÑ-Ñ-ˆØŸ*™* xÑ/Ñ/ˆØ 5Ð0Ð0r   c                 ó  • U R                  XUR                  UR                  UR                  UR                  U5      u  pVpxU R                  XXVXxX4R                  5       5      n	U	 H  n
UR                  U
5        M     U	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   )r7   r2   r3   r4   r5   Úcreate_artistsÚget_transformÚ
add_artist)r   r.   r$   r6   Ú	handleboxr2   r3   r4   r5   ÚartistsÚas              r   Úlegend_artistÚHandlerBase.legend_artistg   s‹   € ð* -1×,DÑ,DØØ×#Ñ# Y×%7Ñ%7Ø—‘ )×"2Ñ"2Øó	-Ñ)ˆ˜Eð
 ×%Ñ% fØ&.¸%Ø&.×0GÑ0GÓ0IóKˆó
 ˆAØ× Ñ  Ö#ñ ð �q‰zÐr   c	                 ó   • [        S5      e)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$   r2   r3   r4   r5   r6   Útranss	            r   r:   ÚHandlerBase.create_artistsŒ   s   € ô. "Ð"9Ó:Ð:r   )r   r   r   )ç        rF   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r%   r!   r/   r7   r@   r:   Ú__static_attributes__© r   r   r   r   .   s+   † ñô-ò?ò/ò*ò1ò#õJ;r   r   c                   ó<   ^ • \ rS rSrSrSU 4S jjrS rS rSrU =r	$ )ÚHandlerNpointsé¦   zE
A legend handler that shows *numpoints* points in the legend entry.
c                 ó>   >• [         TU ]  " S0 UD6  X l        Xl        g)zÐ
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`.
NrM   )Úsuperr   Ú
_numpointsÚ_marker_pad)r   Ú
marker_padÚ	numpointsÚkwargsÚ	__class__s       €r   r   ÚHandlerNpoints.__init__«   s    ø€ ô 	‰ÒÑ"˜6Ò"à#ŒØ%Õr   c                 óL   • U R                   c  UR                  $ U R                   $ r   )rS   rV   ©r   r.   s     r   Úget_numpointsÚHandlerNpoints.get_numpoints»   s"   € Ø�?‰?Ñ"Ø×#Ñ#Ð#à—?‘?Ð"r   c                 óÊ   • U R                  U5      nUS:”  a7  U R                  U-  n[        R                  " U* U-   U* U-   U-
  U5      n	U	n
Xš4$ U* U* U-   /n	U* SU-  -   /n
Xš4$ )Né   ç      à?)r\   rT   ÚnpÚlinspace)r   r.   r2   r3   r4   r5   r6   rV   ÚpadÚxdataÚxdata_markers              r   Ú	get_xdataÚHandlerNpoints.get_xdataÁ   s”   € Ø×&Ñ& vÓ.ˆ	Ø�q‹=à×"Ñ" XÑ-ˆCÜ—K’K  	¨C¡Ø!) 	¨EÑ 1°CÑ 7Ø )ó+ˆEð !ˆLð Ð"Ð"ð �Y  	¨EÑ 1Ð2ˆEØ%˜I¨¨e©Ñ3Ð4ˆLØÐ"Ð"r   )rT   rS   )ç333333Ó?N)
rG   rH   rI   rJ   rK   r   r\   rf   rL   Ú__classcell__©rX   s   @r   rO   rO   ¦   s   ø† ñ÷&ò #÷#ð #r   rO   c                   ó6   ^ • \ rS rSrSrSU 4S jjrS rSrU =r$ )ÚHandlerNpointsYoffsetséÐ   zv
A legend handler that shows *numpoints* in the legend, and allows them to
be individually offset in the y-direction.
c                 ó6   >• [         TU ]  " SSU0UD6  X l        g)zü
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`.
rV   NrM   )rR   r   Ú	_yoffsets)r   rV   ÚyoffsetsrW   rX   s       €r   r   ÚHandlerNpointsYoffsets.__init__Ö   s   ø€ ô 	‰ÒÑ7 9Ð7°Ò7Ø!�r   c                 ó†   • U R                   c  XQR                  -  nU$ U[        R                  " U R                   5      -  nU$ r   ©ro   Ú_scatteryoffsetsra   Úasarray©r   r.   r2   r3   r4   r5   r6   Úydatas           r   Ú	get_ydataÚ HandlerNpointsYoffsets.get_ydataå   s?   € Ø�>‰>Ñ!Ø×4Ñ4Ñ4ˆEð ˆð œRŸZšZ¨¯©Ó7Ñ7ˆEàˆr   )ro   ©NN)	rG   rH   rI   rJ   rK   r   rx   rL   ri   rj   s   @r   rl   rl   Ð   s   ø† ñ÷
"÷ð r   rl   c                   ó   • \ rS rSrSrS rSrg)ÚHandlerLine2DCompoundéî   z�
Original handler for `.Line2D` instances, that relies on combining
a line-only with a marker-only artist.  May be deprecated in the future.
c	                 ó*  • U R                  XUXVU5      u  pš[        R                  " X–U-
  S-  5      n[        X›5      nU R	                  XÂU5        UR                  S5        UR                  S5        [        X«S [        U
5       5      nU R	                  XÒU5        UR                  S5        UR                  S:w  a.  UR                  5       UR                  -  nUR                  U5        XÜl        UR                  U5        UR                  U5        XÍ/$ )Né   ÚdefaultÚ ÚNoner_   )rf   ra   Ú	full_liker   r/   Úset_drawstyleÚ
set_markerÚlenÚset_linestyleÚmarkerscaleÚget_markersizeÚset_markersizeÚ
_legmarkerÚset_transform)r   r.   r$   r2   r3   r4   r5   r6   rD   rd   re   rw   ÚleglineÚlegline_markerÚnewszs                  r   r:   Ú$HandlerLine2DCompound.create_artistsô   s  € ð #Ÿn™n¨V¸xØ-2¸HóFÑˆô —’˜U¨xÑ&7¸1Ñ%<Ó>ˆÜ˜Ó&ˆà×Ñ˜¨vÔ6Ø×Ñ˜iÔ(Ø×Ñ˜2Ôä Ð4F´S¸Ó5FÐ.GÓHˆØ×Ñ˜°fÔ=Ø×$Ñ$ VÔ,Ø×Ñ Ó"Ø"×1Ñ1Ó3°f×6HÑ6HÑHˆEØ×)Ñ)¨%Ô0ð ,Ôà×Ñ˜eÔ$Ø×$Ñ$ UÔ+àÐ(Ð(r   rM   N©rG   rH   rI   rJ   rK   r:   rL   rM   r   r   r|   r|   î   s   † ñõ
)r   r|   c                   ó   • \ rS rSrSrS rSrg)ÚHandlerLine2Di  zÊ
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	                 ó²  • U R                  XUXVU5      u  pšS nU R                  U5      S:X  a!  [        R                  " U	S   U	S   S5      n	S/n[        R                  " X–U-
  S-  5      n[        XœUS9nU R                  XÒU5        UR                  S:w  a.  UR                  5       UR                  -  nUR                  U5        UR                  U5        U/$ )Nr_   r   éÿÿÿÿé   r   )Ú	markevery)rf   r\   ra   rb   rƒ   r   r/   rˆ   r‰   rŠ   rŒ   )r   r.   r$   r2   r3   r4   r5   r6   rD   rd   re   r—   rw   r�   r�   s                  r   r:   ÚHandlerLine2D.create_artists  sÛ   € ð #Ÿn™n¨V¸xØ-2¸HóFÑˆð ˆ	Ø×Ñ˜fÓ%¨Ó*ô —K’K  a¡¨%°©)°QÓ7ˆEØ˜ˆIä—’˜U¨hÑ%6¸!Ñ$;Ó<ˆÜ˜°Ñ;ˆà×Ñ˜¨vÔ6à×Ñ Ó"Ø×*Ñ*Ó,¨v×/AÑ/AÑAˆEØ×"Ñ" 5Ô)à×Ñ˜eÔ$àˆyÐr   rM   Nr‘   rM   r   r   r“   r“     s   † ñõr   r“   c                   ó<   ^ • \ rS rSrSrSU 4S jjrS rS rSrU =r	$ )ÚHandlerPatchi:  z!
Handler for `.Patch` instances.
c                 ó2   >• [         TU ]  " S0 UD6  Xl        g)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`.
NrM   )rR   r   Ú_patch_func)r   Ú
patch_funcrW   rX   s      €r   r   ÚHandlerPatch.__init__?  s   ø€ ô$ 	‰ÒÑ"˜6Ò"Ø%Õr   c           
      ód   • U R                   c  [        U* U* 4XVS9nU$ U R                  XX4XVUS9nU$ )N©Úxyr4   r5   )r.   r$   r2   r3   r4   r5   r6   )rœ   r   )	r   r.   r$   r2   r3   r4   r5   r6   Úps	            r   Ú_create_patchÚHandlerPatch._create_patchT  sV   € à×ÑÑ#Ü˜x˜i¨(¨Ð3Ø %ñ6ˆAð ˆð × Ñ ¨Ø*2Ø',Àhð !ð PˆAð ˆr   c	           	      óv   • U R                  XX4XVU5      n	U R                  X’U5        U	R                  U5        U	/$ r   )r£   r/   rŒ   ©
r   r.   r$   r2   r3   r4   r5   r6   rD   r¢   s
             r   r:   ÚHandlerPatch.create_artists_  sA   € ð ×Ñ˜vØ'°5À(óLˆà×Ñ˜¨Ô0Ø	�‰˜ÔØˆsˆ
r   )rœ   r   )
rG   rH   rI   rJ   rK   r   r£   r:   rL   ri   rj   s   @r   rš   rš   :  s   ø† ñ÷&ò*	÷ð r   rš   c                   ó>   • \ rS rSrSr\S 5       r\S 5       rS rSr	g)ÚHandlerStepPatchii  z9
Handler for `~.matplotlib.patches.StepPatch` instances.
c                 ó<   • [        U* U* 4UX@R                  5       S9$ )N)r¡   r4   r5   Úcolor)r   Úget_facecolor)r$   r2   r3   r4   r5   s        r   r£   ÚHandlerStepPatch._create_patchn  s*   € ä˜h˜Y¨¨	Ð2¸%Ø &×.GÑ.GÓ.IñKð 	Kr   c                 óÌ   • [        SU/US-  US-  /U R                  5       U R                  5       U R                  5       S9nUR	                  S5        UR                  S5        U$ )Nr   r   )r«   Ú	linestyleÚ	linewidthr€   r�   )r   Úget_edgecolorÚget_linestyleÚget_linewidthr„   r…   )r$   r4   r5   r�   s       r   Ú_create_lineÚHandlerStepPatch._create_lines  sj   € ô ˜!˜U˜ f¨Q¡h°°q±Ð%9Ø*×8Ñ8Ó:Ø#.×#<Ñ#<Ó#>Ø#.×#<Ñ#<Ó#>ñˆð 	×Ñ˜iÔ(Ø×Ñ˜2ÔØˆr   c	                 óæ   • UR                  5       (       d  UR                  5       b&  U R                  X#XEU5      n	U R                  X’U5        OU R	                  X%U5      n	U	R                  U5        U	/$ r   )Úget_fillÚ	get_hatchr£   r/   r´   rŒ   r¦   s
             r   r:   ÚHandlerStepPatch.create_artists�  sm   € ð ×Ñ×!Ñ! k×&;Ñ&;Ó&=Ñ&IØ×"Ñ" ;¸(Ø#)ó+ˆAà×Ñ˜Q¨VÕ4à×!Ñ! +°fÓ=ˆAØ	�‰˜ÔØˆsˆ
r   rM   N)
rG   rH   rI   rJ   rK   Ústaticmethodr£   r´   r:   rL   rM   r   r   r©   r©   i  s6   † ñð ñKó ðKð ñó ðõ
r   r©   c                   ó*   • \ rS rSrSrS rS rS rSrg)ÚHandlerLineCollectioniŽ  z*
Handler for `.LineCollection` instances.
c                 óL   • U R                   c  UR                  $ U R                   $ r   ©rS   Úscatterpointsr[   s     r   r\   Ú#HandlerLineCollection.get_numpoints’  ó"   € Ø�?‰?Ñ"Ø×'Ñ'Ð'à—?‘?Ð"r   c                 óÔ   • UR                  5       S   nUR                  S   nUR                  5       S   nUR                  U5        UR	                  U5        UR                  U5        g ©Nr   )Úget_linewidthsÚ_us_linestylesÚ
get_colorsÚ	set_colorr‡   Úset_linewidth)r   r#   r$   ÚlwÚdashesr«   s         r   r!   Ú*HandlerLineCollection._default_update_prop˜  sb   € Ø×'Ñ'Ó)¨!Ñ,ˆØ×+Ñ+¨AÑ.ˆØ×&Ñ&Ó(¨Ñ+ˆØ×Ñ Ô&Ø×#Ñ# FÔ+Ø×#Ñ# BÕ'r   c	                 óÈ   • U R                  XUXVU5      u  pš[        R                  " X–U-
  S-  5      n[        X›5      nU R	                  XÂU5        UR                  U5        U/$ )Nr   )rf   ra   rƒ   r   r/   rŒ   )r   r.   r$   r2   r3   r4   r5   r6   rD   rd   re   rw   r�   s                r   r:   Ú$HandlerLineCollection.create_artists   sg   € ð #Ÿn™n¨V¸xØ-2¸HóFÑˆä—’˜U¨hÑ%6¸!Ñ$;Ó<ˆÜ˜Ó&ˆà×Ñ˜¨vÔ6Ø×Ñ˜eÔ$àˆyÐr   rM   N)	rG   rH   rI   rJ   rK   r\   r!   r:   rL   rM   r   r   r¼   r¼   Ž  s   † ñò#ò(õr   r¼   c                   óN   ^ • \ rS rSrSrS
U 4S jjrS rS rS rS r	S r
S	rU =r$ )ÚHandlerRegularPolyCollectioni®  z'Handler for `.RegularPolyCollection`\s.c                 ó6   >• [         TU ]  " SSU0UD6  X l        g )Nrp   rM   )rR   r   Ú_sizes)r   rp   ÚsizesrW   rX   s       €r   r   Ú%HandlerRegularPolyCollection.__init__±  s   ø€ Ü‰ÒÑ5 (Ð5¨fÒ5à�r   c                 óL   • U R                   c  UR                  $ U R                   $ r   r¾   r[   s     r   r\   Ú*HandlerRegularPolyCollection.get_numpoints¶  rÁ   r   c                 ó€  • U R                   c¤  UR                  5       n[        U5      (       d  S/n[        U5      UR                  S-  -  n	[        U5      UR                  S-  -  n
U R                  U5      nUS:  a  SXš-   -  U	U
/S U nU$ Xš-
  nU[        R                  " SSU5      -  U
-   n U$ U R                   nU$ )Nr_   r   é   r`   r   )	rÑ   Ú	get_sizesr†   Úmaxrˆ   Úminr\   ra   rb   )r   r.   r$   r2   r3   r4   r5   r6   Úhandle_sizesÚsize_maxÚsize_minrV   rÒ   Úrngs                 r   rØ   Ú&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                 ó¦   • U R                  X5        UR                  UR                  SS95        UR                  S 5        UR	                  S 5        g )NF)Úroot)r%   Ú
set_figureÚ
get_figurer+   r,   r-   s       r   r/   Ú(HandlerRegularPolyCollection.update_propÑ  sH   € à×Ñ˜-Ô5à× Ñ  ×!2Ñ!2¸Ð!2Ð!>Ô?à×"Ñ" 4Ô(Ø×#Ñ# DÕ)r   c                 ó^   • [        U5      " UR                  5       UR                  5       UX4S9$ )N)ÚrotationrÒ   ÚoffsetsÚoffset_transform)ÚtypeÚget_numsidesÚget_rotation©r   r$   rÒ   rç   rè   s        r   Úcreate_collectionÚ.HandlerRegularPolyCollection.create_collectionÚ  s1   € Ü�KÔ Ø×$Ñ$Ó&Ø ×-Ñ-Ó/°uØñ
ð 	
r   c	           
      ó  • U R                  XUXVU5      u  pšU R                  XUXVU5      nU R                  XX4XVU5      nU R                  X,[	        [        X«5      5      US9nU R                  XÒU5        UR                  U5        U/$ ©N)rç   rè   )rf   rx   rØ   rí   ÚlistÚzipr/   Úset_offset_transform)r   r.   r$   r2   r3   r4   r5   r6   rD   rd   re   rw   rÒ   r¢   s                 r   r:   Ú+HandlerRegularPolyCollection.create_artistsá  s¢   € ð #Ÿn™n¨V¸xØ-2¸HóFÑˆð —‘˜v°Ø$¨hó8ˆð —‘˜v°HØ$¨hó8ˆð ×"Ñ"ØÜœ˜\Ó1Ó2ÀUð #ð Lˆð 	×Ñ˜¨Ô0Ø	×Ñ˜uÔ%Øˆsˆ
r   )rÑ   rz   )rG   rH   rI   rJ   rK   r   r\   rØ   r/   rí   r:   rL   ri   rj   s   @r   rÏ   rÏ   ®  s)   ø† Ù2÷ò
#òò**ò
÷ð r   rÏ   c                   ó   • \ rS rSrSrS rSrg)ÚHandlerPathCollectioni÷  zDHandler for `.PathCollection`\s, which are used by `~.Axes.scatter`.c                 óH   • [        U5      " UR                  5       S   /UX4S9$ )Nr   )rÒ   rç   rè   )ré   Ú	get_pathsrì   s        r   rí   Ú'HandlerPathCollection.create_collectionú  s-   € Ü�KÔ Ø×"Ñ"Ó$ QÑ'Ð(°Øñ
ð 	
r   rM   N©rG   rH   rI   rJ   rK   rí   rL   rM   r   r   rö   rö   ÷  s
   † ÙOõ
r   rö   c                   ó   • \ rS rSrSrS rSrg)ÚHandlerCircleCollectioni  z"Handler for `.CircleCollection`\s.c                 ó"   • [        U5      " X#US9$ rð   )ré   rì   s        r   rí   Ú)HandlerCircleCollection.create_collection  s   € Ü�KÔ ØÐ5EñGð 	Gr   rM   Nrú   rM   r   r   rü   rü     s   † Ù-õGr   rü   c                   ó@   ^ • \ rS rSrSr  SU 4S jjrS rS rSrU =r	$ )ÚHandlerErrorbari	  zHandler for Errorbars.c                 óB   >• Xl         X l        [        TU ]  " SX4S.UD6  g )N)rU   rV   rM   )Ú
_xerr_sizeÚ
_yerr_sizerR   r   )r   Ú	xerr_sizeÚ	yerr_sizerU   rV   rW   rX   s         €r   r   ÚHandlerErrorbar.__init__  s$   ø€ ð $ŒØ#Œä‰ÒÐN JÑNÀvÓNr   c                 óh   • U R                   U-  nU R                  c  UnXx4$ U R                  U-  nXx4$ r   ©r  r  )	r   r.   r2   r3   r4   r5   r6   r  r  s	            r   Úget_err_sizeÚHandlerErrorbar.get_err_size  sC   € à—O‘O hÑ.ˆ	à�?‰?Ñ"Ø!ˆIð Ð#Ð#ð Ÿ™¨(Ñ2ˆIàÐ#Ð#r   c	                 ó^  • Uu  pšnU R                  XUXVU5      u  pÍ[        R                  " XÆU-
  S-  5      n[        XÎ5      n[        R                  " U5      n[        R                  " US [        U5       5      nU R                  XUXVU5      u  nn[        UU5      nU	c#  UR                  S5        UR                  S5        O•U R                  XùU5        UR                  S5        UR                  S5        U R                  UX‘5        UR                  S5        UR                  S:w  a.  UR                  5       UR                  -  nUR                  U5        / n/ nUR                  (       aÿ  [!        UU5       VVs/ s H  u  nnUU-
  U4UU-   U44PM     nnn["        R$                  " U5      nU R                  UUS   U5        UR'                  U5        U
(       aŽ  [        UU-
  U5      n[        UU-   U5      nU R                  UU
S   U5        U R                  UU
S   U5        UR                  S5        UR                  S5        UR'                  U5        UR'                  U5        UR(                  (       aÿ  [!        UU5       VVs/ s H  u  nnUUU-
  4UUU-   44PM     nnn["        R$                  " U5      nU R                  UUS   U5        UR'                  U5        U
(       aŽ  [        UUU-
  5      n[        UUU-   5      nU R                  UU
S   U5        U R                  UU
S   U5        UR                  S	5        UR                  S	5        UR'                  U5        UR'                  U5        / UQUQUPUPnU H  nUR+                  U5        M     U$ s  snnf s  snnf )
Nr   Fr€   Únoner‚   r_   r   Ú|Ú_)rf   ra   rƒ   r   ru   r†   r	  Úset_visibler/   r„   r…   r‡   rˆ   r‰   rŠ   Úhas_xerrrò   ÚmcollÚLineCollectionÚappendÚhas_yerrrŒ   )r   r.   r$   r2   r3   r4   r5   r6   rD   Ú	plotlinesÚcaplinesÚbarlinecolsrd   re   rw   r�   Úydata_markerr  r  rŽ   r�   Úhandle_barlinecolsÚhandle_caplinesÚxÚyÚvertsÚcollÚcapline_leftÚcapline_rightr>   Úartists                                  r   r:   ÚHandlerErrorbar.create_artists  s¸  € ð ,7Ñ(ˆ	˜[à"Ÿn™n¨V¸xØ-2¸HóFÑˆô —’˜U¨hÑ%6¸!Ñ$;Ó<ˆÜ˜Ó&ˆä—z’z ,Ó/ˆÜ—z’z %Ð(:¬¨\Ó):Ð";Ó<ˆà#×0Ñ0°À8Ø16Àó JÑˆ	�9ô   ¨lÓ;ˆð ÑØ×Ñ Ô&Ø×&Ñ& uÕ-à×Ñ˜W°Ô8à×!Ñ! )Ô,Ø×Ñ˜vÔ&à×Ñ˜^¨YÔ?Ø×(Ñ(¨Ô0à×!Ñ! QÓ&Ø&×5Ñ5Ó7¸&×:LÑ:LÑL�Ø×-Ñ-¨eÔ4àÐØˆà××ä!$ \°<Ô!@ôBÚ!@™˜˜Að ˜9‘} aÐ(¨1¨y©=¸!Ð*<Ó=Ù!@ð ñ 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ä×'Ò'¨Ó.ˆ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)r  )r`   Nrh   N)
rG   rH   rI   rJ   rK   r   r	  r:   rL   ri   rj   s   @r   r   r   	  s#   ø† Ù à04Ø+/÷Oò	$÷Rð Rr   r   c                   óF   ^ • \ rS rSrSr  SU 4S jjrS rS rS rSr	U =r
$ )	ÚHandlerStemit  z.
Handler for plots produced by `~.Axes.stem`.
c                 ó8   >• [         TU ]  " SXUS.UD6  X0l        g)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`.
)rU   rV   rp   NrM   )rR   r   Ú_bottom)r   rU   rV   Úbottomrp   rW   rX   s         €r   r   ÚHandlerStem.__init__y  s)   ø€ ô" 	‰Òð 	6 JØ"*ñ	6Ø.4ò	6à�r   c                 ó”   • U R                   c  USUR                  -  S-   -  nU$ U[        R                  " U R                   5      -  nU$ )Nr`   rs   rv   s           r   rx   ÚHandlerStem.get_ydataŽ  sK   € Ø�>‰>Ñ!Ø˜c F×$;Ñ$;Ñ;¸cÑAÑBˆEð ˆð œRŸZšZ¨¯©Ó7Ñ7ˆEàˆr   c	           	      ój  • Uu  pšn[        U
[        R                  5      nU R                  XUXVU5      u  pÞU R	                  XUXVU5      nU R
                  c  SnOU R
                  n[        XïS [        U5       5      nU R                  UX‘5        [        Xï5       VVs/ s H  u  nn[        UU/UU/5      PM     nnnU(       aC  [        R                  " X R                  S9   U H  nU R                  UX¡5        M     S S S 5        O)[        UU
5       H  u  nnU R                  UUU5        M     [        [        R                  " U5      [        R                  " U5      /UU/5      nU R                  UX±5        / UQUPUPnU H  nUR!                  U5        M     U$ s  snnf ! , (       d  f       N‚= f)NrF   )r   )Ú
isinstancer  r  rf   rx   r&  r   r†   r/   rò   r   Ú_setattr_cmÚ_copy_collection_propsra   rÚ   rÙ   rŒ   )r   r.   r$   r2   r3   r4   r5   r6   rD   Ú
markerlineÚ	stemlinesÚbaselineÚusing_linecollrd   re   rw   r'  Úleg_markerliner  r  Úleg_stemlinesÚlineÚlmÚmÚleg_baseliner>   r!  s                              r   r:   ÚHandlerStem.create_artists–  s½  € ð +6Ñ'ˆ
˜xô $ I¬u×/CÑ/CÓDˆà"Ÿn™n¨V¸xØ-2¸HóFÑˆð —‘˜v°Ø$¨hó8ˆð �<‰<ÑØ‰Fà—\‘\ˆFä Ð4F´S¸Ó5FÐ.GÓHˆØ×Ñ˜¨Ô<ô &)¨Ô%=ô?Ú%=™T˜Q ô    A ¨°¨Ö4Ù%=ð 	ñ ?ö ô ×"Ò"Ø×,GÑ,GóIã)�DØ×$Ñ$ T¨9Ö=ñ *÷Ið Iô ˜]¨IÖ6‘��AØ× Ñ   Q¨Ö/ñ 7ô œrŸvšv e›}¬b¯fªf°U«mÐ<Ø% vÐ.ó0ˆà×Ñ˜ xÔ8à@�MÐ@ <Ð@°Ð@ˆÛˆFØ× Ñ  Ö'ñ àˆùó-?÷Iõ Iús   ÂFÃ"F$Æ$
F2c                 óŒ   • UR                  UR                  5       S   5        UR                  UR                  5       S   5        g)z\
Copy properties from the `.LineCollection` *orig_handle* to the
`.Line2D` *legend_handle*.
r   N)rÇ   Ú	get_colorr‡   r²   r"   s      r   r.  Ú"HandlerStem._copy_collection_propsÆ  s<   € ð
 	×Ñ × 5Ñ 5Ó 7¸Ñ :Ô;Ø×#Ñ# K×$=Ñ$=Ó$?ÀÑ$BÕCr   )r&  )rh   NNN)rG   rH   rI   rJ   rK   r   rx   r:   r.  rL   ri   rj   s   @r   r$  r$  t  s,   ø† ñð 26Ø'+÷ò*ò.÷`Dð Dr   r$  c                   ó6   ^ • \ rS rSrSrSU 4S jjrS rSrU =r$ )ÚHandlerTupleiÏ  z
Handler for Tuple.
c                 ó>   >• Xl         X l        [        TU ]  " S0 UD6  g)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`.
NrM   )Ú_ndivideÚ_padrR   r   )r   Úndividerc   rW   rX   s       €r   r   ÚHandlerTuple.__init__Ô  s   ø€ ð  ŒØŒ	Ü‰ÒÑ"˜6Ó"r   c	                 óÒ  • UR                  5       n	U R                  c  [        U5      n
OU R                  n
U R                  c  UR                  U-  nOU R                  U-  nU
S:”  a  X[U
S-
  -  -
  U
-  n[        X5U-   [        R                  " U
5      -  -
  5      n/ nU HC  nUR                  Xž5      nUR                  X[        U5      XEXgU5      nUR                  U5        ME     U$ )Nr_   )Úget_legend_handler_mapr@  r†   rA  Ú	borderpadr   ra   ÚarangeÚget_legend_handlerr:   r	   Úextend)r   r.   r$   r2   r3   r4   r5   r6   rD   Úhandler_maprB  rc   Ú	xds_cycleÚa_listÚhandle1ÚhandlerÚ_a_lists                    r   r:   ÚHandlerTuple.create_artistsä  sè   € ð ×3Ñ3Ó5ˆà�=‰=Ñ Ü˜+Ó&‰Gà—m‘mˆGà�9‰9ÑØ×"Ñ" XÑ-‰Cà—)‘)˜hÑ&ˆCà�Q‹;Ø G¨a¡KÑ0Ñ0°GÑ;ˆEä˜(¨c¡k´R·Y²Y¸wÓ5GÑ%GÑGÓHˆ	àˆÛ"ˆGØ×/Ñ/°ÓEˆGØ×,Ñ,ØÜ�Y“ °&ÀEóKˆGð �M‰M˜'Ö"ñ #ð ˆr   )r@  rA  )r_   N)	rG   rH   rI   rJ   rK   r   r:   rL   ri   rj   s   @r   r>  r>  Ï  s   ø† ñ÷#÷ ð r   r>  c                   ó$   • \ rS rSrSrS rS rSrg)ÚHandlerPolyCollectioni  zU
Handler for `.PolyCollection` used in `~.Axes.fill_between` and
`~.Axes.stackplot`.
c                 ó  • S nS nU" UR                  5       5      Ul        U" UR                  5       5      Ul        UR                  Ul        UR
                  Ul        UR                  5       Ul        UR                  5       Ul	        UR                  Ul
        UR                  U" UR                  5       5      5        UR                  U" UR                  5       5      5        UR                  U" UR!                  5       5      5        g )Nc                 ó@   • U R                   S:X  a  g[        U S   5      $ )Nr   )r   r   r   r   )ÚsizeÚtuple)Úcolorss    r   Úfirst_colorÚ7HandlerPolyCollection._update_prop.<locals>.first_color
  s    € Ø�{‰{˜aÓØ#Ü˜ ™Ó#Ð#r   c                 ó.   • [        U 5      (       a  U S   $ g rÃ   )r†   )Ú
prop_arrays    r   Ú	get_firstÚ5HandlerPolyCollection._update_prop.<locals>.get_first  s   € Ü�:�‰Ø! !‘}Ð$àr   )r¬   Ú
_facecolorr±   Ú
_edgecolorÚ_original_facecolorÚ_original_edgecolorr·   Ú_fillr¸   Ú_hatchÚ_hatch_colorrÈ   rÄ   r‡   Úget_linestylesrŒ   Úget_transforms)r   r#   r$   rX  r\  s        r   r%   Ú"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ÕLr   c	                 ój   • [        U* U* 4XVS9n	U R                  X’U5        U	R                  U5        U	/$ )Nr    )r   r/   rŒ   r¦   s
             r   r:   Ú$HandlerPolyCollection.create_artists%  s?   € ô ˜8˜) h YÐ/Ø!ñ2ˆà×Ñ˜¨Ô0Ø	�‰˜ÔØˆsˆ
r   rM   N)rG   rH   rI   rJ   rK   r%   r:   rL   rM   r   r   rR  rR    s   † ñòMõ8r   rR  )rK   Ú	itertoolsr   Únumpyra   Ú
matplotlibr   Úmatplotlib.linesr   Úmatplotlib.patchesr   Úmatplotlib.collectionsÚcollectionsr  r   r   rO   rl   r|   r“   rš   r©   r¼   rÏ   rö   rü   r   r$  r>  rR  rM   r   r   Ú<module>rq     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   