+
    i                         ^ RI H t  ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIt^ RI	H
t
Ht ^ RI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HtH t H!t! ^ RIH"t" ^ RI#H$t$H%t% ]PL                  ! RR	.R
7      R 4       t'R t(]%! R.4      R 4       t)]%! R.4      R 4       t*]%! R.4      R 4       t+]%! R.4      R 4       t,]%! R.4      R 4       t-]%! R.4      R 4       t.]%! R.4      R 4       t/]%! R.4      R 4       t0]%! R.4      R 4       t1]%! R.4      R  4       t2]%! . R}O4      R! 4       t3]%! R".4      R# 4       t4R$ t5R% t6R& t7R' t8R( t9]Pt                  Pw                  R)4      ]$! R*.R+7      R, 4       4       t<R- t=R. t>]%! R/.R0]P~                  ! 4       R18X  d   ^ MR2R37      R4 4       t@R5 tA]%! R6.R0R)R77      R8 4       tB]%! R9.R0R:7      R; 4       tC]%! R<.R0R:7      R= 4       tDR> tER? tFR@ tGRA tHRB tIRC tJ]%! RD.R0R:7      RE 4       tKRF tL]Pt                  Pw                  RG4      RH 4       tMRI tN]Pt                  Pw                  RG4      RJ 4       tO]Pt                  Pw                  RG4      RK 4       tP]%! RL.4      RM 4       tQ]%! RN.R0RGR77      RO 4       tRRP tSRQ tTRR tURS tV]$! R*.R+7      ]P                  P                  RT/ RURV/.4      RW 4       4       tY]P                  P                  R~RRRXRRRY.^,          RZ3R[^^.RRR\3.4      R] 4       tZR^ t[R_ t\R` t]]P                  P                  RaRR.4      Rb 4       t^Rc t_Rd t`Re taRf tbRg tcRh tdRi teRj tf]Pt                  Pw                  RG4      Rk 4       tgRl thRm tiRn tjRo tkRp tlRq tm]%! Rr.R*.R0R)Rs7      Rt 4       tn]$! R*.R+7      Ru 4       toRv tp]P                  P                  RwRxRyRz..4      ]$! R*.R+7      R{ 4       4       tq]$! . ROR+7      R| 4       trR# )    )datetimeN)SimpleNamespace)assert_array_equalassert_array_almost_equal)
CollectionLineCollectionEventCollectionPolyCollection)FillBetweenPolyCollection)check_figures_equalimage_comparison
pcolormeshpcolor)paramsc                     V P                   # N)param)requests   &ځ/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/matplotlib/tests/test_collections.pypcfuncr      s    ==    c                    \         P                  ! . RO4      p \         P                  ! . RO4      pRp^pRp^p. ROpRpRp\        V VVVVVVVR7      p	\        P                  ! 4       w  rVP                  V	4       VP                  R4       RV RVR	VR
VRVRVRVRVRV/	pVP                  R^4       VP                  ^ ^4       WV3# )z,Generate the initial collection and plot it.
horizontal      ?solidT)orientation
lineoffset
linelength	linewidthcolor	linestyleantialiasedzEventCollection: default	positionsextra_positionsr   r   r   r   r    r!   r"   )              ?       @      @      @g       @g      *@g      5@)g      A@g     K@g     @V@   r   r   r+   )	nparrayr	   pltsubplotsadd_collection	set_titleset_xlimset_ylim)r#   r$   r   r   r   r   r    r!   r"   collfigaxpropss                r   generate_EventCollection_plotr9      s    ;<Ihh/OKJJIEIK9'2&0&0%.!&%.'2D llnGCdLL+,)K::)e)K	E KKBKK1U?r   z!EventCollection_plot__default.pngc                     \        4       w  rp\        VVR ,          VR,          VR,          VR,          4       \        P                  P	                  VR ,          VP                  4       4       VR,          VP                  4       8X  g   Q hVP                  4       '       g   Q hVR,          VP                  4       8X  g   Q hVR,          VP                  4       8X  g   Q hVP                  4       R.8X  g   Q hVP                  4       .VP                  4       O F)  p\        P                  P	                  W2R,          4       K+  	  R# )r#   r   r   r   Nr    r   N)r9   check_segmentsr-   testingr   get_positionsget_orientationis_horizontalget_linelengthget_lineoffsetget_linestyle	get_color
get_colors)_r5   r8   r    s       r    test__EventCollection__get_propsrG   E   s   24NAU4%&&'	) JJ!!%"4d6H6H6JK4#7#7#9999$"5"5"7777$"5"5"7777I;....."7T__%67


%%e7^< 8r   z'EventCollection_plot__set_positions.pngc                  t   \        4       w  rp\        P                  ! VR ,          VR,          .4      pVP                  V4       \        P                  P                  W1P                  4       4       \        WVR,          VR,          VR,          4       V P                  R4       V P                  R^Z4       R# )r#   r$   r   r   r   zEventCollection: set_positionsNr,   )
r9   r-   hstackset_positionsr=   r   r>   r<   r2   r3   spltr5   r8   new_positionss       r   $test__EventCollection__set_positionsrN   _   s    57DIIu[159J3KLMM}%JJ!!-1C1C1EF4&&') 	NN34MM"br   z'EventCollection_plot__add_positions.pngc                     \        4       w  rp\        P                  ! VR ,          VR,          ^ ,          .4      pVP                  4        VP	                  VR,          ^ ,          4       VP                  4        \        P
                  P                  W1P                  4       4       \        VVVR,          VR,          VR,          4       V P                  R4       V P                  R^#4       R# )r#   r$   r   r   r   zEventCollection: add_positionsNr,   )r9   r-   rI   switch_orientationadd_positionsr=   r   r>   r<   r2   r3   rK   s       r   $test__EventCollection__add_positionsrR   m   s    57DIIu[1$%67:< =Mu./23JJ!!-1C1C1EF4 &&'	)
 	NN34MM"br   z*EventCollection_plot__append_positions.pngc                     \        4       w  rp\        P                  ! VR ,          VR,          ^,          .4      pVP                  VR,          ^,          4       \        P                  P                  W1P                  4       4       \        VVVR,          VR,          VR,          4       V P                  R4       V P                  R^Z4       R# )r#   r$   r   r   r   z!EventCollection: append_positionsNr,   )
r9   r-   rI   append_positionsr=   r   r>   r<   r2   r3   rK   s       r   'test__EventCollection__append_positionsrU      s    57DIIu[1$%67:< =M% 12156JJ!!-1C1C1EF4 &&'	)
 	NN67MM"br   z*EventCollection_plot__extend_positions.pngc                     \        4       w  rp\        P                  ! VR ,          VR,          R,          .4      pVP                  VR,          R,          4       \        P                  P                  W1P                  4       4       \        VVVR,          VR,          VR,          4       V P                  R4       V P                  R^Z4       R# )	r#   r$   r+   NNr   r   r   z!EventCollection: extend_positionsNr,   )
r9   r-   rI   extend_positionsr=   r   r>   r<   r2   r3   rK   s       r   'test__EventCollection__extend_positionsrY      s    57DIIu[1$%67;= >M% 12267JJ!!-1C1C1EF4 &&'	)
 	NN67MM"br   z,EventCollection_plot__switch_orientation.pngc                  d   \        4       w  rpR pVP                  4        W1P                  4       8X  g   Q hVP                  4       '       d   Q hVP	                  4       p\        VVVR,          VR,          V4       V P                  R4       V P                  R^4       V P                  ^ ^4       R# )verticalr   r   z#EventCollection: switch_orientationNr,   )	r9   rP   r?   r@   r>   r<   r2   r4   r3   )rL   r5   r8   new_orientationrM   s        r   )test__EventCollection__switch_orientationr]      s    57D O224444!!####&&(M4 &&9 	NN89MM"bMM!Qr   z0EventCollection_plot__switch_orientation__2x.pngc                    \        4       w  rpVP                  4        VP                  4        VP                  4       pVR,          VP                  4       8X  g   Q hVP	                  4       '       g   Q h\
        P                  P                  VR,          V4       \        VVVR,          VR,          VR,          4       V P                  R4       R# )zW
Check that calling switch_orientation twice sets the orientation back to
the default.
r   r#   r   r   z&EventCollection: switch_orientation 2xN)
r9   rP   r>   r?   r@   r-   r=   r   r<   r2   rK   s       r   ,test__EventCollection__switch_orientation_2xr_      s     67D&&(M4#7#7#9999JJ!!%"4mD4 &&'	)
 	NN;<r   z)EventCollection_plot__set_orientation.pngc                  T   \        4       w  rpR pVP                  V4       W1P                  4       8X  g   Q hVP                  4       '       d   Q h\	        VVR,          VR,          VR,          V4       V P                  R4       V P                  R^4       V P                  ^ ^4       R# )r[   r#   r   r   z EventCollection: set_orientationNr,   )r9   set_orientationr?   r@   r<   r2   r4   r3   )rL   r5   r8   r\   s       r   &test__EventCollection__set_orientationrb      s    57D O)224444!!####4%&&"	$
 	NN56MM"bMM!Qr   z(EventCollection_plot__set_linelength.pngc                      \        4       w  rp^pVP                  V4       W1P                  4       8X  g   Q h\        VVR,          VVR,          VR,          4       V P	                  R4       V P                  R^4       R# )   r#   r   r   zEventCollection: set_linelengthNi)r9   set_linelengthrA   r<   r2   r4   )rL   r5   r8   new_linelengths       r   %test__EventCollection__set_linelengthrg      sy    57DN'0022224%!&'	)
 	NN45MM#rr   z(EventCollection_plot__set_lineoffset.pngc                      \        4       w  rpRpVP                  V4       W1P                  4       8X  g   Q h\        VVR,          VR,          VVR,          4       V P	                  R4       V P                  RR4       R# )	r)   r#   r   r   zEventCollection: set_lineoffsetNg      i)r9   set_lineoffsetrB   r<   r2   r4   )rL   r5   r8   new_lineoffsets       r   %test__EventCollection__set_lineoffsetrl      sy    57DN'0022224%&!'	)
 	NN45MM"br   c                      R RR.3R RR.3R3 FW  w  rp\        4       w  r4pVP                  ! R/ W/B  \        P                  ! W@4      V8X  g   Q hVP	                  RV  24       KY  	  R# )r!   dashedzEventCollection: set_N)r   )      @ro   )r      rp    )r9   setr/   getpr2   )propvalueexpectedrL   r5   rF   s         r   test__EventCollection__set_proprw      s|     (_$56-/):;"X
 67A!D=!xx#x///.tf56"r   z#EventCollection_plot__set_color.pngc                  "   \        4       w  rp\        P                  ! . RO4      pVP                  V4       VP	                  4       .VP                  4       O F"  p\        P                  P                  WC4       K$  	  V P                  R4       R# )r   zEventCollection: set_colorN)r   r+   r+   r+   )	r9   r-   r.   	set_colorrD   rE   r=   r   r2   )rL   r5   rF   	new_colorr    s        r    test__EventCollection__set_colorr{     sg    13MD&INN9.."7T__%67


%%e7 8NN/0r   c                   V P                  4       pVP                  4       R8X  g   VP                  4       R8X  g   Vf   ^p^ pM%VP                  4       R8X  d   ^ p^pM\        R4      h\        V4       Fs  w  rV	^ V3,          W2^,          ,           8X  g   Q hV	^V3,          W2^,          ,
          8X  g   Q hV	^ V3,          W,          8X  g   Q hV	^V3,          W,          8X  d   Ks  Q h	  R# )zd
Test helper checking that all values in the segment are correct, given a
particular set of inputs.
r   noneNr[   z.orientation must be 'horizontal' or 'vertical')get_segmentslower
ValueError	enumerate)
r5   r#   r   r   r   segmentspos1pos2isegments
   &&&&&     r   r<   r<     s    
   "H|+  "f,0C				
	*IJJ  )
q$w:Q#>>>>q$w:Q#>>>>q$w9<///q$w9<///	 *r   c                  `   \         P                  ! ^4      P                  R4      p \        P                  ! V \         P                  ! ^4      R7      pVP                  ^4      R8X  g   Q hVP                  \         P                  ! ^4      ^,           4       VP                  ^4      R8X  g   Q hR# )   )r.   N)         gUUUUUU?)r-   arangereshapemcollectionsr   norm	set_array)linesr5   s     r   test_collection_norm_autoscaler   )  sy    IIbM!!),E&&uBIIaLAD99Q<5   NN299Q<!#$99Q<5   r   c                     \         P                  ! . 4      p V P                  \        P                  ! 4       4      p\        VP                  4       \        P                  P                  4       P                  4       4       R # r   )	r   PathCollectionget_datalimmtransformsIdentityTransformr   
get_pointsBboxnull)colcol_data_lims     r   test_null_collection_datalimr   3  sW    

%
%b
)C??;#@#@#BCL|..0"'',,.99;=r   c                  |   \         P                  ! 4       p \        P                  ! \        P
                  ! RR.4      .4      pV P                  V4       VP                  \        P                  ! 4       4      p\        VP                  4       \        P                  P                  4       P                  4       4       R# )r   Nr   r   )r+   r   )r/   axesr   r   mpathPathr1   r   r   r   r   r   r   r   )r7   r5   coll_data_lims      r   test_no_offsets_datalimr   :  s     
B&&

FF3C(D'EFDd$$[%B%B%DEM}//1"'',,.99;=r   c                     \         P                  ! 4        \         P                  ! 4       p V P                  ^ ^.^ ^.4       V P                  P
                  pV P                  . . 4       V P                  P
                  V8X  g   Q hR# r;   )r/   figurer   scatterdataLimbounds)r7   r   s     r   test_add_collectionr   E  sc     JJL	BJJ1v1vZZFJJr2::&&&r   mpl20png)
extensionsc                    . ROp. ROp\         P                  ! W#4      w  rEVP                  4       pVP                  4       pV P                  4       pVP	                  R4       VP                  R4       ^ Vn        VP                  WE4       VP                  4       pVP	                  R4       VP                  R4       VP                  WERRR7       R# )+c>logo )markerlsN)r   g`8F>gq[;u>gy7/>g9̗>gW!>g-I>g\p5>gdjD>gyK'?g~+=?gFEAL ?g|0j?gGKe?gލ=B?)r%   皙?gK?gsh|??gS?g?r'   gQ@g(\@g333333(@g      6@gC@g33333Q@)	r-   meshgridflattenr0   
set_xscale
set_yscalemarginsr   plot)fig_testfig_refx_valsy_valsxyax_testax_refs   &&      r   test_collection_log_datalimr   P  s    JFF ;;v&DA			A			A!GuuGOOOAF
e
e
KKSRK(r   c                  l   \         P                  ! 4       p \        P                  ! ^4      \        P                  ! ^
4      r!\        P                  ! ^ ^
^P4      P                  ^
^4      ;r4\         P                  ! WW44      pVP                  V P                  4      P                  R8X  g   Q h\         P                  ! 4        \         P                  ! 4       p \        P                  ! R^
^4      p\        P                  ! R^^
4      p\        P                  ! W!4      w  r!\        P                  ! 4       P                  ^^ 4      V P                  ,           p\         P                  ! W\        P                  ! V4      \        P                   ! V4      VR7       V P"                  P                  R8X  g   Q hR# )   	transformN)r%   r%   g      @g      "@)g      4@g      >@g      .@ro   )r/   r   r-   r   linspacer   quiverr   	transDatar   r   r   r   Affine2D	translatesincosr   )r7   r   r   uvqtranss          r   test_quiver_limitsr   j  s   	B99Q<2qKK2r"**2q11A

1A==&--1AAAAJJL	B
BBA
B2A;;qDA  ",,R4r||CEJJqRVVAYq	U;:: 7777r   c                     \         P                  ! 4       p \        P                  ! R^
^4      p\        P                  ! R^^
4      p\        P                  ! W!4      w  r!\
        P                  ! 4       P                  ^^ 4      V P                  ,           p\         P                  ! W\        P                  ! V4      \        P                  ! V4      VR7       \        V P                  P                  R^R7       R# )rp   r   decimalNr   r   )      rd      )r/   r   r-   r   r   r   r   r   r   barbsr   r   r   r   r   )r7   r   r   r   s       r   test_barb_limitsr   {  s    	B
BBA
B2A;;qDA  ",,R4r||CEIIaBFF1IrvvayE: bjj//&')r   z EllipseCollection_test_image.pngTx86_64g/$?)remove_texttolc            
      :   \         P                  ! 4       w  r\        P                  ! ^4      p\        P                  ! ^4      p\        P                  ! W#4      w  rE\        P
                  ! VP                  4       VP                  4       34      P                  pWBR,          ,          pWSR,          ,          p\        P                  ! V4      ^,          p	\        P                  ! WxV	RWaP                  RR7      p
VP                  V
4       VP                  4        R# )r   r   r}   )unitsoffsetsoffset_transform
facecolorsNr,   )r/   r0   r-   r   r   vstackravelT	ones_liker   EllipseCollectionr   r1   autoscale_view)r6   r7   r   r   XYXYwwhhaaecs              r   test_EllipseCollectionr     s     llnGC
		!A
		!A;;qDA	AGGIqwwy)	*	,	,B	
rUB	
rUB	b	B	B		'	'
#rLL
B br   c            	         \         P                  P                  ^ 4      p RpRpRpV P                  R	4      ^
,          p\        P                  ! 4       w  rV\
        P                  ! VVVVRVP                  R7      p\        VP                  \         P                  ! V4      P                  4       R,          4       \        VP                  \         P                  ! V4      P                  4       R,          4       \        VP                  \         P                  ! V4      P                  4       4       \        VP                  4       V4       \        VP!                  4       V4       \        VP#                  4       V4       VP%                  V4       VP'                  R
^4       VP)                  R
^4       V P                  R	4      ^,          pV P                  R	4      ^,          p	V P                  R	4      ^,          p
VP+                  WV
R7       \        VP                  4       VP                  4       4       \        VP!                  4       V	P                  4       4       \        VP#                  4       V
P                  4       4       R# )r   r   )widthsheightsanglesr   r   r   r   )r   r   r   Nr   )r   )-   )
   r   r   )r-   randomdefault_rngr/   r0   r   r   r   r   _widthsr.   r   _heights_anglesdeg2rad
get_widthsget_heights
get_anglesr1   r3   r4   rr   )rngr   r   r   r   r6   r7   r   
new_widthsnew_heights
new_angless              r   $test_EllipseCollection_setter_getterr	    s   
))


"CFGFjj!B&GllnGC		'	'

B bjj"((6*:*@*@*BS*HIbkk288G+<+B+B+Ds+JKbjj"**V*<*B*B*DEbmmov6bnn.8bmmov6bKKBKKBG$q(J**W%)KG$s*JFF**FEbmmoz/?/?/ABbnn.0A0A0CDbmmoz/?/?/ABr   zpolycollection_close.png)r   stylec                  
   ^ RI Hp  R\        P                  R&   RR.RR.RR.RR..RR.RR.RR.RR..RR.RR.RR.RR..RR.RR.RR.RR...p\        P                  ! 4       pVP                  V ! V4      4      p. ROp\        \        ^4      4      p\        P                  ! V\        V4      ,          R
R7      pVP                  R4       . p. p\        WT4       FI  w  rVP                  V	.\        V4      ,          4       VP                  V
.\        V4      ,          4       KK  	  VP                  V4       VP                  WgR	R7       VP!                  ^ ^4       VP#                  ^ ^4       VP%                  ^ ^4       R# )r   )Axes3DTzaxes3d.automarginr%   r&   r'   r(         @r         ?r   gffffff?)zszdirN)rgbr   k)mpl_toolkits.mplot3dr  r/   rcParamsr   add_axeslistranger   r
   len	set_alphazipextendry   add_collection3d
set_xlim3d
set_zlim3d
set_ylim3d)r  	vertsQuadr6   r7   colorszpospolyr  cszcs              r   test_polycollection_closer*    s   +(,CLL$% bB8b"XBx0
bB8b"XBx0
bB8b"XBx0
bB8b"XBx0	2I **,C	fSk	"B&Fa>D&&CI/DNN3 
B	BD!
		1#I&'
		1#I&' " 	NN2#. MM!QMM!QMM!Qr   z regularpolycollection_rotate.png)r   c            	         \         P                  R,          w  r\         P                  ! V P                  4       VP                  4       .4      p\         P                  ! ^ ^\         P
                  ,          \        V4      4      p\        P                  ! 4       w  rE\        W#4       F>  w  rg\        P                  ! ^RVV.VP                  R7      pVP                  VRR7       K@  	  VP                  4        R# )Nr   N)sizesrotationr   r   TautolimN)r,  r,  )d   )r-   mgrid	transposer   r   pir  r/   r0   r  r   RegularPolyCollectionr   r1   r   )	xxyy	xy_points	rotationsr6   r7   xyalphar   s	            r   !test_regularpolycollection_rotater<    s    XXhFBbjjlBJJL9:IAqwI7IllnGC.	00VeD2<<9 	#t,	 /
 r   zregularpolycollection_scale.pngc                      ! R  R\         P                  4      p \        P                  ! 4       w  rR.p\        P
                  ^,          .pV ! WCVP                  R7      pVP                  VRR7       VP                  . RO4       R# )c                   8   a a ] tR tRt oV 3R ltR tRtVtV ;t# ):test_regularpolycollection_scale.<locals>.SquareCollectioni  c                V   < \         SV `  ! RR\        P                  R,          /VB  R# )r   r.  r  N)r   )super__init__r-   r4  )selfkwargs	__class__s   &,r   rB  Ctest_regularpolycollection_scale.<locals>.SquareCollection.__init__  s     G<r<V<r   c                   V P                   pRVP                  RR7      P                  ,          pW!P                  P                  ,          VP
                  P                  ,          pW!P                  P                  ,          VP
                  P                  ,          p\        P                  ! 4       P                  W44      # )z4Return transform scaling circle areas to data space.g      R@T)root)
r   
get_figuredpibboxwidthviewLimheightr   r   scale)rC  r7   
pts2pixelsscale_xscale_ys   &    r   get_transformHtest_regularpolycollection_scale.<locals>.SquareCollection.get_transform  s~    B4 8 < <<J 77==02::3C3CCG 77>>1BJJ4E4EEG'')//AAr   rq   )	__name__
__module____qualname____firstlineno__rB  rS  __static_attributes____classdictcell____classcell__)rE  __classdict__s   @@r   SquareCollectionr?    s     	=	B 	Br   r]  )r-  r   r   Tr/  Nr   )r,   r+   r,   r+   )	r   r5  r/   r0   r-   r4  r   r1   axis)r]  r6   r7   r:  circle_areassquaress         r    test_regularpolycollection_scalera    sn    B<== B llnGC
BEEAI;LGGgt,GGNr   c                  @   \         P                  ! 4       w  rVP                  ^ .^ .R.RR7      pV P                  \        P
                  ! 4       V P                  R7       \        R^R7      pVP                  V4      w  rEV'       g   Q h\        VR,          ^ .4       R# )	r   i  T)picker)rJ  iE  )r   r   indN)
r/   r0   r   savefigioBytesIOrJ  r   containsr   )r6   r7   r   mouse_eventfoundindicess         r   test_pickingrl    sx    llnGC
**aS1#vd*
3CKK

#''K*!C3/K\\+.NEL5wu~s+r   c                  \   \         P                  ! ^4      p V R,          V R,          ,          p\        P                  ! 4       w  r#VP	                  V4      pVP                  4        RRreVP                  4       P                  WV34      w  r\        WVWR7      pVP                  V4      w  rV	'       g   Q h\        V
R,          ^ .4       RRreVP                  4       P                  WV34      w  r\        WVWR7      pVP                  V4      w  rV	'       g   Q h\        V
R,          ^.4       R# )r   Nr   xdataydatar   r   rd        ?NNNNNrs  )r-   r   r/   r0   r   draw_without_renderingrS  r   r   rh  r   )r   r   r6   r7   meshro  rp  r   ri  rj  rk  s              r   test_quadmesh_containsrw  %  s    
		!A	'
QwZAllnGC==D 5))5.9DA!aEK]];/NEL5wu~s+5))5.9DA!aEK]];/NEL5wu~s+r   c                  R   ^ R.^^ ..p ^ ^.^R..p\         P                  ! 4       w  r#VP                  W^ ..4      pVP                  4        . ROpV FQ  pVw  rxp	VP	                  4       P                  Wx34      w  r\        WxWR7      p
VP                  V
4      w  rWJ d   KQ  Q h	  R# )r   rn  Nr,   ))      r  T)r   r  F)r   r  T)r   g      пT)r/   r0   r   ru  rS  r   r   rh  )r   r   r6   r7   rv  pointspointro  rp  rv   ri  rj  rk  s                r   test_quadmesh_contains_concaver|  ;  s    
R1a&A
Q!RAllnGC==u%D F
 !&h!!#--un=%E!I{3    r   c                     \         P                  ! ^4      p V R,          V R,          ,          p\        P                  ! 4       w  r#VP	                  V4      pRVn        VP                  4        RRreVP                  4       P                  WV34      w  r\        WVWR7      pVP                  V4      e   Q hVP                  \         P                  ! VP                  4      4       \        VP                  V4      ^.4       R# )r   Nr   rn  rr  rt  )r-   r   r/   r0   r   _Aru  rS  r   r   get_cursor_datar   onesshaper   )	r   r   r6   r7   rv  ro  rp  r   ri  s	            r   test_quadmesh_cursor_datar  P  s    
		!A	'
QwZAllnGC==DDG 5))5.9DA!aEK,444 	NN277177#$t++K81#>r   c                  j   . ROp \         P                  ! 4       w  rVP                  W \        P                  ! R4      4      pVP                  4        RRrTVP                  4       P                  WE34      w  r\        WEWR7      p\        VP                  V4      \        P                  ! ^	4      4       R# )r+   rq  rn  N)r+   r   r+   r   r   r   )r/   r0   r   r-   r  ru  rS  r   r   r   r  )r   r6   r7   rv  ro  rp  r   ri  s           r   )test_quadmesh_cursor_data_multiple_pointsr  d  s    AllnGC==rwwv/D 5))5.9DA!aEKt++K8"''!*Er   c                  r    \         P                  ! . RO. RORRR.3R7       \         P                  ! 4        R# )r   r%   r'   )r!   Nr   r+   r   )r/   r   drawrq   r   r   test_linestyle_single_dashesr  p  s#    KK	9b"X?HHJr   zsize_in_xy.pngc            	          \         P                  ! 4       w  rR^
^ rCpRpRR.p\        P                  ! W#VRWQP                  R7      pVP                  V4       VP                  ^ ^4       VP                  ^ ^4       R# )r   r:  )r   r   r   Nr   r   )rd   rd   )r/   r0   r   r   r   r1   r3   r4   )r6   r7   r   r   r   coordses          r   test_size_in_xyr  u  ss    llnGC&AVFF!F&&t	7A aKK2KK2r   c                 0   . ROpV P                  . R	OVR7      ;r#V P                  . R
OVR7      pV P                  . ROVR7      pV P                  . ROVR7      p\        VR7       \        VR7       \        VR7       \        VR7       \        VR7       R# )   )index)
edgecolors)r   )
linewidths)
linestyles)antialiasedsN)r        )redbluegreenr+   r   r   )r   rn   dashdot)TFT)Seriesr   )pdr  r   fclwr   r   s   &      r   test_pandas_indexingr    s     Eii0i>>B	9E	*B	1	?B	&e	4B""""Br   defaultc                     \         P                  ! . 4      p V P                  R R .4       V P                  . RO4       V P	                  4       R.^,          8X  g   Q hV P                  4       . RO^,          8X  g   Q hV P                  . RO4       V P	                  4       R.^,          8X  g   Q hV P                  4       . RO8H  P                  4       '       g   Q hR# )-Nr  r;   )r  r  r  )r   r   set_linestylesset_linewidthsget_linestylesget_linewidthsallr   s    r   test_lslw_bcastr    s    

%
%b
)CSz"y!I;?2229q=000'I;?222 I-224444r   c                      \        4       p \        P                  ! \        R R7      ;_uu_ 4        V P	                  R4       RRR4       R#   + '       g   i     R# ; i)z"Do not know how to convert 'fuzzy'matchfuzzyN)r   pytestraisesr   set_linestyler)  s    r   test_set_wrong_linestyler    s7    A	z)M	N	N	  
O	N	N	Ns   AA	c                     \         P                  ! . 4      p V P                  4       e   Q h\         P                  ! . RR7      p V P                  4       R8X  g   Q hV P                  R4       V P                  4       R8X  g   Q hR # )Nround)capstylebutt)r   r   get_capstyleset_capstyler  s    r   test_capstyler    su    

%
%b
)C%%%

%
%b7
;C(((V'''r   c                     \         P                  ! . 4      p V P                  4       e   Q h\         P                  ! . RR7      p V P                  4       R8X  g   Q hV P                  R4       V P                  4       R8X  g   Q hR # )Nr  )	joinstylemiter)r   r   get_joinstyleset_joinstyler  s    r   test_joinstyler    su    

%
%b
)C&&&

%
%bG
<C')))g')))r   zcap_and_joinstyle.pngc                     \         P                  ! 4       w  rVP                  R
R.4       VP                  R
R.4       \        P
                  ! . RO4      p\        P
                  ! R.R .R..4      \        P
                  ! . RO.4      ,           p\        P                  ! R4      pW$R&   W4R&   \        V. ROR7      pVP                  R4       VP                  R4       VP                  V4       VP                  R4       R	# )r   rq        @r%   r&   r  r  r  z2Line collection with customized caps and joinstyleNry  )r%   r&   r   )r%   r%   r&   )r   r   r   )rs  rs  r   )rs  rs  r+   )r   rd   r   )r/   r0   r3   r4   r-   r.   zerosr   r  r  r1   r2   )r6   r7   r   yssegsline_segmentss         r   test_cap_and_joinstyle_imager    s    llnGCKKsKKs
!A	C53%#'	(288_4E+F	FB88IDMM"4<@Mw'(m$LLEFr   zscatter_post_alpha.pngc                      \         P                  ! 4       w  rVP                  \        ^4      \        ^4      \        ^4      R7      pVP	                  R4       R# )rp   r  r   N)r/   r0   r   r  r  )r6   r7   scs      r   test_scatter_post_alphar    s=     llnGC	E!HeAh%(	3BLLr   c                  F   \         P                  ! ^4      p V ^,          p\        P                  ! ^4      w  pw  r4VP	                  W WR7      pVP	                  W V R7      pVP                  V4       \        P                  ! 4        \        VP                  4       R,          V4       \        VP                  4       R,          V4       \        P                  ! ^4      w  pw  r4VP	                  W . ROVR7      pVP	                  W RVR7      p\        P                  ! 4        \        VP                  4       R,          V4       \        VP                  4       R,          V4       \        P                  ! ^4      w  pw  r4VP	                  W . ROR7      pVP                  V4       VP	                  W RR7      pVP                  V4       \        P                  ! 4        \        VP                  4       R,          V4       \        VP                  4       R,          V4       R# )	rp   )r)  r;  r  r  )r    r;  )r    Nrs  r,   )r  r  r  r)  m)	r-   r   r/   r0   r   r  r  r   get_facecolors)r   r;  r6   ax0ax1sc0sc1s          r   test_scatter_alpha_arrayr    s   
		!AEEll1oOC#
++aa+
-C
++aa+
 CMM%HHJs))+E2E:s))+E2E:ll1oOC#
++a";5+
IC
++a#U+
3CHHJs))+E2E:s))+E2E:ll1oOC#
++a";+
<CMM%
++a#+
&CMM%HHJs))+E2E:s))+E2E:r   c            
         \         P                  P                  R 4       \         P                  P                  ^^
4      w  r\         P                  P                  ^
4      p\         P                  P	                  ^ ^^
R7      p\         P                  P	                  ^
R^
R7      p\
        P                  ! 4       w  rEVP                  WW#RR^ R7      pVP                  RR7      w  rx\        V4      ^8X  g   Q hV. RO8X  g   Q h\         P                  ! V U	u. uF  qP                  4       NK  	  up	4      p
VP                  \         P                  ! ^4      ^,          4      p\        W4       VP                  Wx^R7      pVP                  ^	R	7      w  r\        V4      ^	8X  g   Q hVP                  W^R7      pVP                  R
RRR7      w  rx\         ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       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                  Wx^R7      pVP                  R
^RR R7      w  rxV U	u. uF  qP#                  4       NK  	  pp	\         P$                  ! \         P                  ! V\&        4      ^,          4      p\)        VV4       VP                  Wx^R7      p\*        P,                  P/                  ^	^. ROR7      pVP                  VR	7      w  pp\        V4      \        V4      8X  g   Q h. ROpVP                  VR
RR7      w  ppV Uu. uF  p\'        V4      NK  	  upVR,          8X  g   Q hWVV3 F  pVP1                  V4       K  	  VP2                  P5                  4        R# u up	i u up	i u upi )!N,)sizei,  jetr   )r)  scmapr   r  z{x:g})fmt)loc)numr-  r   r  )rt   r;  r    c              3   F   "   T F  qP                  4       R 8H  x  K  	  R# 5i)r   N)	get_alpha.0lines   & r   	<genexpr>6test_pathcollection_legend_elements.<locals>.<genexpr>  s     514~~3&1   !FTc              3   F   "   T F  qP                  4       R 8H  x  K  	  R# 5i)r  N)get_markerfacecolorr  s   & r   r  r    s     Aqt'')U2qr  z{x:.2f}c                     ^V ,          # r   rq   )r   s   &r   <lambda>5test_pathcollection_legend_elements.<locals>.<lambda>  s    QqSr   )rt   r  r  func)nbinsmin_n_tickssteps)r  rt   r  :r   NNN)01234)r+   r   r  r   rp   r   r   r   )r,   r   g33333K@i  )r-   r   seedrandrandintr/   r0   r   legend_elementsr  r.   rD   r  r   r   legendr  get_markersizesqrtfloatr   mpltickerMaxNLocator
add_artistcanvasr  )r   r   r)  r  r6   r7   r  hlr  r$  colors2l1h2lab2l2l3actsizeslabeledsizesl4r  h5lab5levelsh6lab6s                             r   #test_pathcollection_legend_elementsr    s   IINN899>>!R DA
		rA
		!QR(A
		"c+AllnGC	AAsq	IB'*DAq6Q;;))))XXA6AD~~'A67Fggbiil1n%Gv'	1Q	B!!a!(HBr7a<<	2	#B7#UCDA351533351555553AqA333AqAAAAA	1Q	B7y#0  2DA234!$##%!H477288Au-12Lh5	1Q	B
**
 
 qc'B ! DC!!c!*HBr7c"gF!!f7!HHB"#dE!Hd#vbz111b"
a  JJOOC 7  5 $s   N66N;O c                      \         P                  ! . RO4      p \        V 4      p\         P                  P	                  V \         P                  ! . RO4      4       R# )r   N)r   r   r+   r   )r-   r.   r	   r=   r   )arrr5   s     r   test_EventCollection_nosortr  )  s7    
((=
!C3DJJ!!#rxx'>?r   c                     \         P                  ! ^P\         P                  R7      P                  ^
^^4      p \	        V 4      p\	        \        V 4      4      p\        VP                  4      \        VP                  4      8X  g   Q h\        VP                  VP                  4       Fk  w  r4\         P                  ! VP                  VP                  4      '       g   Q h\         P                  ! VP                  VP                  4      '       d   Kk  Q h	  \         P                  ! ^
\        R7      pV  Uu. uF/  p\        ;QJ d    . R V 4       F  NK  	  5M! R V 4       4      NK1  	  upVR&   \	        V4      p\        VP                  4      \        VP                  4      8X  g   Q h\        VP                  VP                  4       Fk  w  r8\         P                  ! VP                  VP                  4      '       g   Q h\         P                  ! VP                  VP                  4      '       d   Kk  Q h	  R# u upi )P   dtypec              3   8   "   T F  p\        V4      x  K  	  R # 5ir   )tuple)r  r   s   & r   r  2test_collection_set_verts_array.<locals>.<genexpr>:  s     0aE!HHas   rs  N)r-   r   doubler   r
   r  r  _pathsr  array_equal	_vertices_codesemptyobjectr  )	vertscol_arrcol_listaplpverts_tupler   col_arr_tupleatps	            r   test_collection_set_verts_arrayr+  0  s   IIb		*222q!<EU#Gd5k*Hw~~#hoo"6666gnnhoo6~~bllBLL9999~~bii3333 7 ((2V,K:?@%Qee0a0ee0a00%@KN";/Mw~~#m&:&:";;;;w~~}';';<~~bllCMM::::~~bii4444 = As   5H;%H;rD  stepprec                     \         P                  ! ^ ^4      p\         P                  ! V4      pVR,           pVP                  4       P                  ! W4V3/ VB  V P                  4       P                  ! VRR3/ VB pVP                  W4V4       R# )r   皙?g333333?Nr,   )r-   r   r   r0   fill_betweenset_data)r   r   rD  tf1f2r5   s   &&&    r   *test_fill_between_poly_collection_set_datar5  B  sx     	ArA	B	cB##A288++Ar3A&ADMM!r   r   Fz0where size \(3\) does not match 'x' size \(\d+\)r   z5'y' has size \d+, but 'x1' has an unequal size of \d+c           
      t   \         P                  ! ^ ^4      pVf   \         P                  ! V4      M\         P                  ! V4      pVR,           pV'       d   VP                  ! V!  p\
        P                  ! \        VR7      ;_uu_ 4        \        WWVR7       RRR4       R#   + '       g   i     R# ; i)r   Nr/  r  )where)	r-   r   r   asarrayr   r  r  r   r   )t_directionr3  r  r7  msgr2  r4  s   &&&&&  r   'test_fill_between_poly_collection_raiser;  O  su     	ArAjbjjnB	cBIIu	z	-	-!+"F 
.	-	-	-s   B&&B7	c                  v   . \        ^
4      Op \        4       pVP                  V 4       \        P                  ! \
        RR7      ;_uu_ 4        VP                  R4       RRR4       ^-V ^&   \        P                  ! WP                  4       4      P                  4       '       g   Q hR#   + '       g   i     LQ; i)r   z^Image data of dtyper  wrong_inputN)
r  r   r   r  r  	TypeErrorr-   	not_equal	get_arrayany)valsr)  s     r   test_collection_set_arrayrC  _  s    U2Y<D 	AKK 
y(>	?	?	M" 
@ DG<<kkm,002222 
@	?s   B((B8	c                  h   \         P                  ! 4       w  rVP                  . RO. RO4       \        P                  P                  VP                  P                  VP                  P                  3R4       VP                  P                  VP                  P                  r2. ROpV Uu. uF  p\        P                  ! V^ .V^..4      NK!  	  pp\        P                  ! VP                  VP                  4      pVP!                  \#        WgR7      4       \        P                  P                  VP                  P                  VP                  P                  3R4       \        P                  P                  VP                  P                  VP                  P                  3W#34       R# u upi )r   r   N)r   r   r   )皙?333333?r   )r   r   r+   r   r   r   rp   )r+   rp   )r/   r0   r   r-   r=   assert_allcloser   xminxmaxyminymaxr.   r   blended_transform_factoryr   	transAxesr1   r   )fr7   	data_ymin	data_ymaxr   xivertical_linesr   s           r   test_blended_collection_autolimrT  o  s   LLNEA GGI'JJ

A6J::??BJJOOy 	A=>?QrbhhQ"a12QN?11",,MEn^EF JJ

A6JJJ

A )57 @s   +%F/c                     \         P                  ! 4       w  rVP                  ^ ^ 4       \        P                  P                  VP                  4       RR.4       \        P                  P                  VP                  4       RR.4       R# )r   gQ?NgQ)r/   r0   r   r-   r=   rH  get_ylimget_xlim)r6   r7   s     r   test_singleton_autolimrX    sY    llnGCJJq!JJr{{}udm<JJr{{}udm<r   ztransform, expectedc                 J   \         P                  ! 4       w  r#VP                  ^ ^ \        W04      R7       VP                  ^^4       \        P
                  P                  VP                  4       V4       \        P
                  P                  VP                  4       V4       R# )r   r   N)	r/   r0   r   getattrr-   r=   rH  rV  rW  )r   rv   r6   r7   s   &&  r   test_autolim_with_zerosr[    sj     llnGCJJq!wr5J6JJq!JJr{{}h7JJr{{}h7r   c                    \         P                  ! ^4      p\         P                  ! ^4      p\         P                  P                  R4      p\        P                  ! 4       w  rE\        WP4      ! WV4      p\        P                  ! \        \        P                  ! R4      R7      ;_uu_ 4        VP                  VP                  ^
^4      4       RRR4       \         P                  ! ^64      P                  R4      p\        P                  ! \        \        P                  ! R4      R7      ;_uu_ 4        VP                  V4       RRR4       \        P                  ! \        \        P                  ! R4      R7      ;_uu_ 4        VP                  VP                  4       4       RRR4       \         P                  ! R4      p\        P                  ! \        \        P                  ! R4      R7      ;_uu_ 4        VP                  V4       RRR4       \         P                  ! R4      p\        P                  ! \        \        P                  ! R4      R7      ;_uu_ 4        VP                  V4       RRR4       \         P                  ! R4      p\        P                  ! \        \        P                  ! R4      R7      ;_uu_ 4        VP                  V4       RRR4       \         P                  ! ^
4      p\         P                  ! ^4      p\         P                  P                  R4      p\        P                  ! 4       w  rEVP                  WVR	R
7      pR#   + '       g   i     EL; i  + '       g   i     EL5; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELA; i  + '       g   i     L; i)r  zuFor X (11) and Y (8) with flat shading, A should have shape (7, 10, 3) or (7, 10, 4) or (7, 10) or (70,), not (10, 7)r  NztFor X (11) and Y (8) with flat shading, A should have shape (7, 10, 3) or (7, 10, 4) or (7, 10) or (70,), not (6, 9)zsFor X (11) and Y (8) with flat shading, A should have shape (7, 10, 3) or (7, 10, 4) or (7, 10) or (70,), not (54,)zwFor X (11) and Y (8) with flat shading, A should have shape (7, 10, 3) or (7, 10, 4) or (7, 10) or (70,), not (9, 6, 3)zwFor X (11) and Y (8) with flat shading, A should have shape (7, 10, 3) or (7, 10, 4) or (7, 10) or (70,), not (9, 6, 4)zxFor X (11) and Y (8) with flat shading, A should have shape (7, 10, 3) or (7, 10, 4) or (7, 10) or (70,), not (7, 10, 2)gouraudshading)   r   )r   	   )ra  r   r   )ra  r   r   )r`  r   r   )r-   r   r   r/   r0   rZ  r  r  r   reescaper   r   r   r  r   )r   r   r   r(  r6   r7   r5   s   &      r   "test_quadmesh_set_array_validationrd    s   
		"A
		!A
		!AllnGC2qQ'D	zH*I 
J 
J 	qyyQ'(
J
 			"f%A	zG*H 
I 
I 	q
I 
zF*G 
H 
H 	qwwy!
H 		A	zJ*K 
L 
L 	q
L
 		A	zJ*K 
L 
L 	q
L
 	
A	zK*L 
M 
M 	q
M
 			"A
		!A
		!AllnGC==q)=4DM
J 
J 
J
I 
I 
I
H 
H 
H
L 
L 
L
L 
L 
L
M 
MsH   -"M4M2 N<N$N.OM/	2N	N	N+	.N?	O	c                     \         P                  ! . RO. RO4      w  rW,          RR1RR13,          p\        P                  ! WV4      pVP	                  4        VP                  4       R,          p\         P                  P                  V ^ 8H  V^ 8H  ,          V 4      p \        P                  ! WV4      pVP	                  4        \        VP                  4       4      ^8X  g   Q h\        WEP                  4       4       \         P                  P                  V ^ 8H  V^ 8H  ,          V4      p\        P                  ! WV4      pVP	                  4        \        VP                  4       4      ^8X  g   Q h\        WEP                  4       4       \         P                  P                  V RR1RR13,          ^ 8H  VRR1RR13,          ^ 8H  ,          V4      p\        P                  ! V4      pVP	                  4        \        VP                  4       4      ^8X  g   Q h\        WEP                  4       4       \         P                  ! ^4      P                  R4      pVP                  V4       VP	                  4        \        VP                  4       4      ^8X  g   Q h\         P                  P                  V^4      pVP                  V4       VP	                  4        \        VP                  4       4      ^8X  g   Q hR# )r   Nr  )r   r+   r   r   r,   )rW   rs  )r   r   )r-   r   r/   r   update_scalarmappableget_facecolormamasked_wherer   r  	get_pathsr   r   r   r   masked_less)r6  r7  zzquadmeshquadmesh_fcpolymeshs         r   'test_polyquadmesh_masked_vertices_arrayrp    s^   [[L1FB
%"crc	B~~bb)H""$((*51K			R1Wq12	6Bzz""%H""$x!!#$))){$:$:$<= 
		R1Wq12	6Bzz""%H""$x!!#$))){$:$:$<= 
		RSbS\Q.2crc3B3h<13DEr	JBzz"~H""$x!!#$))){$:$:$<=
 
1		f	%Br""$x!!#$)))			2q	!Br""$x!!#$)))r   c                 B   . ROp. ROp\         P                  ! RR7      p\         P                  ! W4      w  rE\        \        V 4      ! WEV4      p\         P
                  ! VP                  VP                  .4      P                  p\        VP                  4       V4       R# )r   )r  Nr  )r   r   r   )r   r   )	r-   r  r   rZ  r/   stackr   r   get_coordinates)r   r   r   r(  r6  r7  r5   r  s   &       r   test_quadmesh_get_coordinatesrt    sr    AA
fA[[FB3*D XXrttRTTl#%%Ft++-v6r   c                  r   \         P                  ! ^4      p \         P                  ! ^4      p\         P                  ! ^	4      P                  R4      p\        P                  ! 4       w  r4VP                  W\         P                  ! VP                  4      4      pVP                  V4       VP                  P                  4        \         P                  ! VP                  4       V4      '       g   Q hVP                  \         P                  ! ^	4      4       VP                  P                  4        \         P                  ! VP                  4       \         P                  ! ^	4      4      '       g   Q h\         P                  ! ^4      P                  R4      p\        P                  ! 4       w  r4VP                  W\         P                  ! VP                  4      RR7      pVP                  V4       VP                  P                  4        \         P                  ! VP                  4       V4      '       g   Q hVP                  \         P                  ! ^4      4       VP                  P                  4        \         P                  ! VP                  4       \         P                  ! ^4      4      '       g   Q hR# )r   r]  r^  Nr  )r   r   )r-   r   r   r/   r0   r   r  r  r   r   r  r  r@  )r   r   r(  r6   r7   r5   s         r   test_quadmesh_set_arrayrv    s   
		!A
		!A
		!V$AllnGC==rwwqww/0DNN1JJOO>>$..*A.... 	NN2771:JJOO>>$..*BGGAJ7777
		"f%AllnGC==rwwqww/=CDNN1JJOO>>$..*A.... 	NN2772;JJOO>>$..*BGGBK8888r   c                 T   \         P                  ! 4       w  r\        P                  R ,          p\        P                  P                  ^ ^R7      p\        W 4      ! ^..W4R7      pVP                  P                  4        \        P                  ! VP                  4       R,          V! V! ^4      4      4      '       g   Q h^^uVn        Vn        VP                  P                  4        \        P                  ! VP                  4       R,          V! V! ^4      4      4      '       g   Q hR# )plasma)vminvmax)r  r   N)r   rs  )r/   r0   r  	colormapsr$  	NormalizerZ  r   r  r-   r  r  ry  rz  )r   r6   r7   r  r   r5   s   &     r   test_quadmesh_vmin_vmaxr}  %  s    llnGC=="D::QQ/D2u4;DJJOO>>$--/5tDG}EEEE aDItyJJOO>>$--/5tDG}EEEEr   c                    \         P                  ! ^4      p\         P                  ! ^4      p\         P                  ! ^	4      P                  R4      pW3P                  4       ,          pVP	                  4       p\
        P                  ! ^4      w  pw  rx\        Wp4      ! WW4R7      p	\        Wp4      ! WV4      p
V
P                  V4       \
        P                  ! 4        \        V	P                  4       R,          V4       \        V
P                  4       R,          V4       \
        P                  ! ^4      w  pw  rx\        Wp4      ! WW4R7      p	\        W4      ! WV4      p
V
P                  V4       \
        P                  ! 4        \        V	P                  4       R,          V4       \        V
P                  4       R,          V4       R# )r   )r;  Nr  r  )r-   r   r   maxr   r/   r0   rZ  r  r  r   r  )r   r   r   r(  r;  
alpha_flatr6   r  r  coll1coll2s   &          r   test_quadmesh_alpha_arrayr  5  s@   
		!A
		!A
		!V$AKEJll1oOC#C q6EC q)E	OOEHHJu++-e4jAu++-e4jAll1oOC#C q6EC q)E	OOEHHJu++-e4jAu++-e4jAr   c                 d   \         P                  ! 4       w  r\        W 4      ! \        P                  ! ^4      P                  R4      4      p\        P                  ! \        RR7      ;_uu_ 4        VP                  RR.4       VP                  4        RRR4       R#   + '       g   i     R# ; i)r  z^Data array shaper  r   rF  N)r   r   )r/   r0   rZ  r-   r   r   r  r  r   r  rf  )r   r6   r7   pcs   &   r   test_alpha_validationr  M  sn    llnGC		RYYr]226:	;B	z)<	=	=
c3Z 
  " 
>	=	=	=s   0$BB/	c                 P   \         P                  P                  R4       \         P                  P                  ^24      p \         P                  P                  ^24      p^\         P                  P                  ^24      ,
          p^V,          p. ROp\        P                  ! 4       w  rVVP                  WVR7      pVP                  RVR R7      w  rV U
u. uF  qP                  4       NK  	  pp
V U
u. uF  p
^V
^,          ,          NK  	  pp
\        W^R7       R# u up
i u up
i )	zl
Ensure legend markers scale appropriately when label and size are
inversely related.
Here label = 5 / size
r  r  r-  c                     ^V ,          # )rp   rq   r  s   &r   r  =test_legend_inverse_size_label_relationship.<locals>.<lambda>g  s    QUr   )rt   r  r  r   N)r/  rE  rF  g?)	r-   r   r  r/   r0   r   r  r  r   )r   r   CSlegend_sizesr6   r7   r  handleslabelsr   handle_sizess               r   +test_legend_inverse_size_label_relationshipr  V  s     IINN8
		A
		A	BIIR  A	AA'LllnGC	AA	B((? ) OG
 1881$$&L8&23lA1HHlL3l!D 93s   D4D#c                    \        \        V 4      p \        P                  ! ^4      P	                  ^^4      pV ! VRRR7      pVP                  4        \        P                  ! VP                  4       4      pVP                  4       ! VP                  VP                  4       4      4      p\        P                  ! VP                  4       R4      '       g   Q hV ! V4      pVP                  R4       VP                  R4       VP                  4        \        P                  ! VP!                  4       R4      '       g   Q h\        P                  ! VP                  4       . RO.4      '       g   Q hVP#                  R4       VP                  4        \        P                  ! VP                  4       . RO.4      '       g   Q hVP#                  R4       VP                  4        \        P                  ! VP                  4       . RO.4      '       g   Q hVP                  R4       VP                  4        \        P$                  ! VP                  4       V4      '       g   Q hVP                  R4       VP                  4        \        P$                  ! VP!                  4       V4      '       g   Q h\        P                  ! VP                  4       R4      '       g   Q hVP'                  R4       VP                  4        \        P                  ! VP                  4       R4      '       g   Q h\        P                  ! VP!                  4       V4      '       g   Q hVP'                  V4       VP                  4        \        P$                  ! VP!                  4       V4      '       g   Q h\        P                  ! VP                  4       R4      '       g   Q hV ! VRR	R7      pVP                  4        \        P$                  ! VP!                  4       V4      '       g   Q h\        P                  ! VP                  4       . RO.4      '       g   Q hV ! VR\        P(                  ! R
4      R7      pVP                  4        \        P$                  ! VP!                  4       V4      '       g   Q h\        P                  ! VP                  4       . RO.4      '       g   Q hVP'                  R4       VP                  4        \        P                  ! VP!                  4       \        P(                  ! R
4      4      '       g   Q h\        P                  ! VP                  4       . RO.4      '       g   Q hV ! VR\        P(                  ! R4      R7      pVP                  4        \        P$                  ! VP!                  4       V4      '       g   Q h\        P                  ! VP                  4       . RO.4      '       g   Q hVP'                  R4       VP                  4        \        P                  ! VP!                  4       \        P(                  ! R4      4      '       g   Q h\        P                  ! VP                  4       . RO.4      '       g   Q hR# )r  r  r}   )r  r   r   Nr*   )r+   r   r   r   )r+   r   r   )r   r+   r   )r  r   )r  r   )rZ  r/   r-   r   r   rf  mcolorsto_rgba_array_get_default_facecolorget_cmapr   r   
same_colorget_edgecolorset_facecolorset_edgecolorrg  r  r  r   r  )r   r(  r  face_defaultmappeds   &    r   test_color_logicr  q  s   S&!F
		"a#A	e	7B(()B)B)DEL[[]2771779-.Fb..0%8888	BVUb..0&9999b..0<.AAAALLb..0>2BCCCCLLb..0<.AAAAT>>"**,f5555T>>"**,f5555b..0&9999LLb..0&9999b..0,????LLO>>"**,f5555b..0&9999	iI	>B>>"**,f5555b..0<.AAAA	iBGGG4D	EB>>"**,f5555b..0<.AAAALLb..0"'''2BCCCCb..0<.AAAA	iBGGG4D	EB>>"**,f5555b..0<.AAAALLb..0"'''2BCCCCb..0<.AAAAr   c                     \        R RR^. ROR7      p V P                  4       ^ ,          R8X  g   Q h\        P                  ! V P	                  4       R4      '       g   Q hV P                  4       ^8X  g   Q h\        P                  ! V P                  4       . RO.4      '       g   Q h\        R R R7      p \        P                  ! V P                  4       R4      '       g   Q hR # )Ng@r  )r   	edgecolorzorderr   )	facecolorr}   )r   r+   r   r+   )r   get_linewidthr  r  r  
get_zorderrg  )lcs    r   test_LineCollection_argsr    s    	s \
;Ba C'''b..0#6666==?ab..0<.AAAA 
	-Bb..0&9999r   c                    \         P                  ! ^4      P                  ^^4      p\        \        V 4      ! V4      pVP                  VP                  4       4       VP                  4        VP                  V4       VP                  4        \         P                  ! ^$\         P                  R7      P                  ^^^4      pVP                  V4       VP                  4        R# )r  r  N)	r-   r   r   rZ  r/   r   r   rf  uint8)r   r(  r  s   &  r   test_array_dimensionsr    s    
		"a#A	f	a	 BLLLLO
		"BHH%--aA6ALLOr   c                      \         P                  ! \         P                  ! ^ ^R4      R4      P                  p \	        V .4      pVP                  4       w  p\         P                  ! W8H  4      '       g   Q hR# )r      N)r   r+   )r-   tiler   r   r   r~   r  )r   r  readbacks      r   test_get_segmentsr    sW    wwr{{1a-v688H	
	#B!IH66(&''''r   c                     \         P                  ! 4       p ^.p\        P                  ! VR7      p\        P                  ! VRR7      p\        P                  ! VR7      pVP	                  R4       VP                  V 4      P                  pVP                  V 4      P                  pVP                  V 4      P                  pWV8w  g   Q hWg8X  g   Q hR# )r   )r-  )r-  r   Nr  )r   r   r   CircleCollectionset_offsetsr   r   )identityr-  r   initlatenull_boundsinit_boundslate_boundss           r   test_set_offsets_later    s    ,,.HCE((u5D((uhGD((u5DX ""8,33K""8,33K""8,33K %%%%%%r   c                  (   \         P                  ! 4       P                  ^^4      p \        P                  ! V R7      p\        P                  ! 4       pVP                  V 4       WP                  4       u;8X  d   VP                  4       8X  g   Q h Q hR# )r   )r   N)r   r   skewr   r   set_offset_transformget_offset_transform)r  r  r  s      r   test_set_offset_transformr    sr    !&&q!,D""D9D""$Dd#,,.M$2K2K2MMMMMMr   c                     \         P                  ! ^ ^
^4      p \         P                  ! V 4      pV \         P                  ! ^R4      ,          \         P                  ! R4      ,           p\
        P                  ! W!4      pVP                  4       pVP                  \        \        W!4      4      4       \         P                  P                  WCP                  4       4       \
        P                  ! 4       w  rVVP                  W4      pVP                  4       pVP                  \        \        W4      4      4       \         P                  P                  WCP                  4       4       R# )r   r  z
2021-11-29N)r-   r   r   timedelta64
datetime64r/   r   get_offsetsr  r  r  r=   rH  r0   )r   r   dr  off0r6   r7   s          r   test_set_offset_unitsr    s     	Ar1A
q	A	BNN2s##bmmL&AAA	Q	B>>DNN4A	?#JJt^^%56 llnGC	A	B>>DNN4A	?#JJt^^%56r   test_check_masked_offsets)baseline_imagesr   r   r
  c                  :   \        R ^^^^1^44      \        R ^^^^1^54      \        R ^^^^1^64      \        R ^^^^1^74      \        R ^^^^1^84      .p \        P                  P                  . RO. ROR7      p\        P
                  ! 4       w  r#VP                  W4       R# )i  maskNrG  )r   r+   r+   r   r   )r   r-   rh  r.   r/   r0   r   )
unmasked_xmasked_yr6   r7   s       r   r  r    s     	r2q"b)r2q"b)r2q"b)r2q"b)r2q"b)J uu{{?{AHllnGCJJz$r   c                    \         P                  P                  . RO. ROR7      p\         P                  ! ^^4      pVP	                  4       pVP                  W#4      pVP                  \         P                  P                  W#.4      4       VP                  . 4       VP                  . 4       V P	                  4       pVP                  . RO. RO4       VP                  . 4       VP                  . 4       R# )r+   r  NrG  r   r   r+   r+   r   )r+   r   rp   )
r-   rh  r.   r   add_subplotr   r  column_stack
set_xticks
set_yticks)r   r   r   r   r   scatr   s   &&     r   test_masked_set_offsetsr  $  s    
O/:A
		!QA""$G??1 DRUU''/0rr  "F
NN9i(
b
br   c                  ,   \         P                  P                  . RO. ROR7      p \         P                  ! ^^4      p\        P
                  ! 4       w  r#VP                  W4      p\         P                  P                  W.4      pVP                  V4       \        VP                  4       \        V4      4      '       g   Q h\         P                  ! W.4      pVP                  V4       \        VP                  4       \        V4      4      '       g   Q hR# )r+   r  NrG  r  )r-   rh  r.   r   r/   r0   r   r  r  
isinstancer  type)r   r   r6   r7   r  masked_offsetsunmasked_offsetss          r   test_check_offsets_dtyper  5  s    
O/:A
		!QAllnGC::aDUU''/N^$d&&($~*>????v.%&d&&($/?*@AAAAr   gapcolororanger  r  c                    V P                  ^o4      pVP                  ^o4      pW43 F'  pVP                  ^ ^4       VP                  ^ ^4       K)  	  \        ^^4      p. ROpVP	                  V^ ^^WrRR7       \        V\        4      '       d   V.p\        V\        P                  ! V4      \        P                  ! V4      4       F  w  rhp	VP                  V^ ^^WRR7       K  	  R# )o   r   )r   r!   r  r;  N):r  z--)r  r3   r4   r  vlinesr  strr  	itertoolscycleaxvline)
r   r   r  r   r   r7   r   r  gcolr   s
   &&&       r   test_striped_linesr  E  s     ""3'G  %F
Aq
Aq   	aA!JNN1abJ   (C  :1iooh7$??:68q!Q"QTU8r   c                    V P                  4       pVP                  4       pR p. RO. RO.p\        VRR7      pVP                  V4       \        P                  ! RV/4      ;_uu_ 4        \        VRR7      pRRR4       VP                  V4       VP                  X4       VP                  4       VP                  4       u;8X  d	   V8X  g   Q h Q hR#   + '       g   i     Ld; i)r'   r   )hatchzhatch.linewidthN))r   r   )r   rE  )rE  rE  )rE  r   ))rF  rF  )rF  ?)r  r  )r  rF  )r  r
   set_hatch_linewidthr  
rc_contextr1   get_hatch_linewidth)r   r   r   r   r  polygonsreftests   &&      r   test_hatch_linewidthr  ]  s    ""$G  "F	B 	98H 
-CB	*B/	0	0hc2 
1 #4 ##%)@)@)BHbHHHHH 
1	0s   )CC#	)'EventCollection_plot__set_linestyle.pngr  z'EventCollection_plot__set_linewidth.png)r9  r3  r  r7  r:  )r(  NNNz't_direction must be 'x' or 'y', got 'z')r   N)r,   r+   Nz'x' is not 1-dimensional)r   )ry  g      @)rN  )gffffff@g	@)r   pdfsvgeps)sr   rf  r  platformrb  typesr   numpyr-   numpy.testingr   r   r  
matplotlibr  matplotlib.pyplotpyplotr/   matplotlib.collectionscollectionsr   matplotlib.colorsr$  r  matplotlib.pathpathr   matplotlib.transforms
transformsr   r   r   r	   r
   r   matplotlib.testing.decoratorsr   r   fixturer   r9   rG   rN   rR   rU   rY   r]   r_   rb   rg   rl   rw   r{   r<   r   r   r   r   r
  contextr   r   r   machiner   r	  r*  r<  ra  rl  rw  r|  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r+  markparametrizer5  r;  rC  rT  rX  r[  rd  rp  rt  rv  r}  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  rq   r   r   <module>r     s    	   	 !  G    - #  +E E < O h/0 1%P 678= 9=2 <=>
 ?
 <=> ?" ?@A B ?@A B ABC D  EFG= H=( >?@ A  =>? @ =>? @   
	7
	7 89:1 ;104!==' 7() ) )08") 56D#++-9auFF&(CV -.DP" Q"J 56DI J 454H I8,,,!*?(	F
 #$$7 8  " 9
5 
5! 9( ( 9* * *+,G -G& +,")55;:.b@5$ (B#89 : ) GG;$ugk#VW1a&$VW	J GG3 7*= .1 	8		8-5`-*`	79<F B0#E6 9BB BBJ: (&*N7( #>"?#W$gG%G%" ( ) B  hc
%;<(V ) =V,  <=I >Ir   