+
    iR              	       
   ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIt^ RIt	^ RI
Ht ^ RIt^ RIHtHt ^ RIH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I"H#t# ^ RI$H%t& ^ RIH't' ^ RI(H)t) R	 t*R
 t+]! R.RR7      R 4       t,]! R.RR7      R 4       t-]! R.4      R 4       t.R t/R t0]! R.RR7      R 4       t1]! R.R]Pd                  ! 4       R8X  d   ^ MRR7      R 4       t3]! R.R]Pd                  ! 4       R8X  d   ^ MRR7      R 4       t4]! R.R]Pd                  ! 4       R8X  d   ^ MRR7      R  4       t5]! R!.R]Pd                  ! 4       R8X  d   ^ MRR7      R" 4       t6]! R#.RR$R7      R% 4       t7]! R&.R]Pd                  ! 4       R8X  d   ^ MR'R7      R( 4       t8]! R)R*.RR7      R+ 4       t9]! R,.RR7      R- 4       t:]! R..RR/R07      R1 4       t;R2 t<R3 t=]! R4.R57      R6 4       t> ! R7 R84      t? ! R9 R:4      t@R; tA]! R<.]Pd                  ! 4       R8X  d   ^ MR=R>7      R? 4       tBR@ tCRA tDRB tE]! RC.4      RD 4       tF]! RE.4      RF 4       tGRG tHRH tIRI tJRJ tK]! RK.RRL]Pd                  ! 4       R8X  d   ^ MRMRN7      RO 4       tLRP tMRQ tNRR tORS tPRT tQRU tR]P                  P                  RVR4      RW 4       tU]P                  P                  RXR4      RY 4       tV]P                  P                  RXR4      RZ 4       tW]P                  P                  RVR4      R[ 4       tX]P                  P                  R\R4      R] 4       tYR^ tZR_ t[R` t\Ra t]Rb t^Rc t_Rd t`Re taRf tbRg tcRh tdRi teRj tf]P                  P                  R\R4      Rk 4       tgRl thRm tiRn tjRo tkRp tl]P                  P                  Rq4      Rr 4       tn]P                  P                  RsR4      Rt 4       toRu tp]Rv 4       tqRw trRx ts]P                  P                  RyRzR{.R]	P                  ! RzR{.4      .4      R| 4       tu]P                  P                  R}R~^]v.4      R 4       tw]P                  P                  RyRzR{.R]	P                  ! RzR{.4      .4      R 4       txR tyR tzR t{R t|R t}R t~R tR t]! R4.R57      R 4       tR tR tR tR tR tR tR tR tR tR t]P                  P                  Rq4      R 4       tR tR tR tR tR# )    N)mock)assert_allclose)check_figures_equalimage_comparison)needs_usetex)HandlerTuple)
rc_context)FontPropertiesc                  *   \         P                  P                  ^
4      p \         P                  P                  ^
4      pR.^,          R.^,          ,           pR.^,          R.^,          ,           p\        P                  ! 4       w  rE\        WW#4       F  w  rgrVP                  WgWR7       K  	  VP                  4       w  r\        P                  ! \        W*4      4      pVP                  VP                  4       VP                  4       RR	R7       R# )

   abrglabelccenter left)locbbox_to_anchorN)         ?)nprandomrandnpltsubplotszipscatterget_legend_handles_labelscollectionsOrderedDictlegendvalueskeys)XYlabelscolorsfigaxxyr   colorhandlesr#   s               |/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/matplotlib/tests/test_legend.pytest_legend_ordereddictr1      s     			A
		AUQY#"FUQY#"FllnGC!!7e


1u
. 8 224OG$$S%9:FIIfmmov{{}  9    c                      \         P                  ! 4       w  rVP                  ^ ^.4       VP                  ^ ^.4       R VP                  4        4       pR R 4       pVP	                  W#RR7       R# )r   c              3   $   "   T F  qx  K  	  R # 5iN ).0lines   & r0   	<genexpr>(test_legend_generator.<locals>.<genexpr>3   s     /t   c              3   $   "   T F  qx  K  	  R # 5ir5   r6   )r7   r   s   & r0   r9   r:   4   s     2!1e!1r;   
upper leftr   N)spameggs)r   r   plot	get_linesr#   )r*   r+   r/   r(   s       r0   test_legend_generatorrC   -   sX    llnGCGGQFOGGQFO//G2!12FIIg<I0r2   zlegend_auto1.pngT)remove_textc                     \         P                  ! 4       w  r\        P                  ! ^d4      pVP	                  V^2V,
          RRR7       VP	                  W"^2,
          RRR7       VP                  RR7       R# )Test automatic legend placementoy=1r   y=-1bestr>   N)r   r   r   arangerA   r#   )r*   r+   r,   s      r0   test_legend_auto1rM   9   sZ     llnGC
		#AGGArAvs%G(GGA2vs&G)II&Ir2   zlegend_auto2.pngc                    \         P                  ! 4       w  r\        P                  ! ^d4      pVP	                  W"RRR7      pVP	                  W"RRR
1,          RRR7      pVP                  V^ ,          V^ ,          .RR.RR	7       R# )rF   edgem)alignr.   Nr   updownrK   r>   )r   r   r   rL   barr#   )r*   r+   r,   b1b2s        r0   test_legend_auto2rX   C   sp     llnGC
		#A	F#	.B	TrT7&	4BIIr!ubentVn&I9r2   zlegend_auto3.pngc                     \         P                  ! 4       w  r. R	Op. R
OpVP                  W#RRR7       VP                  RR4       VP	                  RR4       VP                  RR7       R# )rF   o-r8   rI                 ?rK   r>   N?皙?r_   r^   r^   r   ffffff?ra   皙?rb   r   r   )r   r   rA   set_xlimset_ylimr#   )r*   r+   r,   r-   s       r0   test_legend_auto3re   M   sW     llnGC&A*AGGA$fG%KKSKKSII&Ir2   c                    \         P                  ! ^RR7      w  r. p\        VP                  R4       F  w  r4VP	                  V4       VP                  ^ .^^	.,          ,           \        ^
4      RVR7       VP                  RR7      pV P                  P                  4        VP                  VP                  4       P                  VP                  P                  4       4      4       K  	  \        V^,          P                   V^ ,          P                   4       \        V^,          P                   V^ ,          P                   4       R# )	z~
Check that the legend location with automatic placement is the same,
whatever the histogram type is. Related to issue #9580.
ncolsfigsizeLegend)binsr   histtyperK   r>   N)g@g333333@)rU   step
stepfilled)r   r   r   flat	set_titlehistranger#   canvasdrawappendget_window_extenttransformed	transAxesinvertedr   bounds)r*   axs
leg_bboxesr+   htlegs         r0   test_legend_auto4r   Y   s     ||!Z8HCJchh =>
R
ae%)8bIiiFi#

!!#//0E0E0GH	J ? JqM((*Q-*>*>?JqM((*Q-*>*>?r2   c                    \         P                  ! ^RR7      w  r. p\        VP                  R4       EF$  w  r4\        P
                  ! RRRRR7      \        P                  ! \        P                  ! ^ ^.^ ^ .^^ .^^.RR.RR	.R	R	.R	R.R	R..	4      RR
7      \        P                  ! RR^ RRRR7      3 F  pVP                  V4       K  	  VP                  R	R.RR.RR7       VP                  VR7      pV P                  P                  4        VP                  VP!                  4       P#                  VP$                  P'                  4       4      4       EK'  	  \)        V^,          P*                  V^ ,          P*                  4       R# )zu
Check that the automatic placement handle a rather complex
case with non rectangular patch. Related to issue #9580.
rg   r   r^   皙?皙?C1)xywidthheightfcr\   r_   )r   ih  rb   C0)r   r   z	A segmentrI   r>   N)g333333#@g333333@centerrK   )r   r^   )r   r   )r   r   r   ro   mpatchesEllipsePolygonr   arrayWedge	add_patchrA   r#   rs   rt   ru   rv   rw   rx   ry   r   rz   )r*   r{   r|   r+   r   _patchr~   s          r0   test_legend_auto5r   o   sf   
 ||!Z8HCJsxx!34
   !STC  FQFQFQFS#Jc
#Jc
S#J+8 "9=AC z33dtLF LL  	c
S#Jk:iiCi 

!!#//0E0E0GH	J% 5* JqM((*Q-*>*>?r2   zlegend_various_labels.pngc                  n   \         P                  ! 4       p V P                  ^y4      pVP                  \        P
                  ! ^4      R^R7       VP                  \        P                  ! ^R4      RRR7       VP                  \        P
                  ! ^^R	4      RRR7       VP                  ^RR7       R# )
y   rG   rI   gffffff@u   Développés__nolegend__rK   )	numpointsr   NrT   )r   figureadd_subplotrA   r   rL   linspacer#   r*   r+   s     r0   test_various_labelsr      s     **,C		BGGBIIaL#QG'GGBKK3NG;GGBIIaBNG;IIvI&r2   zlegend_labels_first.pngx86_64g9v?)rD   tolc                  \   \         P                  ! 4       w  rVP                  \        P                  ! ^
4      R^R7       VP                  \        P
                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^^
R4      RRR7       VP                  RRR	7       R
# )r   -orI   z:xr,   ddiamondrK   F)r   markerfirstNrT   )r   r   rA   r   rL   onesr#   r   s     r0   test_labels_firstr      sx     llnGCGGBIIbM4qG)GGBGGBKM4sG+GGBIIb"b!3iG8II&eI,r2   zlegend_multiple_keys.pngc                  &   \         P                  ! 4       w  rVP                  . ROR4      w  pVP                  . R	OR4      w  pVP                  . R
OR4      w  pVP                  W#3W23V.. RO^W#3\	        RR7      W23\	        R^ R7      /R7       R# )r   r   z-xz-dN)ndivide)r   pad)r   handler_mapr         r   r      r   r      )ztwo keyszpad=0zone key)r   r   rA   r#   r   )r*   r+   p1p2p3s        r0   test_multiple_keysr      s     llnGC
'')T
"CB
'')T
"CB
'')T
"CBIIx"2&(H8\$%?8\$A%FH  Ir2   zrgba_alpha.pnggQ?c                      \         P                  ! 4       w  rVP                  \        ^
4      ^R7       \         P                  ! R.RR7      pVP
                  P                  . RO4       R# )r   lwLonglabel that will go awayr   r>   Nr   r   r   r   )r   r   rA   rr   r#   legendPatchset_facecolorr*   r+   r~   s      r0   test_alpha_rgbar      sK     llnGCGGE"I!G
**34(
CCOO!!.1r2   zrcparam_alpha.pngc                  T   \         P                  ! 4       w  rVP                  \        ^
4      ^R7       \        P
                  ! RR/R7      ;_uu_ 4        \         P                  ! R.RR7      pVP                  P                  . R	O4       RRR4       R#   + '       g   i     R# ; i)
r   r   zlegend.framealphag      ?)rcr   r   r>   Nr   )	r   r   rA   rr   mplr	   r#   r   r   r   s      r0   test_alpha_rcparamr      sq     llnGCGGE"I!G	/5	6	6jj78hG
 	%%n5 
7	6	6	6s   7BB'	z	fancy.pngrb   c            	         \         P                  ! ^y4       \         P                  ! ^.^
,          RRR7       \         P                  ! \        P
                  ! ^
4      \        P
                  ! ^
^ R4      RR7       \         P                  ! \        P
                  ! ^
4      \        P
                  ! ^
4      RRRR7       \         P                  ! RRR.^R	R
^R7       R# )r   zo--XXrI   zXX
XXr   )xerryerrr   r   r\   T	My legend)r   r   rh   shadowtitler   NrT   )r   subplotrA   r   r   rL   errorbarr#   r6   r2   r0   
test_fancyr      s    
 KKHHaS2XuD)KK		"ryyQ38DLL2		"C'JJ=#st;!Er2   
framealphag~jt?c                      \         P                  ! ^^d^d4      p T p\        P                  ! WR^
R7       \        P                  ! RR7       R# )r   mylabel)r   r   r   )r   N)r   r   r   rA   r#   )r,   r-   s     r0   test_framealphar      s7     	AsC A	AHHQr*JJ#r2   zscatter_rc3.pngzscatter_rc1.pngc                  (   \         P                  ! 4        \         P                  ! ^y4      p V P                  \        P
                  ! ^
4      \        P
                  ! ^
^ R4      RR7       V P                  RRR.RR7       ^\        P                  R&   \         P                  ! 4        \         P                  ! ^y4      p V P                  \        P
                  ! ^
4      \        P
                  ! ^
^ R4      R	R7       V P                  RRR.RR7       R
# )r   threerI   r   r\   r   r   )r   r   r   zlegend.scatterpointsoneNrT   )	r   r   r   r   r   rL   r#   r   rcParams)r+   s    r0   test_rcr      s     JJL	S	BJJryy}biiAr2'JBII-c
  ! ,-CLL'(JJL	S	BJJryy}biiAr2%J@II-c
  !r2   zlegend_expand.pngc                    RR.p \         P                  ! \        V 4      ^4      w  r\        P                  ! ^d4      p\        W 4       F  w  rEVP                  V^2V,
          RRR7       VP                  RVR7      pVP                  V4       VP                  W3^2,
          RRR7       VP                  R	VR7      pVP                  V4       VP                  R
V^R7       K  	  R# )zTest expand modeNexpandrG   rH   rI   r=   )r   moderJ   right
lower left)r   r   rh   )	r   r   lenr   rL   r   rA   r#   
add_artist)legend_modesr*   r{   r,   r+   r   l1l2s           r0   test_legend_expandr      s     (#L||C-q1HC
		#A*
263e,YY<dY3
b
r63f-YY7Y.
b
		lQ	7 +r2   hatchingdefault)rD   stylec            
         ^\         P                  R&   \         P                  ! 4       w  r\         P                  ! RRRRRR7      pVP	                  V4       \         P                  ! RRRRRRR	7      pVP	                  V4       \         P                  ! RRRRR
RR7      pVP	                  V4       \         P                  ! RRRRR
RRR7      pVP	                  V4       VP                  . RO. RO. RORRR7       VP                  . RO. RO. RORRRR	7       VP                  RR4       VP                  RR4       VP                  ^^R7       R# )   ztext.kerning_factor333333?xxzPatch
default color
filled)hatchr   z||r   zPatch
explicit color
filled)r   	edgecolorr   FzPatch
default color
unfilled)r   fillr   zPatch
explicit color
unfilled)r   r   r   r   +zPath
default colorC2zPath
explicit color皙?)handlelengthhandleheightN)r   r   )Q?r   )r   皙?)r   r   )r   g333333?r   )r   r   r   )r^   r\   r^   )r   gQ?g)\(?g{Gz)	r   r   r   	Rectangler   fill_betweenrc   rd   r#   )r*   r+   patchs      r0   test_hatchingr     s2    +,CLL&'llnGC MM&#s$ >@ELLMM)S#TT ?AELLMM(CDu @BELLMM+sCt%$( ACE LL OOL,%:  <OOO\=5K  M KKsKKsII11I-r2   c                  <   \         P                  ! 4       w  rVP                  \        ^
4      4      pV P	                  VR4      pVP                  4        V P                  . 8X  g   Q hVP	                  R4      pVP                  4        VP                  4       e   Q hR# )r   testN)r   r   rA   rr   r#   removelegends
get_legend)r*   r+   linesr~   s       r0   test_legend_remover   $  su    llnGCGGE"IE
**UF
#CJJL;;"
))F
CJJL==?"""r2   c                 d   \         P                  ! 4       w  r^p^p. ROp. ROpVP                  W#V^ ,          V^ ,          R7       VP                  W#V^,          V^,          R7       VP                  W#V^,          V^,          R7       VP                  RR7      pVP	                  4        Uu. uF  qwP                  4       NK  	  ppVP                   U	u. uF  qP                  4       NK  	  p
p	V\        \        V4      4      8X  g   Q hV
\        \        V4      4      8X  g   Q hR# u upi u up	i )z6Check that the legend handles and labels are reversed.rI   TreverseN)zFirst labelzSecond labelzThird label).,rG   )
r   r   rA   r#   	get_textsget_textlegend_handles
get_markerlistreversed)r*   r+   r,   r-   r(   markersr~   tactual_labelshactual_markerss              r0   &test_reverse_legend_handles_and_labelsr  /  s    llnGC	A	A;FGGGA'!*F1IG.GGA'!*F1IG.GGA'!*F1IG.
))D)
!C+.==?;?aZZ\?M;.1.@.@A.@lln.@NAD&!12222T(7"34444 <As   .D(D-png)
extensionsc                2   V P                  4       pVP                  ^.RRR7       VP                  ^.RRR7       VP                  RR7       VP                  4       pVP                  ^.RRR7       VP                  ^.RRR7       VP                  4        R# )	z3Check that the rendered legend entries are reversedrofirstrI   bxsecondTr   N)r   rA   r#   )fig_testfig_refr+   s   && r0   test_reverse_legend_displayr  A  s     
			BGGQCWG%GGQCXG&IIdI				BGGQCXG&GGQCWG%IIKr2   c                   b   a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tRtV tR# )TestLegendFunctioniO  c                4   \         P                  ! \        ^
4      RR7      p\        P                  ! R4      ;_uu_ 4       p\         P
                  ! 4        RRR4       XP                  \         P                  ! 4       VR.4       R#   + '       g   i     L9; i)r   hello worldrI   matplotlib.legend.LegendNr   rA   rr   r   r   r#   assert_called_withgcaselfr   rj   s   &  r0   test_legend_no_args&TestLegendFunction.test_legend_no_argsQ  sY    r-8ZZ233vJJL 4!!#'')U]OD 43s    BB	c                6   \         P                  ! \        ^
4      4      p\        P                  ! R4      ;_uu_ 4       p\         P
                  ! VR.4       RRR4       XP                  \         P                  ! 4       VR.4       R#   + '       g   i     L9; i)r   r  r  Nr  r  s   &  r0   %test_legend_positional_handles_labels8TestLegendFunction.test_legend_positional_handles_labelsW  s^    r#ZZ233vJJu}o. 4!!#'')U]OD 43s   BB	c                    \         P                  ! \        ^
4      4      p\        P                  ! \
        RR7      ;_uu_ 4        \         P                  ! V4       RRR4       R#   + '       g   i     R# ; i)r   zbut found an ArtistmatchN)r   rA   rr   pytestraises	TypeErrorr#   )r  r   s   & r0   #test_legend_positional_handles_only6TestLegendFunction.test_legend_positional_handles_only]  sD    r#]]9,ABB JJu CBBBs   A%%A6	c                8   \         P                  ! \        ^
4      RR7      p\        P                  ! R4      ;_uu_ 4       p\         P
                  ! R.4       RRR4       XP                  \         P                  ! 4       VR.4       R#   + '       g   i     L9; i)r   r  rI   r  foobarNr  r  s   &  r0   "test_legend_positional_labels_only5TestLegendFunction.test_legend_positional_labels_onlyd  s^    r-8ZZ233vJJz" 4!!#'')UXJ? 43s    B		B	c                B   \         P                  ! \        ^
4      RR7      p\        P                  ! R4      ;_uu_ 4       p\         P
                  ! VR.RR7       RRR4       XP                  \         P                  ! 4       VR.RR7       R#   + '       g   i     L;; i)r   r  rI   r  r.  r   r>   Nr  r  s   &  r0   test_legend_three_args)TestLegendFunction.test_legend_three_argsj  sg    r-8ZZ233vJJuxjg6 4!!#'')UXJG!L 43s    BB	c                R   \         P                  ! \        ^
4      RR7      p\        P                  ! R4      ;_uu_ 4       pVR.3Vn        \         P                  ! R^/R7       RRR4       XP                  \         P                  ! 4       .R^/4       R#   + '       g   i     L:; i)r   r  rI   z,matplotlib.legend._get_legend_handles_labels1)r   N)	r   rA   rr   r   r   return_valuer#   r  r  )r  r   handles_labelss   &  r0   test_legend_handler_map*TestLegendFunction.test_legend_handler_mapp  s|    r-8ZZ 5 6 69G*/-*@N'JJC8,6 	))3779+Qx@	6 6s    $BB&	c                   \         P                  ! 4       w  r\        P                  ! ^ ^^4      pVP	                  W3RR7      w  pVP	                  V^V,          RR7      w  pVP	                  V^V,          RR7      w  p\
        P                  ! R4      ;_uu_ 4       pVP                  We.R7       RRR4       XP                  W&V.RR.4       R#   + '       g   i     L(; i)r   r,   rI   2x3xr  )r/   N	r   r   r   r   rA   r   r   r#   r  )r  r*   r+   r,   ln1ln2ln3rj   s   &       r0   test_legend_kwargs_handles_only2TestLegendFunction.test_legend_kwargs_handles_onlyx  s    ,,.KK1b!wwq3w'wwq!A#Tw*wwq!A#Tw*ZZ233vIIsjI) 4!!"Cj4,? 43s   CC!	c                   \         P                  ! 4       w  r\        P                  ! ^ ^^4      pVP	                  W34      w  pVP	                  V^V,          4      w  p\
        P                  ! R4      ;_uu_ 4       pVP                  RR.R7       RRR4       XP                  W$V.RR.4       R#   + '       g   i     L(; i)r   r  r,   r;  r(   Nr=  )r  r*   r+   r,   r>  r?  rj   s   &      r0   test_legend_kwargs_labels_only1TestLegendFunction.test_legend_kwargs_labels_only  s    ,,.KK1b!wwq}wwq!A#ZZ233vIIc4[I) 4!!"Cj3+> 43s   <B11C	c                   \         P                  ! 4       w  r\        P                  ! ^ ^\        P                  ,          R4      pVP                  V\        P                  ! V4      RR7      w  pVP                  V\        P                  ! V4      RR7      w  p\        P                  ! R4      ;_uu_ 4       pVP                  RWT3R7       RRR4       XP                  W%V3R4       R#   + '       g   i     L&; i)	r      sinrI   cosr  )r(   r/   Nr   r   )r   r   r   r   pirA   rI  rJ  r   r   r#   r  )r  r*   r+   thlnslncrj   s   &      r0   !test_legend_kwargs_handles_labels4TestLegendFunction.test_legend_kwargs_handles_labels  s    ,,.[[AbeeGT*wwr266":Uw3wwr266":Uw3ZZ233vIIZ#I< 4 	!!"Cj*= 43s   7C**C:	c                d   \         P                  ! 4       w  r\        P                  ! ^ ^\        P                  ,          R4      pVP                  V\        P                  ! V4      RR7      w  pVP                  V\        P                  ! V4      RR7      w  p\        P                  ! \        4      ;_uu_ 4       pVP                  WT3RR7       RRR4       \        X4      ^8X  g   Q h\        V^ ,          P                  4      P                  R4      '       g   Q hR#   + '       g   i     LW; i)	r   rH  rI  rI   rJ  rD  NMYou have mixed positional and keyword arguments, some input may be discarded.rK  )r   r   r   r   rL  rA   rI  rJ  r(  warnsDeprecationWarningr#   r   strmessage
startswith)r  r*   r+   rM  rN  rO  records   &      r0   test_warn_mixed_args_and_kwargs2TestLegendFunction.test_warn_mixed_args_and_kwargs  s    ,,.[[AbeeGT*wwr266":Uw3wwr266":Uw3\\,--IIsjI4 .6{a6!9$$%00  	  .-s   ;DD/	c                t   ^ RI Hp V! ^o4      pVP                  4       pVP                  . RO. RORR7      w  pVP                  . RO. RORR7      w  p\        P
                  ! R4      ;_uu_ 4       p\        P                  ! 4        RRR4       XP                  W$V.RR.4       R#   + '       g   i     L(; i)	r   )host_subplotDensityrI   Temperaturer  Nr   r   r   )r   r   r   )	mpl_toolkits.axes_grid1r]  twinxrA   r   r   r   r#   r  )r  r]  hostparr   r   rj   s   &      r0   test_parasite TestLegendFunction.test_parasite  s    8C jjlii	9Ii>hhy)=hAZZ233vJJL 4!!$R9m2LM 43s   1B''B7	r6   N)__name__
__module____qualname____firstlineno__r   r#  r+  r/  r2  r8  rA  rE  rP  rZ  re  __static_attributes____classdictcell____classdict__s   @r0   r  r  O  sI     EE@MA@?>
N Nr2   r  c                   D   a  ] tR tRt o R tR tR tR tR tR t	Rt
V tR	# )
TestLegendFigureFunctioni  c                @   \         P                  ! 4       w  rVP                  \        ^
4      4      p\        P
                  ! R4      ;_uu_ 4       pVP                  VR.4       RRR4       XP                  WR.VP                  R7       R#   + '       g   i     L1; i)r   r  r  Nbbox_transform	r   r   rA   rr   r   r   r#   r  transFigurer  r*   r+   r   rj   s   &    r0   test_legend_handle_label1TestLegendFigureFunction.test_legend_handle_label  sr    ,,.b	"ZZ233vJJu}o. 4!!#}o14 	" 	B 43s   BB	c                >   \         P                  ! 4       w  rVP                  \        ^
4      RR7      p\        P
                  ! R4      ;_uu_ 4       pVP                  4        RRR4       XP                  WR.VP                  R7       R#   + '       g   i     L1; i)r   r  rI   r  Nrr  rt  rv  s   &    r0   r   ,TestLegendFigureFunction.test_legend_no_args  so    ,,.b	7ZZ233vJJL 4!!#}o14 	" 	B 43s   BB	c                >   \         P                  ! 4       w  rVP                  \        ^
4      4      p\        P
                  ! R4      ;_uu_ 4       pVP                  R.4       RRR4       XP                  WR.VP                  R7       R#   + '       g   i     L1; i)r   r  r.  Nrr  rt  rv  s   &    r0   test_legend_label_arg.TestLegendFigureFunction.test_legend_label_arg  sp    ,,.b	"ZZ233vJJz" 4!!#xj14 	" 	B 43s   BB	c           	        \         P                  ! 4       w  rVP                  \        ^
4      4      p\        P
                  ! \        RR7      ;_uu_ 4        VP                  VR.R4       RRR4       \        P
                  ! \        RR7      ;_uu_ 4        VP                  VR.RRR7       RRR4       R#   + '       g   i     LU; i  + '       g   i     R# ; i)r   z0-2r&  r.  r   Nleftr>   )r   r   rA   rr   r(  r)  r*  r#   )r  r*   r+   r   s   &   r0   test_legend_label_three_args5TestLegendFigureFunction.test_legend_label_three_args  s    ,,.b	"]]9E22JJuxj'2 3]]9E22JJuxj'vJ> 32 32222s   B8C8C	C	c                   \         P                  ! ^^4      w  rV^ ,          P                  \        ^
4      4      pV^,          P                  \        P
                  ! ^
4      R,          4      p\        P                  ! R4      ;_uu_ 4       pVP                  RRW43R7       RRR4       XP                  WV3RRVP                  R7       R#   + '       g   i     L3; i)r          @r  r   )r   r(   r/   N)r   rs  rK  )r   r   rA   rr   r   rL   r   r   r#   r  ru  )r  r*   r{   r   lines2rj   s   &     r0   test_legend_kw_args,TestLegendFigureFunction.test_legend_kw_args  s    <<1%AE"I&QRYYr]R/0ZZ233vJJ7:JO 4!!*'?? 	" 	, 43s   CC	c                   \         P                  ! ^^4      w  rV^ ,          P                  \        ^
4      4      pV^,          P                  \        P
                  ! ^
4      R,          4      p\        P                  ! \        4      ;_uu_ 4       pVP                  W43RR7       RRR4       \        X4      ^8X  g   Q h\        V^ ,          P                  4      P                  R4      '       g   Q hR#   + '       g   i     LW; i)r   r  rD  NrS  rK  )r   r   rA   rr   r   rL   r(  rT  rU  r#   r   rV  rW  rX  )r  r*   r{   r   r  rY  s   &     r0   test_warn_args_kwargs.TestLegendFigureFunction.test_warn_args_kwargs  s    <<1%AE"I&QRYYr]R/0\\,--JJzJ: .6{a6!9$$%00  	  .-s   C44D	r6   N)rg  rh  ri  rj  rw  r   r|  r  r  r  rk  rl  rm  s   @r0   rp  rp    s+     BBB?,	 	r2   rp  c                  B   R U u. uF  p RV ,           NK  	  pp TR U u. uF  p RV ,           NK  	  up ,          pTR U u. uF  p RV ,           NK  	  up ,          pTR U u. uF  p RV ,           NK  	  up ,          p. ROp. ROp. ROp. ROpW"VW3VWDVWUV.p. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO.p\        V4       F  w  r\        V	4       \        P                  ! R^dR7      w  rVP	                  \        ^
4      RR7       V
P                  R	V	,           R
7      pV
P                  4        \        VP                  4       P                  Wh,          4       \        VP                  4       P                  Wx,          4       K  	  R# u up i u up i u up i u up i )r  zupper zlower zleft zright T)constrained_layoutdpiBoo1rI   zoutside r>   N)r  r   r   )lowerr   upper)QnX4@Qn;@l@gE@)r  g Q@r  lf@)gLNb@r  r  r  )r  r  gE@r  )      $@     X@     `@     p@)     (u@r       |@r  )  r       @r  )r  r  r       F@)r  r  r  r  )     ؄@r  r  r  )r       q@r       s@)r  r  r  r  )r  r  r  r  )r  r  r  r  )	enumerateprintr   r   rA   rr   r#   draw_without_renderingr   rv   extents)postodosupperextlowerextleftextrightextaxbblegbbnntodor*   r{   r~   s                r0   test_figure_legend_outsider    s   'BC'BX^^'BEC	(CD(Chnn(CDDE	'CD'Cgmm'CDDE	(DE(Dhnn(DEEE8H8H7G8Hg*D
 %'%#&$"&$"'%'E e$d<<4SAr&)jjZ$.j/""$--/77	"--/77		# %7 DDDEs   FFFFzlegend_stackplot.pnggX9v?)r   c                 J   \         P                  ! 4       w  r\        P                  ! ^ ^
^
4      pRV,          pRV,          ^,           pRV,          ^,           pVP	                  W#WE. ROR7       VP                  R	4       VP                  R
4       VP                  RR7       R# )z/Test legend for PolyCollection using stackplot.r\   r  g      @rD  rK   r>   N)y1y2y3)r   r   )r   F   )r   r   r   r   	stackplotrc   rd   r#   )r*   r+   r,   r  r  r  s         r0   test_legend_stackplotr    s    
 llnGC
Ar2A	qB	q1B	q1BLL'9L:KKKKII&Ir2   c                      \         P                  ! 4       w  r\         P                  ! 4       w  r#VP                  \        ^4      \        ^4      4      pVP	                  VR4       R# )r   fooN)r   r   rU   rr   r#   )r*   r+   fig2ax2brss        r0   test_cross_figure_patch_legendr     sB    llnGCID
&&q58
$CKKUr2   c                     \         P                  ! 4       w  rVP                  \        P                  .\        P                  .R RR^R7      pVP                  V.R.4       \         P                  ! 4       w  rR Fc  pRp\        P                  P                  ^V4      w  rVR\        P                  P                  V4      ,          pVP                  WVW7VRRR7       Ke  	  VP                  4        VP                  R	4       R
# )rG   r   )marker	facecolorr   sr   i  g      i@r   none)r   r  r   alpha
edgecolorsTN)redgreenblue)	r   r   r   r   nanr#   r   randgrid)r*   r+   r	  r.   nr,   r-   scales           r0   test_nanscatterr  (  s    llnGC


BFF8bffXc C1 	 	6A IIqcI;llnGC)yy~~a#		q))


15 	 	1	 * IIKGGDMr2   c                     \         P                  ! 4       w  rVP                  R RRRRR7       VP                  RR RRRR7       VP                  4        \        P
                  ! V.4      w  r#\        V4      ^8X  g   Q h\         P                  ! 4       w  rVP                  R RRRRR7       VP                  RR RRRR7       VP                  4        \        P
                  ! V.4      w  r#\        V4      ^8X  g   Q hR	# )
r[   r\   krG   r   )r.   r  r   r   r   vN)r   r   r   r#   mlegend_get_legend_handles_labelsr   )r*   r+   handlabs       r0   test_legend_repeatcheckokr  <  s    llnGCJJsCs3fJ=JJsCs3fJ=IIK22B48IDs8q==llnGCJJsCs3fJ=JJsCs3fJ=IIK22B48IDs8q==r2   znot_covering_scatter.pngc                  <   . ROp \        ^4       F$  p\        P                  ! V.V.W,          R7       K&  	  \        P                  ! . RORR7       \        P                  ! 4       P                  RR4       \        P                  ! 4       P                  RR4       R# )	r   )r.   rK   r>   皙@N)r   r   r   )r  r  r  g      )rr   r   r   r#   r  rc   rd   )r)   r  s     r0   test_not_covering_scatterr  K  sh    F1XQC!FI.  JJ$&1GGItS!GGItS!r2   z"not_covering_scatter_transform.pngc                  ^   \         P                  ! 4       P                  R^4      p \        P                  ! ^ ^R4      p\
        P                  ! W4       \
        P                  ! ^.^
.V \
        P                  ! 4       P                  ,           R7       \
        P                  ! RR.RR7       R# )	   i  )	transformr  rU   rK   r>   Ni)mtransformsAffine2D	translater   r   r   rA   r   r  	transDatar#   )offsetr,   s     r0   #test_not_covering_scatter_transformr  W  ss     !!#--c26F
Ar4 AHHQNKKrdfswwy/B/B&BCJJu~6*r2   c                  J   RR.RR..p RR.RR..RR.RR...pRR.RR..RR.RR...p\         P                  ! V R^R	7      p\         P                  ! VR
R7      p\         P                  ! VRRR	7      p\        P                  ! 4       w  rgVP	                  V4       VP	                  V4       VP	                  V4       VP                  W4V.. RO4      pVP                  w  rp\        W4V3WV34       F-  w  rVP                  4       ^ ,          VP                  8X  d   K-  Q h	  R# )r   r   333333?r   gffffff?r   r   r_   z--)
linestylesr   z-.)r  :N)r   r   )r   r   )r   r  )r   r   )line1line2zline 3)
mcollectionsLineCollectionr   r   add_collectionr#   r  r   get_linestyles_dash_pattern)lines1r  lines3lc1lc2lc3r*   r+   r~   h1h2h3ohlhs                 r0   !test_linecollection_scaled_dashesr  c  s0    8X"67FRy2r(#r2hR%9:FRy2r(#r2hR%9:F

%
%f!
DC

%
%f
>C

%
%f
DCllnGCccc
))SsO%A
BC##JBBso|4  "1%)9)9999 5r2   c                     \         P                  ! 4       w  rVP                  \        ^4      RR7       VP	                  RR7       R# )z(Test legend handler with numpoints <= 1.r   rI   r   r   N)r   r   rA   rr   r#   r   s     r0   test_handler_numpointsr  w  s3     llnGCGGE!HFG#IIIr2   c                    \         P                  ! 4       w  rVP                  ^ .RR7       VP                  ^ ^ RRR7       \        P
                  ! \        4      ;_uu_ 4       pVP                  4        RRR4       \        X4      ^8X  g   Q h\         P                  ! 4       w  r1VP                  \        P                  P                  ^ ^R4      4       \        P                  ! 4       ;_uu_ 4        \        P                  ! R4       VP!                  4        RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)	z2Test that Text artists with labels raise a warning	mock datarI   textr   )r,   r-   r  r   Nerror)r   r   )r   r   rA   r  r(  rT  UserWarningr#   r   
pcolormeshr   r   uniformwarningscatch_warningssimplefilterr    )r*   r+   rY  fs       r0   test_text_nohandler_warningr    s    llnGCGGQC{G#GGa1gG.	k	"	"f
		 
#v;! LLNEAMM"))##Aq(34		 	 	"	"g&
$$& 
#	" 
#	" 
#	"	"s   #D#2'D6#D3	6E	c                 b    \         P                  ! . . RR7       \         P                  ! 4        R# )z1Test legend when bar chart is empty with a label.r   rI   N)r   rU   r#   r6   r2   r0    test_empty_bar_chart_with_legendr    s     GGB&!JJLr2   zshadow_argument_types.pngmpl20gy&1?)rD   r   r   c                     \         P                  ! 4       w  rVP                  . RORR7       VP                  RRR7      VP                  RRR7      VP                  RR	R
RR/R7      VP                  RR	RRR/R7      VP                  RR	RR^
/R7      3pV F  pVP	                  V4       K  	  VP                  RR7       R# )r   r   rI   r=   Tr   r   upper rightFr   r.   r  r  r_   center rightoyr   ztab:cyanoxlower rightr>   Nr   )r_   r   r   )r   r   rA   r#   r   )r*   r+   legsls       r0   test_shadow_argument_typesr    s     llnGCGGIVG$ II,tI4II-I6II-%ugs;  =II.%bA  CII,%z4<  >D 
a II-I r2   c                     \         P                  ! 4       w  rVP                  . R	ORR7       \        P                  ! \
        RR7      ;_uu_ 4        VP                  RRR7       RRR4       R#   + '       g   i     R# ; i)
r   r   rI   zdict or boolr&  r=   aardvarkr	  Nr   )r   r   rA   r(  r)  
ValueErrorr#   r   s     r0   test_shadow_invalid_argumentr    sQ     llnGCGGIVG$	z	8	8
		l:	6 
9	8	8	8s   A//B 	c                      \         P                  ! 4       w  rVP                  \        ^d4      RR7       VP	                  RRR7      pVP                  4       P                  4       ^8X  g   Q hR# )d   r   rI   Tw)r   r  N)r   r   rA   rr   r#   	get_frame	get_alphar   s      r0   test_shadow_framealphar    sT     llnGCGGE#JfG%
))43)
/C==?$$&!+++r2   c                  "   \         P                  ! 4       w  rVP                  \        ^
4      RR7       VP	                  4       pVP                  4       P                  4       R8X  g   Q hVP                  4       P                  4       '       d   Q hR# )r   r  rI    N)r   r   rA   rr   r#   	get_titler  get_visibler   s      r0   test_legend_title_emptyr!    sk     llnGCGGE"I[G)
))+C==?##%+++}}**,,,,,r2   c                  0   \         P                  ! ^dR7      w  rVP                  \        ^
4      RR7       VP	                  4       pVP                  V P                  P                  4       4      P                  p\         P                  ! ^R7      w  rVP                  \        ^
4      RR7       VP	                  4       pVP                  V P                  P                  4       4      P                  p\        P                  ! V^,          R4      V8X  g   Q hR# )r  r  AardvarkrI   r_   N)r   r   rA   rr   r#   rv   rs   get_rendererx0r(  approx)r*   r+   r~   x01x02s        r0    test_legend_proper_window_extentr*    s    lls#GCGGE"IZG(
))+C




 7 7 9
:
=
=Clls#GCGGE"IZG(
))+C




 7 7 9
:
=
=C==Q$+++r2   c                  $   \         P                  ! ^dR7      w  rVP                  \        ^
4      RR7       VP	                  4       pV P	                  4       pV P
                  P                  4        VP                  4        VP                  4        R# )r  r#  r$  rI   N)r   r   rA   rr   r#   rs   rt   rv   )r*   r+   r~   leg2s       r0   "test_window_extent_cached_rendererr-    sb    lls#GCGGE"IZG(
))+C::<DJJOOr2   c            
      "   \         P                  ! \        ^
4      RR7       \        P                  ! \
        4      ;_uu_ 4        \         P                  ! R^RRR^/R7       RRR4       \         P                  ! R\        R^R	7      R
7      p V P                  4       P                  4       ^8X  g   Q h\         P                  ! ^^RR7      w  rVP                  pV^ ,          P                  \        ^
4      RR7       V^ ,          P                  R^R7      pVP                  4       P                  4       ^8X  g   Q hV^,          P                  \        ^
4      RR7       V^,          P                  RRRR^/R
7      pVP                  4       P                  4       ^8X  g   Q hV^,          P                  \        ^
4      RR7       R\        P                  R&   V^,          P                  RRR/R
7      pVP                  4       P                  4       \        P                  R,          8X  g   Q hV^,          P                  \        ^
4      RR7       V^,          P                  RR7      pVP                  4       P                  4       \        P                  R,          8X  g   Q hV^,          P                  \        ^
4      RR7       ^\        P                  R&   V^,          P                  RRR/R
7      pVP                  4       P                  4       ^8X  g   Q hV^,          P                  \        ^
4      RR7       V^,          P                  RR7      pVP                  4       P                  4       ^8X  g   Q hR#   + '       g   i     EL$; i)r   r  rI   r$  familyserifsize)r   title_fontsizetitle_fontpropertiesN)r/  r1  )r   r3  )ri   )r   r2  zlegend.title_fontsizez	font.sizer   )r   r   )r   rA   rr   r(  r)  r  r#   r
   r  get_sizer   ro   get_fontsizer   r   )	r~   r*   axesleg0leg1r,  leg3leg4leg5s	            r0   #test_legend_title_fontprop_fontsizer=    s   HHU2Yk*	z	"	"

B)17FB(G	I 
# **:N.5B=@ AC==?##%+++Q73IC99DGLLr+L.7>>
2>>D>>((*b000GLLr+L.7>>
08'62/N  PD>>((*b000GLLr+L.,0CLL()7>>
08'/B  DD>>((*cll;.GGGGGLLr+L.7>>
>+D>>((*cll;.GGGGGLLr+L.,.CLL()7>>
08'/B  DD>>((*b000GLLr+L.7>>
>+D>>((*b000A 
#	"	"s   M==N		alignmentc                    \         P                  ! 4       w  rVP                  \        ^
4      RR7       VP	                  RV R7      pVP                  4       ^ ,          P                  V 8X  g   Q hVP                  4       V 8X  g   Q hR# )r   r   rI   r$  )r   r>  N)r   r   rA   rr   r#   get_childrenrQ   get_alignmentr>  r*   r+   r~   s   &   r0   test_legend_alignmentrC    sn    llnGCGGE"IVG$
))*	)
:Ca &&)333)+++r2   r   c                    \         P                  ! 4       w  rVP                  \        ^
4      RR7       VP	                  4       pVP                  V 4       VP                  4       \        P                  P                  V ,          8X  g   Q hR# r   r   rI   N)
r   r   rA   rr   r#   set_loc_get_locr  rj   codesr   r*   r+   r~   s   &   r0   test_ax_legend_set_locrJ    s]    llnGCGGE"IVG$
))+CKK<<>W^^11#6666r2   c                 z   \         P                  ! 4       w  rVP                  \        ^
4      RR7       VP	                  4       pVP                  V 4       V P                  R4      '       d   V P                  4       ^,          MT p VP                  4       \        P                  P                  V ,          8X  g   Q hR# )r   r   rI   outsideN)r   r   rA   rr   r#   rF  rX  splitrG  r  rj   rH  rI  s   &   r0   test_fig_legend_set_locrN    s|    llnGCGGE"IVG$
**,CKKNN955#))+a.3C<<>W^^11#6666r2   c                 ,   \         P                  ! 4       w  rVP                  \        ^
4      RR7       VP	                  4       pVP                  V 4       VP                  4       ^ ,          P                  V 8X  g   Q hVP                  4       V 8X  g   Q hR# rE  )	r   r   rA   rr   r#   set_alignmentr@  rQ   rA  rB  s   &   r0   test_legend_set_alignmentrQ  (  su    llnGCGGE"IVG$
))+Ci a &&)333)+++r2   r.   c                    \         P                  ! 4       w  rVP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RR7       VP                  V R7      pVP                  4        F9  p\        P                  P                  VP                  4       V 4      '       d   K9  Q h	  R# )r   #1rI   #2#3
labelcolorN)r   r   rA   r   rL   r#   r   r   r)   
same_color	get_colorr.   r*   r+   r~   r  s   &    r0   test_legend_labelcolor_singler[  2  s     llnGCGGBIIbM299R=?$G7GGBIIbM299R=?$G7GGBIIbM299R=?$G7
))u)
%Czz$$T^^%5u====  r2   c                     \         P                  ! 4       w  rVP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RR7       VP                  . ROR7      p\        VP                  4       . RO4       F;  w  r4\        P                  P                  VP                  4       V4      '       d   K;  Q h	  R# )r   rS  rI   rT  rU  rV  Nr   r   r   r   r   rA   r   rL   r#   r   r   r   r)   rX  rY  r*   r+   r~   r  r.   s        r0   test_legend_labelcolor_listr`  ?  s    llnGCGGBIIbM299R=?$G7GGBIIbM299R=?$G7GGBIIbM299R=?$G7
)))
/C3==?O<zz$$T^^%5u==== =r2   c                     \         P                  ! 4       w  rVP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  RR	7      p\        VP                  4       . RO4       F;  w  r4\        P                  P                  VP                  4       V4      '       d   K;  Q h	  R
# )r   rS  r   r   r.   rT  r   rU  r   	linecolorrV  Nr]  r^  r_  s        r0    test_legend_labelcolor_linecolorrd  K  s    llnGCGGBIIbM299R=?$cGBGGBIIbM299R=?$cGBGGBIIbM299R=?$cGB
)){)
+C3==?O<zz$$T^^%5u==== =r2   c                     \         P                  ! 4       w  rVP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  RR	7      p\        VP                  4       . RO4       F;  w  r4\        P                  P                  VP                  4       V4      '       d   K;  Q h	  R
# )r   rS  r   r   rT  r   rU  r   rc  rV  Nr]  r   r   r   r   rL   r#   r   r   r   r)   rX  rY  r_  s        r0   /test_legend_pathcollection_labelcolor_linecolorrg  W  s    llnGCJJryy}biimAoTSJAJJryy}biimAoTSJAJJryy}biimAoTSJA
)){)
+C3==?O<zz$$T^^%5u==== =r2   c                     \         P                  ! 4       w  r\        P                  ! . RO^,          4      pVP	                  \        P
                  ! ^
4      \        P
                  ! ^
4      RVR7       VP                  RR7      pVP                  4       w  p\        P                  P                  VP                  4       R4      '       g   Q hR# )r   rS  r   rc  rV  blackNr   r   r   r   rP   )r   r   r   r   r   rL   r#   r   r   r)   rX  rY  )r*   r+   r)   r~   r  s        r0   8test_legend_pathcollection_labelcolor_linecolor_iterablerk  c  s     llnGCXX/!34FJJryy}biim46JB
)){)
+CMMOED::  !17;;;;r2   c                     \         P                  ! 4       w  rVP                  \        P                  ! ^
4      \        P                  ! ^
4      \        P                  ! ^
4      RR7       VP                  RR7      pVP                  4       w  p\        P                  P                  VP                  4       R4      '       g   Q hR# )r   rS  )r   r   rc  rV  ri  N)r   r   r   r   rL   r#   r   r   r)   rX  rY  )r*   r+   r~   r  s       r0   4test_legend_pathcollection_labelcolor_linecolor_cmaprm  o  s~     llnGCJJryy}biimryy}DJI
)){)
+CMMOED::  !17;;;;r2   c                     \         P                  ! 4       w  rVP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  RR	7      p\        VP                  4       . RO4       F;  w  r4\        P                  P                  VP                  4       V4      '       d   K;  Q h	  R
# )r   rS  r   r   markeredgecolorrT  r   rU  r   rp  rV  Nr]  r^  r_  s        r0   &test_legend_labelcolor_markeredgecolorrq  z      llnGCGGBIIbM299R=?$GLGGBIIbM299R=?$GLGGBIIbM299R=?$GL
))0)
1C3==?O<zz$$T^^%5u==== =r2   c                     \         P                  ! 4       w  rVP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  RR	7      p\        VP                  4       . RO4       F;  w  r4\        P                  P                  VP                  4       V4      '       d   K;  Q h	  R
# )r   rS  r   r   r   rT  r   rU  r   rp  rV  Nr]  rf  r_  s        r0   5test_legend_pathcollection_labelcolor_markeredgecolorru        llnGCJJryy}biimAoTSJIJJryy}biimAoTSJIJJryy}biimAoTSJI
))0)
1C3==?O<zz$$T^^%5u==== =r2   c                     \         P                  ! 4       w  r\        P                  ! . RO^,          4      pVP	                  \        P
                  ! ^
4      \        P
                  ! ^
4      RVR7       VP                  RR7      p\        VP                  4       R.4       F;  w  rE\        P                  P                  VP                  4       V4      '       d   K;  Q h	  R# )r   rS  rt  rp  rV  r  Nrj  r   r   r   r   r   rL   r#   r   r   r   r)   rX  rY  r*   r+   r)   r~   r  r.   s         r0   >test_legend_pathcollection_labelcolor_markeredgecolor_iterablerz         llnGCXX/!34FJJryy}biim46JJ
))0)
1C3==?SE2zz$$T^^%5u==== 3r2   c            	      *   \         P                  ! 4       w  r\        P                  P	                  \
        P                  P                  ^
4      4      pVP                  \
        P                  ! ^
4      \
        P                  ! ^
4      R\
        P                  ! ^
4      VRR7       VP                  RR7      p\        VP                  4       R.4       F;  w  rE\        P                  P                  VP                  4       V4      '       d   K;  Q h	  R# )r   rS  Reds)r   r   r   cmaprp  rV  r  Nr   r   r   cmviridisr   r   r  r   rL   r#   r   r   r)   rX  rY  )r*   r+   r  r~   r  r.   s         r0   :test_legend_pathcollection_labelcolor_markeredgecolor_cmapr    s     llnGC		r 23JJJ
		"
		"
))B-   ))0)
1C3==?SE2zz$$T^^%5u==== 3r2   c                     \         P                  ! 4       w  rVP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  RR	7      p\        VP                  4       . RO4       F;  w  r4\        P                  P                  VP                  4       V4      '       d   K;  Q h	  R
# )r   rS  r   r   markerfacecolorrT  r   rU  r   r  rV  Nr]  r^  r_  s        r0   &test_legend_labelcolor_markerfacecolorr    rr  r2   c                     \         P                  ! 4       w  rVP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  RR	7      p\        VP                  4       . RO4       F;  w  r4\        P                  P                  VP                  4       V4      '       d   K;  Q h	  R
# )r   rS  r   r   r  rT  r   rU  r   r  rV  Nr]  rf  r_  s        r0   5test_legend_pathcollection_labelcolor_markerfacecolorr    rv  r2   c                     \         P                  ! 4       w  r\        P                  ! . RO^,          4      pVP	                  \        P
                  ! ^
4      \        P
                  ! ^
4      RVR7       VP                  RR7      p\        VP                  4       R.4       F;  w  rE\        P                  P                  VP                  4       V4      '       d   K;  Q h	  R# )r   rS  r  r  rV  r  Nrj  rx  ry  s         r0   >test_legend_pathcollection_labelcolor_markerfacecolor_iterabler    r{  r2   c                     \         P                  ! 4       w  r\        P                  P	                  \
        P                  P                  ^
4      4      pVP                  \
        P                  ! ^
4      \
        P                  ! ^
4      RVR7       VP                  RR7      p\        VP                  4       R.4       F;  w  rE\        P                  P                  VP                  4       V4      '       d   K;  Q h	  R# )r   rS  r   r  rV  r  Nr  ry  s         r0   8test_legend_pathcollection_labelcolor_markfacecolor_cmapr    s     llnGCVV^^BIINN2./FJJ
		"
		"
	   ))0)
1C3==?SE2zz$$T^^%5u==== 3r2   c                    \         P                  ! 4       w  rVP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RR7       V \
        P                  R&   VP                  4       pVP                  4        F9  p\
        P                  P                  VP                  4       V 4      '       d   K9  Q h	  R# )r   rS  rI   rT  rU  legend.labelcolorN)r   r   rA   r   rL   r   r   r#   r   r)   rX  rY  rZ  s   &    r0   %test_legend_labelcolor_rcparam_singler    s     llnGCGGBIIbM299R=?$G7GGBIIbM299R=?$G7GGBIIbM299R=?$G7(-CLL$%
))+Czz$$T^^%5u====  r2   c                     \         P                  ! 4       w  rVP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       R\
        P                  R	&   VP                  4       p\        VP                  4       . RO4       F;  w  r4\
        P                  P                  VP                  4       V4      '       d   K;  Q h	  R
# )r   rS  r   rb  rT  r   rU  r   rc  r  Nr]  r   r   rA   r   rL   r   r   r#   r   r   r)   rX  rY  r_  s        r0   (test_legend_labelcolor_rcparam_linecolorr    s    llnGCGGBIIbM299R=?$cGBGGBIIbM299R=?$cGBGGBIIbM299R=?$cGB(3CLL$%
))+C3==?O<zz$$T^^%5u==== =r2   c                     \         P                  ! 4       w  rVP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       R\
        P                  R	&   VP                  4       p\        VP                  4       . RO4       F;  w  r4\
        P                  P                  VP                  4       V4      '       d   K;  Q h	  R
# )r   rS  r   ro  rT  r   rU  r   rp  r  Nr]  r  r_  s        r0   .test_legend_labelcolor_rcparam_markeredgecolorr        llnGCGGBIIbM299R=?$GLGGBIIbM299R=?$GLGGBIIbM299R=?$GL(9CLL$%
))+C3==?O<zz$$T^^%5u==== =r2   c                     \         P                  ! 4       w  rVP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       R\
        P                  R	&   VP                  4       p\        VP                  4       . RO4       F;  w  r4\
        P                  P                  VP                  4       V4      '       d   K;  Q h	  R
# )r   rS  r   ro  rT  r   rU  r   mecr  Nr]  r  r_  s        r0   4test_legend_labelcolor_rcparam_markeredgecolor_shortr        llnGCGGBIIbM299R=?$GLGGBIIbM299R=?$GLGGBIIbM299R=?$GL(-CLL$%
))+C3==?O<zz$$T^^%5u==== =r2   c                     \         P                  ! 4       w  rVP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       R\
        P                  R	&   VP                  4       p\        VP                  4       . RO4       F;  w  r4\
        P                  P                  VP                  4       V4      '       d   K;  Q h	  R
# )r   rS  r   r  rT  r   rU  r   r  r  Nr]  r  r_  s        r0   .test_legend_labelcolor_rcparam_markerfacecolorr    r  r2   c                     \         P                  ! 4       w  rVP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       VP                  \        P                  ! ^
4      \        P                  ! ^
4      ^,          RRR7       R\
        P                  R	&   VP                  4       p\        VP                  4       . RO4       F;  w  r4\
        P                  P                  VP                  4       V4      '       d   K;  Q h	  R
# )r   rS  r   r  rT  r   rU  r   mfcr  Nr]  r  r_  s        r0   4test_legend_labelcolor_rcparam_markerfacecolor_shortr  (  r  r2   z4ignore:No artists with labels found to put in legendc                     \         P                  ! 4       p V P                  4       '       d   Q hV P                  R 4       V P                  4       '       g   Q hV P                  R4       V P                  4       '       d   Q hR# )TFN)r   r#   get_draggableset_draggabler#   s    r0   test_get_set_draggabler  5  sk    ZZ\F##%%%%
!!!!
##%%%%%r2   	draggablec                     \         P                  ! 4       w  rVP                  \        ^
4      RR7       VP	                  V R7      pVP                  4       V J g   Q hR# )r   shabnamsrI   )r  N)r   r   rA   rr   r#   r  )r  r*   r+   r~   s   &   r0   test_legend_draggabler  ?  sJ    llnGCGGE"IZG(
))i)
(C)+++r2   c                  ~   \         P                  ! . RORRRR7      w  rp\         P                  ! 4       pVP                   F  pVP	                  R4       K  	  XP                  4       RR V^,          P                  4       RR 8X  g   Q hVP                  4       RR V^,          P                  4       RR 8X  g   Q hR# )	r   g      ?datar  )r  r   r.   r\   Nr   rT   )r   rq   r#   r  	set_alphaget_facecolorget_edgecolor)r,   r  hhr#   r  s        r0   test_alpha_handlesr  G  s    xx	V5IHA"ZZ\F##
S $cr"be&9&9&;CR&@@@@cr"be&9&9&;CR&@@@@r2   c                 L   R \         P                  R&   R\         P                  R&   R\         P                  R&   \        P                  ! 4       w  rVP	                  ^ ^ RR7       VP                  RR	7       VP                  P                  4        R
V P                  9  g   Q hR# )r0  zfont.familyzComputer Modernz
font.serifTztext.usetexinputrI   r   r4  z Font family ['serif'] not found.N)	r   r   r   r   rA   r#   rs   rt   r  )caplogr*   r+   s   &  r0   test_usetex_no_warnr  P  sy    ")CLL!2CLL"&CLLllnGCGGAqG IIKI JJOO-V[[@@@r2   c                 P  a \         P                  ! ^ RR7      oV P                  \        RV3R l4       \        P
                  ! 4       w  rVP                  P                  4        . ROp. ROpVP                  W4RRR7       \        RR	/4      ;_uu_ 4        VP                  4       pR
R
R
4       \        P                  ! \        RR7      ;_uu_ 4       pVP                  X4       R
R
R
4       \        X4      ^8X  g   Q hR
#   + '       g   i     Lb; i  + '       g   i     L7; i)r         ?rm   perf_counterc                     < \        S 4      # r5   nextcounters   r0   <lambda>-test_warn_big_data_best_loc.<locals>.<lambda>a  	    d7mr2   rZ   r8   rI   z
legend.locrK   NzGCreating legend with loc="best" can be slow with large amounts of data.r&  r]   r`   )	itertoolscountsetattrtimer   r   rs   rt   rA   r	   r#   r(  rT  r  draw_artistr   )monkeypatchr*   r+   r,   r-   r#   recordsr  s   &      @r0   test_warn_big_data_best_locr  ^  s    ooac*Gn.CDllnGCJJOO 	'A*AGGA$fG%	\6*	+	+ 
,	k)
* 
*-4
* w<1 
,	+
* 
*s   DDD	D%	c                 L  a \         P                  ! ^ RR7      oV P                  \        RV3R l4       \        P
                  ! 4       w  rVP                  P                  4        . R
Op. ROpVP                  W4RRR7       VP                  R4      pVP                  V4       R	# )r   r  r  r  c                     < \        S 4      # r5   r  r  s   r0   r  :test_no_warn_big_data_when_loc_specified.<locals>.<lambda>y  r  r2   rZ   r8   rI   rK   Nr]   r`   )r  r  r  r  r   r   rs   rt   rA   r#   r  )r  r*   r+   r,   r-   r#   r  s   &     @r0   (test_no_warn_big_data_when_loc_specifiedr  v  sy    ooac*Gn.CDllnGCJJOO 	'A*AGGA$fG%YYvFOOFr2   label_arraylowhighc                    . ROp^^.^^.^^	..p\         P                  ! 4       w  r4VP                  WV R7       VP                  4       pVP	                  4        Uu. uF  qfP                  4       NK  	  ppVRR.8X  g   Q hR# u upi )r   rI   r  r  Nr   )r   r   rA   r#   r   r  )r  r,   r-   r*   r+   r~   entrylegend_textss   &       r0   'test_plot_multiple_input_multiple_labelr    s     	A
Q
Q
Q	A llnGCGGAG$
))+C25--/B/NN$/LBE6?*** Cs   Br   r   c                 .   . ROp^^.^^.^^	..p\         P                  ! 4       w  r4VP                  WV R7       VP                  4       pVP	                  4        Uu. uF  qfP                  4       NK  	  ppV\        V 4      .^,          8X  g   Q hR# u upi )r   rI   Nr   )r   r   rA   r#   r   r  rV  )r   r,   r-   r*   r+   r~   r  r  s   &       r0   %test_plot_multiple_input_single_labelr    s     	A
Q
Q
Q	A llnGCGGAG
))+C25--/B/NN$/LBCJ<!++++ Cs   Bc                    . ROp. ROp\         P                  ! 4       w  r4\        P                  ! \        P
                  RR7      ;_uu_ 4        VP                  WV R7       RRR4       VP                  4       p\        VP                  4       4      ^8X  g   Q hVP                  4       ^ ,          P                  4       \        V 4      8X  g   Q hR#   + '       g   i     Lw; i)r   z$Passing label as a length 2 sequencer&  rI   Nr   )r   r   r   )r   r   r(  rT  r   MatplotlibDeprecationWarningrA   r#   r   r   r  rV  )r  r,   r-   r*   r+   r~   s   &     r0   %test_plot_single_input_multiple_labelr    s     	AAllnGC	c66B
D 
D
K(
D ))+Cs}}1$$$==?1&&(C,<<<<
D 
Ds   CC!	c                      \         P                  ! 4       w  rVP                  ^ .^..R.R7      w  pVP                  4       R8X  g   Q hR# )r   ArI   N)r   r   rA   	get_label)r*   r+   r8   s      r0   !test_plot_single_input_list_labelr    sB    llnGCGGaS1#JseG,ED>>s"""r2   c                      \         P                  ! \        4      ;_uu_ 4        . ROp ^^.^^.^^	..p. ROp\        P                  ! 4       w  r4VP                  WVR7       RRR4       R#   + '       g   i     R# ; i)r   rI   Nr   )r  r  medium)r(  r)  r  r   r   rA   )r,   r-   r   r*   r+   s        r0   3test_plot_multiple_label_incorrect_length_exceptionr    sg     
z	"	"VVV *,,.
E" 
#	"	"	"s   >A++A<	c            	          \         P                  ! 4       w  rVP                  . RO. RO. RORRRR7       VP                  4        R# )	r   r   faceFill)r  r   r   Nr`  r   r   )r   r   r   r#   r   s     r0   test_legend_face_edgecolorr    s7    llnGCOOIy)!V6  CIIKr2   c                      \         P                  ! 4       w  rVP                  ^^.^^.RR7       VP                  4       pVP                  VJ g   Q hVP                  4       ^ ,          P                  VJ g   Q hR# )r   r8   rI   N)r   r   rA   r#   r7  r   r   s      r0   test_legend_text_axesr    sc    llnGCGGQFQF&G)
))+C88r>>==?1""b(((r2   c                  @   \         P                  ! 4       w  rVP                  ^ ^.^ ^.RR7       \        P                  ! ^ .^ .RR7      .pVP                  VR.^R7      pV^ ,          P                  4       VP                  ^ ,          P                  4       8X  g   Q hR# )r   r  )r  r$  r  N)r   r   r   mlinesLine2Dr#   r  r  )r*   r+   r/   r~   s       r0   test_handlerline2dr    s    llnGCJJ1v1vcJ*}}aS1#c23G
))Gj\Q)
7C1:  "c&8&8&;&F&F&HHHHr2   c                      \         P                  ! 4       P                  4       p V P                  4       pVP	                  ^ ^.^ ^.RR7       V P                  4       pVP                  RR7      V J g   Q hR# )r   r8   rI   F)rootN)r   r   
subfiguresr   rA   r#   
get_figure)subfigr+   r~   s      r0   test_subfigure_legendr    s`    ZZ\$$&F		BGGQFQF&G)
--/C>>u>%///r2   c                     \         P                  ! ^ ^.^^.RRR7      p \         P                  ! 4       P                  4       ^ ,          pVP	                  R4       VP                  4       R,          \        V P                  4       ^ ,          R,          4      8X  g   Q hVP                  4       R,          \        V P                  4       ^ ,          R,          4      8X  g   Q hR# )r   z#123456r   )r.   r   r   :Nr   NN)r   r   r#   get_patchesr  r  tupler  )pcr   s     r0   -test_setting_alpha_keeps_polycollection_colorr    s    			1a&1a&		IBJJL$$&q)E	OOC $b.>.>.@.CB.G(HHHH $b.>.>.@.CB.G(HHHHr2   c            
         . ROp \         P                  ! 4       w  rV  Uu. uF  p\        P                  ! ^ .^ .RVR7      NK!  	  pp. ROpV Uu. uF  qfP	                  4       NK  	  ppVP                  WE4      pVP                  4        Uu. uF  qfP	                  4       NK  	  p	pVP                  4        U
u. uF  qP                  4       NK  	  pp
Yyu;8X  d	   V 8X  g   Q h Q hW[8X  g   Q hR# u upi u upi u upi u up
i )r   None)lsr  N)r   *r  )r  rU   xyzzy)	r   r   r  r  r  r#   rB   r   r  )_markersr*   r+   markr   r(   r8   r  r#   new_markersr  
new_labelss               r0   test_legend_markers_from_line2dr    s    HllnGC!#! ]]A3t<! 
 #$F-23UT UG3YYu%F171A1A1CD1C??$1CKD.4.>.>.@A.@d--/.@JA-X-----# 4 EAs   %C/C4C98C>c                 Z    . ROp^pV P                  W#R7       VP                  W#R7       R# )r   )ncol)rh   N)r   r   r   r   er  r  )r  r  stringsrh   s   &&  r0   test_ncol_ncolsr  	  s*     -GEOOGO(NN7N(r2   c                  .   \         P                  ! 4       w  r\        P                  ! \        R R7      ;_uu_ 4        VP                  RR.R7       RRR4       \        P                  ! \        RR7      ;_uu_ 4        VP                  RR.R7       RRR4       \        P                  ! \        RR7      ;_uu_ 4        VP                  R	R.R7       RRR4       R#   + '       g   i     L; i  + '       g   i     Lf; i  + '       g   i     R# ; i)
zFloc must be string, coordinate tuple, or an integer 0-10, not \(1.1,\)r&  r  r   r(   NzWloc must be string, coordinate tuple, or an integer 0-10, not \(0.481, 0.4227, 0.4523\)zRloc must be string, coordinate tuple, or an integer 0-10, not \(0.481, 'go blue'\))r   )bX9?g:M?gm{?)r  zgo bluer   r   r(  r)  r  r#   r   s     r0    test_loc_invalid_tuple_exceptionr    s     llnGC	z +C 
E 
E
		g{m	4
E 
z +T 
V 
V
		-{m	D
V 
z +Q 
S 
S
		(+	?
S 
S
E 
E
V 
V
S 
S 
Ss#   C=C0>DC-	0D 	D	c                      \         P                  ! 4       w  rVP                  RR.R7       VP                  RR.R7       R# )r  r  r  N)r  }?5^I?)r   r   r   r   r#   r   s     r0   test_loc_valid_tupler  #  s3    llnGCII.+I7II&+I/r2   c                      \         P                  ! 4       w  rVP                  R R.R.R7       VP                  ^^.R.R7       R# )r  r	  r  r  Nr
  r   s     r0   test_loc_valid_listr  )  s;    llnGCII5%.+I7II1a&+I/r2   c                      \         P                  ! 4       w  r\        P                  ! \        R R7      ;_uu_ 4        VP                  . ROR.R7       RRR4       R#   + '       g   i     R# ; i)zOloc must be string, coordinate tuple, or an integer 0-10, not \[1.1, 2.2, 3.3\]r&  r  r  N)r   r  gffffff
@r  r   s     r0   test_loc_invalid_list_exceptionr  /  sU    llnGC	z +L 
N 
N
		o{m	<
N 
N 
N 
N   AA.	c                      \         P                  ! 4       w  r\        P                  ! \        R R7      ;_uu_ 4        VP                  RR/R.R7       RRR4       R#   + '       g   i     R# ; i)zKloc must be string, coordinate tuple, or an integer 0-10, not {'not': True}r&  notTr  r  Nr  r   s     r0   test_loc_invalid_typer  6  sY    llnGC	z +F 
H 
H
		udm[M	:
H 
H 
H 
Hr  c                  &   \         P                  ! 4       w  rVP                  ^ R.R7       VP                  ^R.R7       VP                  ^R.R7       VP                  ^
R.R7       \        P                  ! \
        RR7      ;_uu_ 4        VP                  ^R.R7       RRR4       \        P                  ! \
        RR7      ;_uu_ 4        VP                  RR.R7       RRR4       R#   + '       g   i     LS; i  + '       g   i     R# ; i)r   r  r  z@loc must be string, coordinate tuple, or an integer 0-10, not 11r&  Nz@loc must be string, coordinate tuple, or an integer 0-10, not -1rT   r   r   r#   r(  r)  r  r   s     r0   !test_loc_validation_numeric_valuer  =  s    llnGCII![MI*II![MI*II![MI*II"k]I+	z +; 
= 
=
		b+	/
= 
z +; 
= 
=
		b+	/
= 
=	
= 
=
= 
= 
=s   C,C?,C<	?D	c                     \         P                  ! 4       w  rR .pVP                  RVR7       VP                  RVR7       VP                  RVR7       VP                  RVR7       VP                  RVR7       VP                  RVR7       VP                  RVR7       VP                  RVR7       VP                  RVR7       VP                  R	VR7       VP                  R
VR7       VP                  RVR7       \        P                  ! \
        RR7      ;_uu_ 4        VP                  RVR7       RRR4       R#   + '       g   i     R# ; i)r  rK   r  r
  r=   r   r  r   r   r  zlower centerzupper centerz 'wrong' is not a valid value forr&  wrongNr  )r*   r+   r(   s      r0    test_loc_validation_string_valuer  L  s   llnGC]FII&I(II-I/II&I(II-I/II,vI.II,vI.II-I/II'&I)II-I/II.I0II.I0II.I0	z)K	L	L
		gf	- 
M	L	L	Ls   #EE	c                     \         P                  ! \        ^
4      4      w  p \         P                  ! \        ^
4      4      w  p\        P                  ! \
        RR7      ;_uu_ 4        \         P                  ! W.. ROR7      p\        VP                  4      ^8X  g   Q h\        VP                  4       4      ^8X  g   Q h RRR4       R#   + '       g   i     R# ; i)r   znumber of handles and labelsr&  r/   r(   Npl1pl2pl3)
r   rA   rr   r(  rT  r  r#   r   r  r   r  r  r#   s      r0   !test_legend_handle_label_mismatchr!  _  s    88E"IDC88E"IDC	k)G	H	HSJ7LM6(()Q...6##%&!+++ 
I	H	H	Hs   'AC

C	c                  \   \         P                  ! \        ^
4      4      w  p \         P                  ! \        ^
4      4      w  p\         P                  ! \	        W.4      \	        . RO4      R7      p\        VP                  4      ^8X  g   Q h\        VP                  4       4      ^8X  g   Q hR# )r   r  Nr  )r   rA   rr   r#   iterr   r  r   r   s      r0   (test_legend_handle_label_mismatch_no_lenr$  h  s    88E"IDC88E"IDCZZcZ 0#$9:<Fv$$%***v!"a'''r2   c                      \         P                  ! . RO4       \        P                  ! \        RR7      ;_uu_ 4        \         P
                  ! 4        RRR4       R#   + '       g   i     R# ; i)r   zNo artists with labels foundr&  Nr   )r   rA   r(  r)  r  r#   r6   r2   r0   test_legend_nolabels_warningr&  q  s9    HHY	{*H	I	I

 
J	I	I	Is   AA.	c                      \         P                  ! . RO4       \         P                  ! 4        \         P                  ! 4       P	                  4       f   Q hR# )r   Nr   )r   rA   r#   r  r   r6   r2   r0   test_legend_nolabels_drawr(  w  s2    HHYJJL779!---r2   c            
      H   . ROp . R	Op. R
Op. p\         P                  ! ^RR7      w  rE\        VP                  R4       F  w  rgVP	                  WVRRRR7       VP                  ^ ^4       VP                  R^4       VP                  VR7      pVP                  P                  4        VP                  VP                  4       P                  VP                  P                  4       4      4       K  	  \        V^,          P                   V^ ,          P                   4       R# )r   rg   grayr   zShaded Area)r.   r  r   r>   Nr   )r   r   r   )r   r   r   r   r   rK   r   rT   )r   r   r   ro   r   rc   rd   r#   rs   rt   ru   rv   rw   rx   ry   r   rz   )	r,   r  r  r|   r*   r{   r+   r   r~   s	            r0   test_legend_loc_polycollectionr-  ~  s     	A	B	BJ||!W5HCsxx!78
rs-P
Aq
BiiCi 

!!#//0E0E0GH	J 9 JqM((*Q-*>*>?r2   c                     \         P                  ! ^R
R7      w  r. p\        VP                  R4       F  w  r4^^.p^^.pVP	                  WVRR7       VP                  R^RRR7       VP                  VR7      pV P                  P                  4        VP                  VP                  4       P                  VP                  P                  4       4      4       K  	  \        V^,          P                  V^ ,          P                  4       R	# )r   rg   z	plot namerI   r  zsome text blahblahtop)verticalalignmentr>   Nr+  r,  )r   r   r   ro   rA   r  r#   rs   rt   ru   rv   rw   rx   ry   r   rz   )r*   r{   r|   r+   r   r,   r-   r~   s           r0   test_legend_textr1    s     ||!W5HCJsxx!78FF
K(
Q,FiiCi 

!!#//0E0E0GH	J 9 JqM((*Q-*>*>?r2   c                     \         P                  ! 4       w  rVP                  . R	ORR7       VP                  RR
R7       VP	                  ^ R7       \
        P                  P                  V RV P                  R7      ;_uu_ 4       pV P                  \        P                  ! 4       4       RRR4       XP                  4        R#   + '       g   i     L"; i)r   LinerI   r   )r   r>   _get_renderer)wrapsNr   )r   r   )r   r   rA   annotater#   r   r   objectr4  savefigioBytesIOassert_not_called)r*   r+   mocked_get_renderers      r0   test_legend_annotater=    s    llnGCGGIVG$KKKII!I			(9(9 
 
; 
;>QBJJL!
;
 ))+
; 
;s   %CC	c                  J   \         P                  P                  R 4       \         P                  P                  R4      p \        P                  ! ^^R7      w  r. ROpV^ ,          P                  V RVR7      pVR,           Uu. uF  qUP                  4       NK  	  upV8X  g   Q hV^ ,          P                  4       w  rgWs8X  g   Q h\        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       g   Q hV^,          P                  WRR7      pVR	,           Uu. uF  qUP                  4       NK  	  upV8X  g   Q hV^,          P                  4       w  rgWs8X  g   Q h\        ;QJ d    R
 V 4       F  '       d   K   RM	  RM! R
 V 4       4      '       g   Q h\        P                  ! \        RR7      ;_uu_ 4        V^,          P                  WRR R7      p	RRR4       V^,          P                  V RR7      p
V
R	,          ^ ,          P                  4       R8X  g   Q h\        ;QJ d*    R V
R	,          R,           4       F  '       d   K   RM	  RM! R V
R	,          R,           4       4      '       g   Q hR# u upi u upi   + '       g   i     L; i)i!N,)nrowsrh   box AT)patch_artistr   boxesc              3   j   "   T F)  p\        V\        P                  P                  4      x  K+  	  R # 5ir5   )
isinstancer   patches	PathPatchr7   r	  s   & r0   r9   -test_boxplot_legend_labels.<locals>.<genexpr>  s$     EWz!S[[2233W   13F)r   showboxmediansc              3   j   "   T F)  p\        V\        P                  P                  4      x  K+  	  R # 5ir5   )rD  r   r   r  rG  s   & r0   r9   rH    s$     @1z!SYY--..rI  z values must have same the lengthr&  NrI   c              3   ^   "   T F#  qP                  4       P                  R 4      x  K%  	  R# 5i)_N)r  rX  )r7   r,   s   & r0   r9   rH    s$     I6H{{}'',,6Hs   +-:r   NN)r   r   )r@  zbox Bzbox Czbox DrT   )r   r   seedr   r   boxplotr  r    allr(  r)  r  )r  r*   r{   legend_labelsbp1r  r/   r(   bp2bp3bp4s              r0   test_boxplot_legend_labelsrW    s   IINN899G$D||!1-HC8M a&..D.
FC#&w<0<aKKM<0MAAA!f668OG"""3EWE333EWEEEEE a&..E.
BC#&y>2>aKKM>2mCCC!f668OG"""3@@333@@@@@@ 
z)K	L	L!fnnTs);n< 
M a&..W.
-Cy>!&&(G3333Ic)nR6HI333Ic)nR6HIIIII) 1 3 
M	Ls   J'J
JJ"	)r   r  r   r   )zoutside rightr   )r  r  )r   r   r   )TF)r  r  )r!   r9  r  platformr  unittestr   r   numpyr   numpy.testingr   r(  matplotlib.testing.decoratorsr   r   matplotlib.testing._markersr   matplotlib.pyplotpyplotr   
matplotlibr   matplotlib.patchesrE  r   matplotlib.transforms
transformsr  matplotlib.collectionsr  matplotlib.linesr   r  matplotlib.legend_handlerr   matplotlib.legendr#   r  r	   matplotlib.font_managerr
   r1   rC   rM   rX   re   r   r   r   machiner   r   r   r   r   r   r   r   r   r   r  r  r  rp  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r!  r*  r-  r=  r  parametrizerC  rJ  rN  rQ  r[  r`  rd  rg  rk  rm  rq  ru  rz  r  r  r  r  r  r  r  r  r  r  r  filterwarningsr  r  r  r  r  r  r   r  intr  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r!  r$  r&  r(  r-  r1  r=  rW  r6   r2   r0   <module>rm     s    	       )  O 4   % + - ! 2 # ! 29$	1 %&D9 : %&D9: :: %&' (@,@@ ./TB' C' ,-4#++-9auF-F- -.D#++-9auF	IF	I #$$#++-9atE2E2 &'T#++-9atE	6E	6 ;-Tt<
E =
E <.d#++-9auFF $&78dK! L!  &'T:8 ;8 :,D	B. C.B#5$ (
 )
]N ]N@5 5p&#R )*#++-9auFF( -./" 0" 789+ :+:('" ./T#++-9auF!F!*7,-,#1L &AB, C,  347 57  ;<7 =7 &AB, C, "?@	> A	>	>	>	>	<<	>	>	>>&	>	>	>>" "?@
> A
>
>
>
>
>
> RS& T& m4, 5,A 
A 
A0" %)8)+5&/)B)D E+E+ 5!S/2, 3, %)8)+5&/)B)D E=E=#
#)I0I " () ))@"00=;0.&,( RS. T.@&@",Jr2   