+
     ]it  c                   s   R t ^ RIHt ^ RIt^ RIHt ^ RIHt ^ RI	H
t
 ^ RIHt R t ! R R4      t ! R	 R
]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R ]4      t ! R! R"]4      t ! R# R$]4      tR# )%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                 sz    \        \        VP                  4       4      R 4      pVe   V P                  V4       R # R # N)nextZiterZget_childrenupdate_from)ZtgtZsrcZfirst_childs   && @/usr/lib64/python3.14/site-packages/matplotlib/legend_handler.pyupdate_from_first_childr   (   s3    tC,,./6K$     c                   sR   a  ] tR t^.t o RtRR ltR tR tR tR t	R t
R	 tR
tV tR# )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                s.    WuV n         V n        W0n        R# )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)selfZxpadZypadZupdate_func   &&&&r   __init__ZHandlerBase.__init__>   s     "&
DJ!,r	   c                sj    V P                   f   V P                  W4       R # V P                  W4       R # r   )r   _default_update_propr   legend_handleorig_handle   &&&r   _update_propZHandlerBase._update_propM   s*    !!)%%mA""=>r	   c                s(    VP                  V4       R # r   )r   r   r   r   r   Z HandlerBase._default_update_propS   s    !!+.r	   c                s    V P                  W4       VP                  V4       VP                  R 4       VP                  R 4       R # r   )r   Z_set_artist_propsset_clip_boxset_clip_pathr   r   r   legendr   r   update_propZHandlerBase.update_propV   s:    -5  /""4(##D)r	   c                s    W0P                   V,          ,
          pW@P                  V,          ,
          pWPP                   V,          ,
          pW`P                  V,          ,
          pW4WV3# r   )r   r   )r   r   r   xdescentydescentwidthheightfontsizes   &&&&&&&&r   adjust_drawing_areaZHandlerBase.adjust_drawing_area^   sS     jj833jj833

X--**x//500r	   c                s   V P                  WVP                  VP                  VP                  VP                  V4      w  rVrxV P                  WWVWxW4P                  4       4      p	V	 F  p
VP                  V
4       K  	  V	^ ,          # )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!   r   r   r   r   create_artistsZget_transformZ
add_artist)r   r   r   r    Z	handleboxr   r   r   r   artistsZas   &&&&&      r   legend_artistZHandlerBase.legend_artistg   s    * -1,D,D##Y%7%7)"2"2	-)E
 %%f&.%&.0G0G0IK
 A  #  qzr	   c	                s    \        R4      h)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)ZNotImplementedError)	r   r   r   r   r   r   r   r    transs	   &&&&&&&&&r   r"   ZHandlerBase.create_artists   s    . ""9::r	   )r   r   r   )        r&   N)__name__
__module____qualname____firstlineno____doc__r   r   r   r   r!   r$   r"   __static_attributes____classdictcell____classdict__   @r   r
   r
   .   s3     -?/*1#J; ;r	   r
   c                   sF   a a ] tR t^t oRtRV 3R lltR tR tRtVt	V ;t
# )HandlerNpointszE
A legend handler that shows *numpoints* points in the legend entry.
c                s@   < \         SV `  ! R/ VB  W n        Wn        R# )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`.
N )superr   
_numpoints_marker_pad)r   
marker_pad	numpointskwargs	__class__   &&&,r   r   ZHandlerNpoints.__init__   s      	"6"#%r	   c                N    V P                   f   VP                  # V P                   # r   )r4   r7   r   r      &&r   get_numpointsZHandlerNpoints.get_numpoints   s"    ??"###??"r	   c                s   V P                  V4      pV^8  dH   V P                  V,          p\        P                  ! V) V,           V) V,           V,
          V4      p	T	p
W3# V) V) V,           .p	V) RV,          ,           .p
W3# )         ?)r>   r5   nplinspace)r   r   r   r   r   r   r    r7   padxdataxdata_markers   &&&&&&&    r   	get_xdataZHandlerNpoints.get_xdata   s    &&v.	q=""X-CKK	C!)	E 1C 7 )+E !L "" Y	E 12E%Ie34L""r	   )r5   r4   )333333?N)r'   r(   r)   r*   r+   r   r>   rF   r,   r-   __classcell__r9   r/      @@r   r1   r1      s     & ## #r	   r1   c                   s@   a a ] tR t^t oRtRV 3R lltR tRtVtV ;t	# )HandlerNpointsYoffsetszv
A legend handler that shows *numpoints* in the legend, and allows them to
be individually offset in the y-direction.
c                s8   < \         SV `  ! RRV/VB  W n        R# )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`.
r7   Nr2   )r3   r   	_yoffsets)r   r7   yoffsetsr8   r9   r:   r   r   ZHandlerNpointsYoffsets.__init__   s     	7977!r	   c                s    V P                   f   WQP                  ,          pV# V\        P                  ! V P                   4      ,          pV# r   rL   Z_scatteryoffsetsrA   asarrayr   r   r   r   r   r   r    ydata   &&&&&&& r   	get_ydataZ HandlerNpointsYoffsets.get_ydata   s?    >>!444E  RZZ77Er	   )rL   NN)
r'   r(   r)   r*   r+   r   rS   r,   r-   rH   rI   rJ   r   rK   rK      s     
" r	   rK   c                   s*   a  ] tR t^t o RtR tRtV tR# )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	                sD   V P                  WVWVV4      w  r\        P                  ! WV,
          ^,          4      p\        W4      pV P	                  WV4       VP                  R4       VP                  R4       \        WR\        V
4       4      pV P	                  WV4       VP                  R4       VP                  ^8w  d3   VP                  4       VP                  ,          pVP                  V4       Wn        VP                  V4       VP                  V4       W.# )   default NNone)rF   rA   	full_liker   r   set_drawstyle
set_markerlenset_linestylemarkerscaleget_markersizeset_markersizeZ
_legmarkerset_transform)r   r   r   r   r   r   r   r    r%   rD   rE   rQ   leglinelegline_markernewsz   &&&&&&&&&      r   r"   Z$HandlerLine2DCompound.create_artists   s    #nnVx-2HF Ux&71%<>&v6i(24FS5F.GHf=$$V,""113f6H6HHE))%0 ,e$$$U+((r	   r2   Nr'   r(   r)   r*   r+   r"   r,   r-   r.   r0   r   rU   rU      s     
) )r	   rU   c                   *   a  ] tR tRt o RtR tRtV tR# )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	                s   V P                  WVWVV4      w  rR pV P                  V4      ^8X  d*   \        P                  ! V	^ ,          V	R,          ^4      p	^.p\        P                  ! WV,
          ^,          4      p\        WVR7      pV P                  WV4       VP                  ^8w  d3   VP                  4       VP                  ,          pVP                  V4       VP                  V4       V.# )N)	markeveryi)rF   r>   rA   rB   rZ   r   r   r_   r`   ra   rb   )r   r   r   r   r   r   r   r    r%   rD   rE   rj   rQ   rc   re   rf   r   r"   ZHandlerLine2D.create_artists  s     #nnVx-2HF 	f%* KKa%)Q7EIUh%6!$;<;v6"**,v/A/AAE""5)e$yr	   r2   Nrg   r.   r0   r   ri   ri     s      r	   ri   c                   F   a a ] tR tRt oRtRV 3R lltR tR tRtVt	V ;t
# )HandlerPatchi:  z!
Handler for `.Patch` instances.
c                s4   < \         SV `  ! R/ VB  Wn        R# )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`.
Nr2   )r3   r   _patch_func)r   Z
patch_funcr8   r9   s   &&,r   r   ZHandlerPatch.__init__?  s    $ 	"6"%r	   c           
     sr    V P                   f   \        V) V) 3WVR7      pV# V P                  WW4WVVR7      pV# )Nxyr   r   )r   r   r   r   r   r   r    )rm   r   )	r   r   r   r   r   r   r   r    ps	   &&&&&&&& r   _create_patchZHandlerPatch._create_patchT  sV    #xi(3 %6A    *2',h ! PA r	   c	           	     sv    V P                  WW4WVV4      p	V P                  WV4       V	P                  V4       V	.# r   )rq   r   rb   
r   r   r   r   r   r   r   r    r%   rp   
   &&&&&&&&& r   r"   ZHandlerPatch.create_artists_  sA     v'5(L0	s
r	   )rm   r   )r'   r(   r)   r*   r+   r   rq   r"   r,   r-   rH   rI   rJ   r   rl   rl   :  s     &*	 r	   rl   c                   sJ   a  ] tR tRt o Rt]R 4       t]R 4       tR tRt	V t
R# )HandlerStepPatchii  z9
Handler for `~.matplotlib.patches.StepPatch` instances.
c                sB    \        V) V) 3VW@P                  4       R 7      # ))ro   r   r   color)r   get_facecolor)r   r   r   r   r      &&&&&r   rq   ZHandlerStepPatch._create_patchn  s*    hY	2% &.G.G.IK 	Kr	   c                s    \        ^ V.V^,          V^,          .V P                  4       V P                  4       V P                  4       R7      pVP	                  R4       VP                  R4       V# )    )ru   Z	linestyleZ	linewidthrW   rX   )r   get_edgecolorget_linestyleZget_linewidthr[   r\   )r   r   r   rc   s   &&& r   _create_lineZHandlerStepPatch._create_lines  sj     !UfQhq%9*88:#.#<#<#>#.#<#<#> 	i(2r	   c	                s    VP                  4       '       g   VP                  4       e'   V P                  W#WEV4      p	V P                  WV4       MV P	                  W%V4      p	V	P                  V4       V	.# r   )get_fill	get_hatchrq   r   r{   rb   rr   rs   r   r"   ZHandlerStepPatch.create_artists  sm     !!k&;&;&=&I"";(#)+AQV4!!+f=A	s
r	   r2   N)r'   r(   r)   r*   r+   Zstaticmethodrq   r{   r"   r,   r-   r.   r0   r   rt   rt   i  s>      K K  
 
r	   rt   c                   s6   a  ] tR tRt o RtR tR tR tRtV t	R# )HandlerLineCollectioni  z*
Handler for `.LineCollection` instances.
c                r;   r   r4   Zscatterpointsr<   r=   r   r>   Z#HandlerLineCollection.get_numpoints  "    ??"'''??"r	   c                s    VP                  4       ^ ,          pVP                  ^ ,          pVP                  4       ^ ,          pVP                  V4       VP	                  V4       VP                  V4       R# rx   N)get_linewidthsZ_us_linestylesZ
get_colors	set_colorr^   set_linewidth)r   r   r   ZlwZdashesru   s   &&&   r   r   Z*HandlerLineCollection._default_update_prop  sb    '')!,++A.&&(+&##F+##B'r	   c	                s    V P                  WVWVV4      w  r\        P                  ! WV,
          ^,          4      p\        W4      pV P	                  WV4       VP                  V4       V.# )rV   )rF   rA   rZ   r   r   rb   )r   r   r   r   r   r   r   r    r%   rD   rE   rQ   rc   s   &&&&&&&&&    r   r"   Z$HandlerLineCollection.create_artists  sg     #nnVx-2HFUh%6!$;<&v6e$yr	   r2   N)
r'   r(   r)   r*   r+   r>   r   r"   r,   r-   r.   r0   r   r~   r~     s     #( r	   r~   c                   sX   a a ] tR tRt oRtR
V 3R lltR tR tR tR t	R t
R	tVtV ;t# )HandlerRegularPolyCollectioni  z'Handler for `.RegularPolyCollection`\s.c                s8   < \         SV `  ! RR V/VB  W n        R# )rM   Nr2   )r3   r   _sizes)r   rM   sizesr8   r9   r:   r   r   Z%HandlerRegularPolyCollection.__init__  s    5(5f5r	   c                r;   r   r   r<   r=   r   r>   Z*HandlerRegularPolyCollection.get_numpoints  r   r	   c                s   V P                   f   VP                  4       p\        V4      '       g   ^.p\        V4      VP                  ^,          ,          p	\        V4      VP                  ^,          ,          p
V P                  V4      pV^8  d   RW,           ,          V	V
.R V pV# W,
          pV\        P                  ! ^ ^V4      ,          V
,           p V# V P                   pV# Nr@   )	r   	get_sizesr]   maxr_   minr>   rA   rB   )r   r   r   r   r   r   r   r    Zhandle_sizesZsize_maxZsize_minr7   r   Zrngs   &&&&&&&&      r   r   Z&HandlerRegularPolyCollection.get_sizes  s    ;;&002L|$$ !s<(6+=+=+BBH<(6+=+=+BBH**62I1}x23X!##-I/   *bkk!Q	::XE  KKEr	   c                s    V P                  W4       VP                  VP                  R R7      4       VP                  R4       VP	                  R4       R# )F)ZrootN)r   Z
set_figureZ
get_figurer   r   r   r   r   r   Z(HandlerRegularPolyCollection.update_prop  sH    -5  !2!2!2!>?""4(##D)r	   c                sd    \        V4      ! VP                  4       VP                  4       VW4R 7      # ))Zrotationr   offsetsoffset_transform)typeZget_numsidesZget_rotationr   r   r   r   r   rw   r   create_collectionZ.HandlerRegularPolyCollection.create_collection  s1    K $$& --/u
 	
r	   c	           
     s   V P                  WVWVV4      w  rV P                  WVWVV4      pV P                  WW4WVV4      pV P                  W,\	        \        W4      4      VR 7      pV P                  WV4       VP                  V4       V.# )r   r   )rF   rS   r   r   Zlistzipr   Zset_offset_transform)r   r   r   r   r   r   r   r    r%   rD   rE   rQ   r   rp   s   &&&&&&&&&     r   r"   Z+HandlerRegularPolyCollection.create_artists  s     #nnVx-2HF v$h8 vH$h8 ""\12U # L 	0	u%s
r	   )r   rT   )r'   r(   r)   r*   r+   r   r>   r   r   r   r"   r,   r-   rH   rI   rJ   r   r   r     s+     2
#**
 r	   r   c                   rh   )HandlerPathCollectioni  zDHandler for `.PathCollection`\s, which are used by `~.Axes.scatter`.c                sV    \        V4      ! VP                  4       ^ ,          .VW4R7      # )rx   )r   r   r   )r   Z	get_pathsr   rw   r   r   Z'HandlerPathCollection.create_collection  s-    K ""$Q'(
 	
r	   r2   Nr'   r(   r)   r*   r+   r   r,   r-   r.   r0   r   r   r     s     O
 
r	   r   c                   rh   )HandlerCircleCollectioni  z"Handler for `.CircleCollection`\s.c                s(    \        V4      ! W#VR 7      # r   )r   r   rw   r   r   Z)HandlerCircleCollection.create_collection  s    K 5EG 	Gr	   r2   Nr   r.   r0   r   r   r     s     -G Gr	   r   c                   rk   )HandlerErrorbari	  zHandler for Errorbars.c                sH   < Wn         W n        \        SV `  ! RR VRV/VB  R# )r6   r7   Nr2   )
_xerr_size
_yerr_sizer3   r   )r   	xerr_size	yerr_sizer6   r7   r8   r9      &&&&&,r   r   ZHandlerErrorbar.__init__  s)     $#NJN)NvNr	   c                sz    V P                   V,          pV P                  f   TpWx3# V P                  V,          pWx3# r   r   r   )	r   r   r   r   r   r   r    r   r   s	   &&&&&&&  r   get_err_sizeZHandlerErrorbar.get_err_size  sC    OOh.	??"!I ## (2I##r	   c	                s   Vw  rpV P                  WVWVV4      w  r\        P                  ! WV,
          ^,          4      p\        W4      p\        P                  ! V4      p\        P                  ! VR\        V4       4      pV P                  WVWVV4      w  pp\        VV4      pV	f$   VP                  R4       VP                  R4       MV P                  WV4       VP                  R4       VP                  R4       V P                  VW4       VP                  R4       VP                  ^8w  d3   VP                  4       VP                  ,          pVP                  V4       . p. pVP                  '       Ed   \!        VV4       UUu. uF  w  ppVV,
          V3VV,           V33NK  	  ppp\"        P$                  ! V4      pV P                  VV^ ,          V4       VP'                  V4       V
'       d   \        VV,
          V4      p\        VV,           V4      pV P                  VV
^ ,          V4       V P                  VV
^ ,          V4       VP                  R4       VP                  R4       VP'                  V4       VP'                  V4       VP(                  '       Ed   \!        VV4       UUu. uF  w  ppVVV,
          3VVV,           33NK  	  ppp\"        P$                  ! V4      pV P                  VV^ ,          V4       VP'                  V4       V
'       d   \        VVV,
          4      p\        VVV,           4      pV P                  VV
^ ,          V4       V P                  VV
^ ,          V4       VP                  R4       VP                  R4       VP'                  V4       VP'                  V4       . VOVOVNVNpV F  pVP+                  V4       K  	  V# u uppi u uppi )rV   NFrW   ZnonerY   Z|Z_)rF   rA   rZ   r   rO   r]   r   Zset_visibler   r[   r\   r^   r_   r`   ra   Zhas_xerrr   mcollLineCollectionZappendZhas_yerrrb   )r   r   r   r   r   r   r   r    r%   Z	plotlinesZcaplinesZbarlinecolsrD   rE   rQ   rc   Zydata_markerr   r   rd   re   Zhandle_barlinecolsZhandle_caplinesxyZvertsZcollZcapline_leftZcapline_rightr#   artists   &&&&&&&&&                      r   r"   ZHandlerErrorbar.create_artists  s    ,7(	["nnVx-2HF Uh%6!$;<&zz,/zz%(:\):";<#00816 J	9  l; &&&u-W8!!),v&^Y?((0!!Q&&557&:L:LL--e4!$\<!@B!@A 9}a(1y=!*<=!@  B''.DT;q>6:%%d+%lY&>M &|i'? N  x{FC  VD'',((-&&|4&&}5!$\<!@B!@A !i-(1a)m*<=!@  B''.DT;q>6:%%d+%lL94LM &|\I5M N  x{FC  VD'',((-&&|4&&}5

"1
3:
<J
 F  ' QB$Bs   "O-;"O3r   )r@   NrG   N)r'   r(   r)   r*   r+   r   r   r"   r,   r-   rH   rI   rJ   r   r   r   	  s      O	$R Rr	   r   c                   sL   a a ] tR tRt oRtRV 3R lltR tR tR tRt	Vt
V ;t# )	HandlerStemit  z.
Handler for plots produced by `~.Axes.stem`.
c           	     s@   < \         SV `  ! RRVRVRV/VB  W0n        R# )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`.
r6   r7   rM   Nr2   )r3   r   _bottom)r   r6   r7   bottomrM   r8   r9   r   r   r   ZHandlerStem.__init__y  s5    " 	 	6J 	6) 	6"*	6.4	6r	   c                s    V P                   f$   VRVP                  ,          R,           ,          pV# V\        P                  ! V P                   4      ,          pV# r   rN   rP   rR   r   rS   ZHandlerStem.get_ydata  sK    >>!cF$;$;;cABE  RZZ77Er	   c	           	     s   Vw  rp\        V
\        P                  4      pV P                  WVWVV4      w  rV P	                  WVWVV4      pV P
                  f   RpMV P
                  p\        WR \        V4       4      pV P                  VW4       \        W4       UUu. uF  w  pp\        VV.VV.4      NK  	  pppV'       dO   \        P                  ! W P                  R7      ;_uu_ 4        V F  pV P                  VW4       K  	  R R R 4       M)\        VV
4       F  w  ppV P                  VVV4       K  	  \        \        P                  ! V4      \        P                  ! V4      .VV.4      pV P                  VW4       . VOVNVNpV F  pVP!                  V4       K  	  V# u uppi   + '       g   i     L; i)Nr&   )r   )Z
isinstancer   r   rF   rS   r   r   r]   r   r   r   Z_setattr_cm_copy_collection_propsrA   r   r   rb   )r   r   r   r   r   r   r   r    r%   Z
markerlineZ	stemlinesZbaselineZusing_linecollrD   rE   rQ   r   Zleg_markerliner   r   Zleg_stemlinesZlineZlmZmZleg_baseliner#   r   s   &&&&&&&&&                  r   r"   ZHandlerStem.create_artists  s    +6'
x $Iu/C/CD"nnVx-2HF v$h8 <<F\\F4FS5F.GH< &)%=?%=TQ  A4%= 	 ?  "",G,GI I)D$$T9= *I I ]I6A  Q/ 7 rvve}bffUm<%v.0x8@M@<@@F  ' -?I Is   F*.F00G 	c                s    VP                  VP                  4       ^ ,          4       VP                  VP                  4       ^ ,          4       R# )z\
Copy properties from the `.LineCollection` *orig_handle* to the
`.Line2D` *legend_handle*.
N)r   Z	get_colorr^   rz   r   r   r   r   Z"HandlerStem._copy_collection_props  s<    
 	 5 5 7 :;##K$=$=$?$BCr	   )r   )rG   NNN)r'   r(   r)   r*   r+   r   rS   r"   r   r,   r-   rH   rI   rJ   r   r   r   t  s&     *.`D Dr	   r   c                   s@   a a ] tR tRt oRtRV 3R lltR tRtVtV ;t	# )HandlerTuplei  z
Handler for Tuple.
c                s@   < Wn         W n        \        SV `  ! R/ VB  R# )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`.
Nr2   )_ndivide_padr3   r   )r   ndividerC   r8   r9   r:   r   r   ZHandlerTuple.__init__  s      	"6"r	   c	                s    VP                  4       p	V P                  f   \        V4      p
MV P                  p
V P                  f   VP                  V,          pMV P                  V,          pV
^8  d   W[V
^,
          ,          ,
          V
,          p\        W5V,           \        P                  ! V
4      ,          ,
          4      p. pV FC  pVP                  W4      pVP                  W\        V4      WEWgV4      pVP                  V4       KE  	  V# r   )Zget_legend_handler_mapr   r]   r   Z	borderpadr    rA   ZarangeZget_legend_handlerr"   r   Zextend)r   r   r   r   r   r   r   r    r%   Zhandler_mapr   rC   Z	xds_cycleZa_listZhandle1ZhandlerZ_a_lists   &&&&&&&&&        r   r"   ZHandlerTuple.create_artists  s     335== +&GmmG99""X-C))h&CQ;GaK00G;E(ckRYYw5G%GGH	"G//EG,,Y&EKG MM'" # r	   )r   r   )r?   N)
r'   r(   r)   r*   r+   r   r"   r,   r-   rH   rI   rJ   r   r   r     s     #  r	   r   c                   s0   a  ] tR tRt o RtR tR tRtV tR# )HandlerPolyCollectioni  zU
Handler for `.PolyCollection` used in `~.Axes.fill_between` and
`~.Axes.stackplot`.
c                s   R  pR pV! VP                  4       4      Vn        V! VP                  4       4      Vn        VP                  Vn        VP
                  Vn        VP                  4       Vn        VP                  4       Vn	        VP                  Vn
        VP                  V! VP                  4       4      4       VP                  V! VP                  4       4      4       VP                  V! VP!                  4       4      4       R# )c                 sL    V P                   ^ 8X  d   R# \        V ^ ,          4      # )rx   )rx   rx   rx   rx   )ZsizeZtuple)Zcolors   &r   first_colorZ7HandlerPolyCollection._update_prop.<locals>.first_color
  s#    {{a####r	   c                 s:    \        V 4      '       d
   V ^ ,          # R# r   )r]   )Z
prop_arrayr   r   	get_firstZ5HandlerPolyCollection._update_prop.<locals>.get_first  s    :!!}$r	   N)rv   Z
_facecolorry   Z
_edgecolorZ_original_facecolorZ_original_edgecolorr|   Z_fillr}   Z_hatchZ_hatch_colorr   r   r^   Zget_linestylesrb   Zget_transforms)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%=%="##Ik.H.H.J$KL##Ik.H.H.J$KL##Ik.H.H.J$KLr	   c	                sp    \        V) V) 3WVR 7      p	V P                  WV4       V	P                  V4       V	.# )rn   )r   r   rb   rr   rs   r   r"   Z$HandlerPolyCollection.create_artists%  s?     8)hY/!20	s
r	   r2   N)	r'   r(   r)   r*   r+   r   r"   r,   r-   r.   r0   r   r   r     s     M8 r	   r   )r+   Z	itertoolsr    ZnumpyrA   Z
matplotlibr   Zmatplotlib.linesr   Zmatplotlib.patchesr   Zmatplotlib.collectionsZcollectionsr   r   r
   r1   rK   rU   ri   rl   rt   r~   r   r   r   r   r   r   r   r2   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	   