+
    it                        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                 z    \        \        VP                  4       4      R 4      pVe   V P                  V4       R # R # N)nextiterget_childrenupdate_from)tgtsrcfirst_childs   && y/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/matplotlib/legend_handler.pyupdate_from_first_childr   (   s3    tC,,./6K$     c                   R   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                .    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)selfxpadypadupdate_funcs   &&&&r   __init__HandlerBase.__init__>   s     "&
DJ!,r   c                j    V P                   f   V P                  W4       R # V P                  W4       R # r   )r   _default_update_propr   legend_handleorig_handles   &&&r   _update_propHandlerBase._update_propM   s*    !!)%%mA""=>r   c                (    VP                  V4       R # r   )r   r    s   &&&r   r    HandlerBase._default_update_propS   s    !!+.r   c                    V P                  W4       VP                  V4       VP                  R 4       VP                  R 4       R # 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                    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_areaHandlerBase.adjust_drawing_area^   sS     jj833jj833

X--**x//500r   c                   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.

)r5   r0   r1   r2   r3   create_artistsget_transform
add_artist)r   r,   r"   r4   	handleboxr0   r1   r2   r3   artistsas   &&&&&      r   legend_artistHandlerBase.legend_artistg   s    * -1,D,D##Y%7%7)"2"2	-)E
 %%f&.%&.0G0G0IK
 A  #  qzr   c	                    \        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)NotImplementedError)	r   r,   r"   r0   r1   r2   r3   r4   transs	   &&&&&&&&&r   r8   HandlerBase.create_artists   s    . ""9::r   )r   r   r   )        rD   N)__name__
__module____qualname____firstlineno____doc__r   r#   r   r-   r5   r>   r8   __static_attributes____classdictcell____classdict__s   @r   r   r   .   s3     -?/*1#J; ;r   r   c                   F   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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__s   &&&,r   r   HandlerNpoints.__init__   s      	"6"#%r   c                N    V P                   f   VP                  # V P                   # r   )rS   rV   r   r,   s   &&r   get_numpointsHandlerNpoints.get_numpoints   s"    ??"###??"r   c                   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\   rT   nplinspace)r   r,   r0   r1   r2   r3   r4   rV   padxdataxdata_markers   &&&&&&&    r   	get_xdataHandlerNpoints.get_xdata   s    &&v.	q=""X-CKK	C!)	E 1C 7 )+E !L "" Y	E 12E%Ie34L""r   )rT   rS   )333333?N)rE   rF   rG   rH   rI   r   r\   rf   rJ   rK   __classcell__rX   rM   s   @@r   rO   rO      s     & ## #r   rO   c                   @   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                8   < \         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`.
rV   NrQ   )rR   r   	_yoffsets)r   rV   yoffsetsrW   rX   s   &&&,r   r   HandlerNpointsYoffsets.__init__   s     	7977!r   c                    V P                   f   WQP                  ,          pV# V\        P                  ! V P                   4      ,          pV# r   rn   _scatteryoffsetsra   asarrayr   r,   r0   r1   r2   r3   r4   ydatas   &&&&&&& r   	get_ydata HandlerNpointsYoffsets.get_ydata   s?    >>!444E  RZZ77Er   )rn   NN)
rE   rF   rG   rH   rI   r   rw   rJ   rK   ri   rj   s   @@r   rl   rl      s     
" r   rl   c                   *   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	                D   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_markersize
_legmarkerset_transform)r   r,   r"   r0   r1   r2   r3   r4   rB   rd   re   rv   leglinelegline_markernewszs   &&&&&&&&&      r   r8   $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   rQ   NrE   rF   rG   rH   rI   r8   rJ   rK   rL   s   @r   r{   r{      s     
) )r   r{   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	                   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)	markevery)rf   r\   ra   rb   r   r   r-   r   r   r   r   )r   r,   r"   r0   r1   r2   r3   r4   rB   rd   re   r   rv   r   r   s   &&&&&&&&&      r   r8   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   rQ   Nr   rL   s   @r   r   r     s      r   r   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                4   < \         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`.
NrQ   )rR   r   _patch_func)r   
patch_funcrW   rX   s   &&,r   r   HandlerPatch.__init__?  s    $ 	"6"%r   c           
     r    V P                   f   \        V) V) 3WVR7      pV# V P                  WW4WVVR7      pV# )Nxyr2   r3   )r,   r"   r0   r1   r2   r3   r4   )r   r   )	r   r,   r"   r0   r1   r2   r3   r4   ps	   &&&&&&&& r   _create_patchHandlerPatch._create_patchT  sV    #xi(3 %6A    *2',h ! PA r   c	           	     v    V P                  WW4WVV4      p	V P                  WV4       V	P                  V4       V	.# r   )r   r-   r   
r   r,   r"   r0   r1   r2   r3   r4   rB   r   s
   &&&&&&&&& r   r8   HandlerPatch.create_artists_  sA     v'5(L0	s
r   )r   r   )rE   rF   rG   rH   rI   r   r   r8   rJ   rK   ri   rj   s   @@r   r   r   :  s     &*	 r   r   c                   J   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                B    \        V) V) 3VW@P                  4       R 7      # ))r   r2   r3   color)r   get_facecolor)r"   r0   r1   r2   r3   s   &&&&&r   r   HandlerStepPatch._create_patchn  s*    hY	2% &.G.G.IK 	Kr   c                    \        ^ V.V^,          V^,          .V P                  4       V P                  4       V P                  4       R7      pVP	                  R4       VP                  R4       V# )    )r   	linestyle	linewidthr~   r   )r   get_edgecolorget_linestyleget_linewidthr   r   )r"   r2   r3   r   s   &&& r   _create_lineHandlerStepPatch._create_lines  sj     !UfQhq%9*88:#.#<#<#>#.#<#<#> 	i(2r   c	                    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_hatchr   r-   r   r   r   s
   &&&&&&&&& r   r8   HandlerStepPatch.create_artists  sm     !!k&;&;&=&I"";(#)+AQV4!!+f=A	s
r   rQ   N)rE   rF   rG   rH   rI   staticmethodr   r   r8   rJ   rK   rL   s   @r   r   r   i  s>      K K  
 
r   r   c                   6   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                N    V P                   f   VP                  # V P                   # r   rS   scatterpointsr[   s   &&r   r\   #HandlerLineCollection.get_numpoints  "    ??"'''??"r   c                    VP                  4       ^ ,          pVP                  ^ ,          pVP                  4       ^ ,          pVP                  V4       VP	                  V4       VP                  V4       R# r   N)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	                    V P                  WVWVV4      w  r\        P                  ! WV,
          ^,          4      p\        W4      pV P	                  WV4       VP                  V4       V.# )r}   )rf   ra   r   r   r-   r   )r   r,   r"   r0   r1   r2   r3   r4   rB   rd   re   rv   r   s   &&&&&&&&&    r   r8   $HandlerLineCollection.create_artists  sg     #nnVx-2HFUh%6!$;<&v6e$yr   rQ   N)
rE   rF   rG   rH   rI   r\   r   r8   rJ   rK   rL   s   @r   r   r     s     #( r   r   c                   X   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                8   < \         SV `  ! RR V/VB  W n        R# )ro   NrQ   )rR   r   _sizes)r   ro   sizesrW   rX   s   &&&,r   r   %HandlerRegularPolyCollection.__init__  s    5(5f5r   c                N    V P                   f   VP                  # V P                   # r   r   r[   s   &&r   r\   *HandlerRegularPolyCollection.get_numpoints  r   r   c                   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"   r0   r1   r2   r3   r4   handle_sizessize_maxsize_minrV   r   rngs   &&&&&&&&      r   r   &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                    V P                  W4       VP                  VP                  R R7      4       VP                  R4       VP	                  R4       R# )F)rootN)r#   
set_figure
get_figurer)   r*   r+   s   &&&&r   r-   (HandlerRegularPolyCollection.update_prop  sH    -5  !2!2!2!>?""4(##D)r   c                d    \        V4      ! VP                  4       VP                  4       VW4R 7      # ))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	           
        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   rw   r   r   listzipr-   set_offset_transform)r   r,   r"   r0   r1   r2   r3   r4   rB   rd   re   rv   r   r   s   &&&&&&&&&     r   r8   +HandlerRegularPolyCollection.create_artists  s     #nnVx-2HF v$h8 vH$h8 ""\12U # L 	0	u%s
r   )r   ry   )rE   rF   rG   rH   rI   r   r\   r   r-   r   r8   rJ   rK   ri   rj   s   @@r   r   r     s+     2
#**
 r   r   c                   *   a  ] tR tRt o RtR tRtV tR# )HandlerPathCollectioni  zDHandler for `.PathCollection`\s, which are used by `~.Axes.scatter`.c                V    \        V4      ! VP                  4       ^ ,          .VW4R7      # )r   )r   r   r   )r   	get_pathsr   s   &&&&&r   r   'HandlerPathCollection.create_collection  s-    K ""$Q'(
 	
r   rQ   NrE   rF   rG   rH   rI   r   rJ   rK   rL   s   @r   r   r     s     O
 
r   r   c                   *   a  ] tR tRt o RtR tRtV tR# )HandlerCircleCollectioni  z"Handler for `.CircleCollection`\s.c                (    \        V4      ! W#VR 7      # r   )r   r   s   &&&&&r   r   )HandlerCircleCollection.create_collection  s    K 5EG 	Gr   rQ   Nr   rL   s   @r   r   r     s     -G Gr   r   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
# )HandlerErrorbari	  zHandler for Errorbars.c                H   < Wn         W n        \        SV `  ! RR VRV/VB  R# )rU   rV   NrQ   )
_xerr_size
_yerr_sizerR   r   )r   	xerr_size	yerr_sizerU   rV   rW   rX   s   &&&&&,r   r   HandlerErrorbar.__init__  s)     $#NJN)NvNr   c                z    V P                   V,          pV P                  f   TpWx3# V P                  V,          pWx3# r   r   r  )	r   r,   r0   r1   r2   r3   r4   r  r  s	   &&&&&&&  r   get_err_sizeHandlerErrorbar.get_err_size  sC    OOh.	??"!I ## (2I##r   c	                   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 )r}   NFr~   noner   |_)rf   ra   r   r   rt   r   r  set_visibler-   r   r   r   r   r   r   has_xerrr   mcollLineCollectionappendhas_yerrr   )r   r,   r"   r0   r1   r2   r3   r4   rB   	plotlinescaplinesbarlinecolsrd   re   rv   r   ydata_markerr  r  r   r   handle_barlinecolshandle_caplinesxyvertscollcapline_leftcapline_rightr<   artists   &&&&&&&&&                      r   r8   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`   Nrh   N)rE   rF   rG   rH   rI   r   r  r8   rJ   rK   ri   rj   s   @@r   r   r   	  s      O	$R Rr   r   c                   L   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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`.
rU   rV   ro   NrQ   )rR   r   _bottom)r   rU   rV   bottomro   rW   rX   s   &&&&&,r   r   HandlerStem.__init__y  s5    " 	 	6J 	6) 	6"*	6.4	6r   c                    V P                   f$   VRVP                  ,          R,           ,          pV# V\        P                  ! V P                   4      ,          pV# r   rr   ru   s   &&&&&&& r   rw   HandlerStem.get_ydata  sK    >>!cF$;$;;cABE  RZZ77Er   c	           	        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)NrD   )r   )
isinstancer  r  rf   rw   r$  r   r   r-   r   r   _setattr_cm_copy_collection_propsra   r   r   r   )r   r,   r"   r0   r1   r2   r3   r4   rB   
markerline	stemlinesbaselineusing_linecollrd   re   rv   r%  leg_markerliner  r  leg_stemlineslinelmmleg_baseliner<   r  s   &&&&&&&&&                  r   r8   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                    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   	get_colorr   r   r    s   &&&r   r,  "HandlerStem._copy_collection_props  s<    
 	 5 5 7 :;##K$=$=$?$BCr   )r$  )rh   NNN)rE   rF   rG   rH   rI   r   rw   r8   r,  rJ   rK   ri   rj   s   @@r   r"  r"  t  s&     *.`D Dr   r"  c                   @   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                @   < 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`.
NrQ   )_ndivide_padrR   r   )r   ndividerc   rW   rX   s   &&&,r   r   HandlerTuple.__init__  s      	"6"r   c	                    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   )get_legend_handler_mapr>  r   r?  	borderpadr   ra   arangeget_legend_handlerr8   r   extend)r   r,   r"   r0   r1   r2   r3   r4   rB   handler_mapr@  rc   	xds_cyclea_listhandle1handler_a_lists   &&&&&&&&&        r   r8   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)
rE   rF   rG   rH   rI   r   r8   rJ   rK   ri   rj   s   @@r   r<  r<    s     #  r   r<  c                   0   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                   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                 L    V P                   ^ 8X  d   R# \        V ^ ,          4      # )r   )r   r   r   r   )sizetuple)colorss   &r   first_color7HandlerPolyCollection._update_prop.<locals>.first_color
  s#    {{a####r   c                 :    \        V 4      '       d
   V ^ ,          # R# r   )r   )
prop_arrays   &r   	get_first5HandlerPolyCollection._update_prop.<locals>.get_first  s    :!!}$r   N)r   
_facecolorr   
_edgecolor_original_facecolor_original_edgecolorr   _fillr   _hatch_hatch_colorr   r   r   get_linestylesr   get_transforms)r   r!   r"   rV  rZ  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%=%="##Ik.H.H.J$KL##Ik.H.H.J$KL##Ik.H.H.J$KLr   c	                p    \        V) V) 3WVR 7      p	V P                  WV4       V	P                  V4       V	.# )r   )r   r-   r   r   s
   &&&&&&&&& r   r8   $HandlerPolyCollection.create_artists%  s?     8)hY/!20	s
r   rQ   N)	rE   rF   rG   rH   rI   r#   r8   rJ   rK   rL   s   @r   rP  rP    s     M8 r   rP  )rI   	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<  rP  rQ   r   r   <module>ro     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   