+
     ]i   c                   s   ^ 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)Zparamsc                 s    V P                   # N)Zparam)Zrequest   &H/usr/lib64/python3.14/site-packages/matplotlib/tests/test_collections.pypcfuncr      s    ==    c                 s   \         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props                r   generate_EventCollection_plotr4      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                  s   \        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)r4   check_segmentsr'   testingr   get_positionsget_orientationis_horizontalget_linelengthget_lineoffsetZget_linestyle	get_color
get_colors)_r/   r2   r          r    test__EventCollection__get_propsrA   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                  st   \        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&   )
r4   r'   hstackZset_positionsr7   r   r8   r6   r,   r-   spltr/   r2   new_positionsr@   r   $test__EventCollection__set_positionsrF   _   s    57DIIu[159J3KLMM}%JJ!!-1C1C1EF4&&') 	NN34MM"br   z'EventCollection_plot__add_positions.pngc                  s   \        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&   )r4   r'   rB   switch_orientationZadd_positionsr7   r   r8   r6   r,   r-   rC   r@   r   $test__EventCollection__add_positionsrH   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                  s   \        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&   )
r4   r'   rB   Zappend_positionsr7   r   r8   r6   r,   r-   rC   r@   r   'test__EventCollection__append_positionsrI      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                  s   \        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&   )
r4   r'   rB   Zextend_positionsr7   r   r8   r6   r,   r-   rC   r@   r   'test__EventCollection__extend_positionsrK      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                  sd   \        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&   )	r4   rG   r9   r:   r8   r6   r,   r.   r-   )rD   r/   r2   new_orientationrE           r   )test__EventCollection__switch_orientationrO      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                 s   \        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)
r4   rG   r8   r9   r:   r'   r7   r   r6   r,   rC   r@   r   ,test__EventCollection__switch_orientation_2xrP      s     67D&&(M4#7#7#9999JJ!!%"4mD4 &&'	)
 	NN;<r   z)EventCollection_plot__set_orientation.pngc                  sT   \        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# )rL   r   r   r   z EventCollection: set_orientationNr&   )r4   Zset_orientationr9   r:   r6   r,   r.   r-   )rD   r/   r2   rM   r@   r   &test__EventCollection__set_orientationrQ      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                  s    \        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)r4   Zset_linelengthr;   r6   r,   r.   )rD   r/   r2   Znew_linelengthr@   r   %test__EventCollection__set_linelengthrS      sy    57DN'0022224%!&'	)
 	NN45MM#rr   z(EventCollection_plot__set_lineoffset.pngc                  s    \        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      ii)r4   Zset_lineoffsetr<   r6   r,   r.   )rD   r/   r2   Znew_lineoffsetr@   r   %test__EventCollection__set_lineoffsetrT      sy    57DN'0022224%&!'	)
 	NN45MM"br   c                  s    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    )      @rV   )r      rW    )r4   setr)   Zgetpr,   )propZvalueexpectedrD   r/   r?            r   test__EventCollection__set_propr]      s|     (_$56-/):;"X
 67A!D=!xx#x///.tf56"r   z#EventCollection_plot__set_color.pngc                  s"   \        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%   )	r4   r'   r(   	set_colorr=   r>   r7   r   r,   )rD   r/   r?   Z	new_colorr   rN   r    test__EventCollection__set_colorr_     sg    13MD&INN9.."7T__%67


%%e7 8NN/0r   c                s   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   noneNrL   z.orientation must be 'horizontal' or 'vertical')get_segmentsZlower
ValueErrorZ	enumerate)
r/   r   r   r   r   segmentsZpos1Zpos2ZiZsegments
   &&&&&     r   r6   r6     s    
   "H|+  "f,0C				
	*IJJ  )
q$w:Q#>>>>q$w:Q#>>>>q$w9<///q$w9<///	 *r   c                  s`   \         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# )i   )r(   N)         gUUUUUU?)r'   arangereshapemcollectionsr   norm	set_array)Zlinesr/        r   test_collection_norm_autoscalerm   )  sy    IIbM!!),E&&uBIIaLAD99Q<5   NN299Q<!#$99Q<5   r   c                  s   \         P                  ! . 4      p V P                  \        P                  ! 4       4      p\        VP                  4       \        P                  P                  4       P                  4       4       R # r   )	ri   PathCollectionget_datalimmtransformsIdentityTransformr   
get_pointsBboxnull)colZcol_data_limrl   r   test_null_collection_datalimrv   3  sW    

%
%b
)C??;#@#@#BCL|..0"'',,.99;=r   c                  s|   \         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)   axesri   rn   mpathZPathr+   ro   rp   rq   r   rr   rs   rt   )r1   r/   Zcoll_data_lim      r   test_no_offsets_datalimr{   :  s     
B&&

FF3C(D'EFDd$$[%B%B%DEM}//1"'',,.99;=r   c                  s   \         P                  ! 4        \         P                  ! 4       p V P                  ^ ^.^ ^.4       V P                  P
                  pV P                  . . 4       V P                  P
                  V8X  g   Q hR# r5   )r)   figurerx   scatterdataLimbounds)r1   r   rl   r   test_add_collectionr   E  sc     JJL	BJJ1v1vZZFJJr2::&&&r   Zmpl20png)
extensionsc                 s   . 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>ZlogoZ )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flattenr*   Z
set_xscaleZ
set_yscaleZmarginsr}   plot)fig_testfig_refZx_valsZy_valsxyax_testax_ref   &&      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                  sl   \         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      .@rV   )r)   rx   r'   rg   linspacerh   Zquiverro   	transDatar   r|   r   rp   Affine2D	translatesincosr~   )r1   r   r   ZuZvZqtrans          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                  s   \         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# )rW   r   ZdecimalNr   r   )   i   rR      )r)   rx   r'   r   r   rp   r   r   r   Zbarbsr   r   r   r~   r   )r1   r   r   r   r@   r   test_barb_limitsr   {  s    	B
BBA
B2A;;qDA  ",,R4r||CEIIaBFF1IrvvayE: bjj//&')r   z EllipseCollection_test_image.pngTZx86_64g/$?)remove_textZtolc            
      s:   \         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# )rd   r   r`   )unitsoffsetsoffset_transform
facecolorsNr&   )r)   r*   r'   rg   r   ZvstackravelTZ	ones_likeri   EllipseCollectionr   r+   autoscale_view)r0   r1   r   r   XYZXYZwwZhhaaec              r   test_EllipseCollectionr     s     llnGC
		!A
		!A;;qDA	AGGIqwwy)	*	,	,B	
rUB	
rUB	b	B	B		'	'
#rLL
B br   c            	      s   \         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rf   )re   )i-   )
   rf   r   )r'   randomZdefault_rngr)   r*   ri   r   r   r   Z_widthsr(   r   Z_heightsZ_anglesZdeg2radZ
get_widthsZget_heightsZ
get_anglesr+   r-   r.   rY   )Zrngr   r   r   r   r0   r1   r   Z
new_widthsZnew_heightsZ
new_anglesr   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                  s
   ^ 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?)zsZzdirN)rgbr   k)Zmpl_toolkits.mplot3dr   r)   ZrcParamsr|   Zadd_axeslistrangeri   r   len	set_alphazipZextendr^   Zadd_collection3dZ
set_xlim3dZ
set_zlim3dZ
set_ylim3d)r   Z	vertsQuadr0   r1   colorsZzposZpolyr   Zcszcr   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            	      s   \         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ZautolimN)r   r   )id   )r'   ZmgridZ	transposer   r   pir   r)   r*   r   ri   RegularPolyCollectionr   r+   r   )	xxyyZ	xy_pointsZ	rotationsr0   r1   xyalpharu   	            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                  s    ! 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                   s8   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                sV   < \         SV `  ! RR\        P                  R,          /VB  R# )rd   r   r   N)rd   )Zsuper__init__r'   r   )selfkwargs	__class__s   &,r   r   ZCtest_regularpolycollection_scale.<locals>.SquareCollection.__init__  s     G<r<V<r   c                s   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)Zroot)
rx   Z
get_figuredpiZbboxZwidthZviewLimZheightrp   r   Zscale)r   r1   Z
pts2pixelsZscale_xZscale_y   &    r   get_transformZHtest_regularpolycollection_scale.<locals>.SquareCollection.get_transform  s~    B4 8 < <<J 77==02::3C3CCG 77>>1BJJ4E4EEG'')//AAr   rX   )	Z__name__Z
__module__Z__qualname__Z__firstlineno__r   r   Z__static_attributes__Z__classdictcell__Z__classcell__)r   Z__classdict__s   @@r   SquareCollectionr     s     	=	B 	Br   r   )r   r   r   Tr   Nrw   )r&   r%   r&   r%   )	ri   r   r)   r*   r'   r   r   r+   Zaxis)r   r0   r1   r   Zcircle_areasZsquaresr\   r    test_regularpolycollection_scaler     sn    B<== B llnGC
BEEAI;LGGgt,GGNr   c                  s@   \         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)Zpicker)r   iE  )r   r   indN)
r)   r*   r}   ZsavefigioZBytesIOr   r   containsr   )r0   r1   ru   mouse_eventfoundindicesr\   r   test_pickingr     sx    llnGC
**aS1#vd*
3CKK

#''K*!C3/K\\+.NEL5wu~s+r   c                  s\   \         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# )rd   Nr   xdataydatar   r   r         ?NNNNNr   )r'   rg   r)   r*   r   draw_without_renderingr   r   r   r   r   )r   r   r0   r1   meshr   r   r   r   r   r   r   r   test_quadmesh_containsr   %  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                  sR   ^ 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    r   Nr&   ))      r   T)r    r   F)r   r   T)r    g      пT)r)   r*   r   r   r   r   r   r   )r   r   r0   r1   r   ZpointsZpointr   r   r[   r   r   r   r3   r   test_quadmesh_contains_concaver   ;  s    
R1a&A
Q!RAllnGC==u%D F
 !&h!!#--un=%E!I{3    r   c                  s   \         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# )rd   Nr   r   r   r   )r'   rg   r)   r*   r   Z_Ar   r   r   r   get_cursor_datark   onesshaper   )	r   r   r0   r1   r   r   r   r   r   r   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                  sj   . 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%   r   r   N)r%   rf   r%   rf   re   re   )r)   r*   r   r'   r   r   r   r   r   r   r   )r   r0   r1   r   r   r   r   r              r   )test_quadmesh_cursor_data_multiple_pointsr   d  s    AllnGC==rwwv/D 5))5.9DA!aEKt++K8"''!*Er   c                  sr    \         P                  ! . RO. RORRR.3R7       \         P                  ! 4        R# )r    r   r!   )r   Nr    r%   rf   )r)   r}   drawrX   r   r   test_linestyle_single_dashesr   p  s#    KK	9b"X?HHJr   zsize_in_xy.pngc            	      s    \         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   )rR   rR   )r)   r*   ri   r   r   r+   r-   r.   )r0   r1   r   r   r   coordsZer   r   test_size_in_xyr  u  ss    llnGC&AVFF!F&&t	7A aKK2KK2r   c                 s0   . 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)ZantialiasedsN)r     i   )redZblueZgreenr%   rf   re   )r   rU   Zdashdot)TFT)ZSeriesr   )Zpdr  r   Zfclwr   r      &      r   test_pandas_indexingr    s     Eii0i>>B	9E	*B	1	?B	&e	4B""""Br   Zdefaultc                  s   \         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  r5   )r  r  r  )ri   rn   Zset_linestylesZset_linewidthsZget_linestylesZget_linewidthsallru       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                  s    \        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'ZmatchZfuzzyN)r   pytestraisesrb   Zset_linestyler   r  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)ZcapstyleZbutt)ri   rn   Zget_capstyleset_capstyler  r  r   test_capstyler    su    

%
%b
)C%%%

%
%b7
;C(((V'''r   c                  r  )Nr  )Z	joinstylemiter)ri   rn   Zget_joinstyleset_joinstyler  r  r   test_joinstyler    su    

%
%b
)C&&&

%
%bG
<C')))g')))r   zcap_and_joinstyle.pngc                  s   \         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   r         @r   r    r   r  r  z2Line collection with customized caps and joinstyleNr   )r   r    r   )r   r   r    )re   re   rf   )r   r   r    )r   r   r%   )r   rR   r   )r)   r*   r-   r.   r'   r(   Zzerosr   r  r  r+   r,   )r0   r1   r   ZysZsegsZline_segmentsr\   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                  s    \         P                  ! 4       w  rVP                  \        ^4      \        ^4      \        ^4      R7      pVP	                  R4       R# )rW   r  r   N)r)   r*   r}   r   r   )r0   r1   scrz   r   test_scatter_post_alphar#    s=     llnGC	E!HeAh%(	3BLLr   c                  sF   \         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# )	rW   )r   r   r  r   )r   r   )r   Nr   r&   )r   r   r   r   Zm)	r'   rg   r)   r*   r}   r   r   r   get_facecolors)r   r   r0   ax0ax1Zsc0Zsc1r   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            
      s   \         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,)Zsizei,  Zjetr   )r   scmapr   r  z{x:g})fmt)loc)numr   r   r
  )rZ   r   r   c              3   F   "   T F  qP                  4       R 8H  x  K  	  R# 5i)r   N)Z	get_alpha.0line   & r   	<genexpr>6test_pathcollection_legend_elements.<locals>.<genexpr>  s     514~~3&1   !FTc              3   r/  )r
  N)Zget_markerfacecolorr0  r3  r   r4  r5    s     Aqt'')U2qr6  z{x:.2f}c                 s    ^V ,          # r   rX   )r   r   r   <lambda>Z5test_pathcollection_legend_elements.<locals>.<lambda>  s    QqSr   )rZ   r.  r,  func)ZnbinsZmin_n_ticksZsteps)r.  rZ   r,  :rf   NNN)Z0Z1Z2Z3Z4)r%   rf   r   re   rW   r   r   r   )r&   r    g33333K@i  )r'   r   seedZrandZrandintr)   r*   r}   legend_elementsr   r(   r=   r+  rg   r   Zlegendr  get_markersizeZsqrtZfloatr   mplZtickerZMaxNLocatorZ
add_artistcanvasr   )r   r   r   r*  r0   r1   r"  hZlr2  r   Zcolors2Zl1Zh2Zlab2Zl2Zl3ZactsizesZlabeledsizesZl4r-  Zh5Zlab5ZlevelsZh6Z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                  s    \         P                  ! . RO4      p \        V 4      p\         P                  P	                  V \         P                  ! . RO4      4       R# )re   N)re   rf   r%   r   )r'   r(   r   r7   r   )Zarrr/   rl   r   test_EventCollection_nosortr@  )  s7    
((=
!C3DJJ!!#rxx'>?r   c                  s   \         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 )iP   Zdtypec              3   s8   "   T F  p\        V4      x  K  	  R # 5ir   )tuple)r1  r   r3  r   r4  Z2test_collection_set_verts_array.<locals>.<genexpr>:  s     0aE!HHas   r   N)r'   rg   Zdoublerh   r   r   r   Z_pathsr   array_equalZ	_verticesZ_codesZemptyZobjectrB  )	ZvertsZcol_arrZcol_listZapZlpZverts_tupler   Zcol_arr_tupleZatpr   r   test_collection_set_verts_arrayrD  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;r   ZstepZprec                 s    \         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   r*   Zfill_betweenZset_data)r   r   r   tf1f2r/   s   &&&    r   *test_fill_between_poly_collection_set_datarI  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           
      st   \         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    NrE  r  )where)	r'   r   r   Zasarrayrh   r  r  rb   r	   )t_directionrG  r   rJ  msgrF  rH  s   &&&&&  r   'test_fill_between_poly_collection_raiserM  O  su     	ArAjbjjnB	cBIIu	z	-	-!+"F 
.	-	-	-s   B&&B7	c                  sv   . \        ^
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  Zwrong_inputN)
r   r   rk   r  r  Z	TypeErrorr'   Z	not_equal	get_arrayZany)Zvalsr   rl   r   test_collection_set_arrayrO  _  s    U2Y<D 	AKK 
y(>	?	?	M" 
@ DG<<kkm,002222 
@	?s   B((B8	c                  sh   \         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 )rf   r   N)rf   re   rd   )皙?333333?r   )rf   rd   r%   rf   re   rd   rW   )r%   rW   )r)   r*   r   r'   r7   assert_allcloser~   ZxminZxmaxZyminZymaxr(   rp   Zblended_transform_factoryr   	transAxesr+   r   )Zfr1   Z	data_yminZ	data_ymaxr   ZxiZvertical_linesr   r   r   test_blended_collection_autolimrU  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                  s   \         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)   r*   r}   r'   r7   rS  get_ylimget_xlim)r0   r1   rl   r   test_singleton_autolimrX    sY    llnGCJJq!JJr{{}udm<JJr{{}udm<r   ztransform, expectedc                 sJ   \         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)   r*   r}   getattrr'   r7   rS  rV  rW  )r   r[   r0   r1   s   &&  r   test_autolim_with_zerosrZ    sj     llnGCJJq!wr5J6JJq!JJr{{}h7JJr{{}h7r   c                 s   \         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Zshading)   r   )r   	   )r^  r   re   )r^  r   rd   )r]  r   rf   )r'   rg   r   r)   r*   rY  r  r  rb   reZescaperk   rh   r   r   r   )r   r   r   r   r0   r1   r/   r  r   "test_quadmesh_set_array_validationr`    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                  s   \         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%   rf   re   r&   )rJ   r   )re   rf   )r'   r   r)   r   update_scalarmappableget_facecolormaZmasked_wherer   r   Z	get_pathsr   rg   rh   rk   Zmasked_less)r   r   ZzzZquadmeshZquadmesh_fcZpolymeshr\   r   'test_polyquadmesh_masked_vertices_arrayrd    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                 sB   . 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   )rf   rd   r   )rf   rf   )	r'   r   r   rY  r)   Zstackr   r   Zget_coordinates)r   r   r   r   r   r   r/   r  s   &       r   test_quadmesh_get_coordinatesre    sr    AA
fA[[FB3*D XXrttRTTl#%%Ft++-v6r   c                  sr   \         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# )rd   r[  r\  Nr   )rd   rd   )r'   rg   rh   r)   r*   r   r   r   rk   r=  r   rC  rN  )r   r   r   r0   r1   r/   r\   r   test_quadmesh_set_arrayrf    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                 sT   \         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# )Zplasma)vminvmax)r+  rj   N)r    r   )r)   r*   r<  Z	colormapsr   Z	NormalizerY  r=  r   r'   rC  r%  rg  rh  )r   r0   r1   r+  rj   r/   s   &     r   test_quadmesh_vmin_vmaxri  %  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                 s   \         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# )rd   )r   Nr   r$  )r'   rg   rh   Zmaxr   r)   r*   rY  r   r   r   r%  )r   r   r   r   r   Z
alpha_flatr0   r&  r'  Zcoll1Zcoll2s   &          r   test_quadmesh_alpha_arrayrj  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                 sd   \         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   rQ  N)re   rd   )r)   r*   rY  r'   rg   rh   r  r  rb   r   ra  )r   r0   r1   pcs   &   r   test_alpha_validationrl  M  sn    llnGC		RYYr]226:	;B	z)<	=	=
c3Z 
  " 
>	=	=	=s   0$BB/	c                 sP   \         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                 s    ^V ,          # )rW   rX   rm  r   r   r7  Z=test_legend_inverse_size_label_relationship.<locals>.<lambda>g  s    QUr   )rZ   r.  r8  r   N)rE  rP  rQ  g?)	r'   r   r9  r)   r*   r}   r:  r;  r   )r   r   ZCZSZlegend_sizesr0   r1   r"  ZhandlesZlabelsr   Zhandle_sizess               r   +test_legend_inverse_size_label_relationshiprn  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                 s   \        \        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	  re   )r	  rd   )rY  r)   r'   rg   rh   ra  mcolorsZto_rgba_arrayZ_get_default_facecolorZget_cmaprj   r   
same_colorget_edgecolorZset_facecolorZset_edgecolorrb  r   rC  rk   r   )r   r   rk  Zface_defaultZmappedr   r   test_color_logicrr  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                  s   \        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   Z	edgecolorZzorderr   )Z	facecolorr`   )r    r%   r    r%   )r   Zget_linewidthro  rp  rq  Z
get_zorderrb  )lcr  r   test_LineCollection_argsrt    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                 s   \         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	  rA  N)	r'   rg   rh   rY  r)   rk   r   ra  Zuint8)r   r   rk  s   &  r   test_array_dimensionsru    s    
		"a#A	f	a	 BLLLLO
		"BHH%--aA6ALLOr   c                  s    \         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    i   N)rf   r%   )r'   Ztiler   r   r   ra   r  )rc   rs  Zreadbackrz   r   test_get_segmentsrv    sW    wwr{{1a-v688H	
	#B!IH66(&''''r   c                  s   \         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# )rf   )r   )r   r   Nr  )rp   rq   ri   ZCircleCollectionset_offsetsro   r   )Zidentityr   rt   initlateZnull_boundsZinit_boundsZlate_boundsr   r   test_set_offsets_laterz    s    ,,.HCE((u5D((uhGD((u5DX ""8,33K""8,33K""8,33K %%%%%%r   c                  s(   \         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# )rf   )r   N)rp   r   skewri   r   Zset_offset_transformZget_offset_transform)r{  rx  ry  rz   r   test_set_offset_transformr|    sr    !&&q!,D""D9D""$Dd#,,.M$2K2K2MMMMMMr   c                  s   \         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   Ztimedelta64Z
datetime64r)   r}   get_offsetsrw  r   r   r7   rS  r*   )r   r   Zdr"  Zoff0r0   r1   r   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)Zbaseline_imagesr   r   r   c                  s:   \        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  ZmaskNrR  )r    r%   r%   r    r    )r   r'   rc  r(   r)   r*   r}   )Z
unmasked_xZmasked_yr0   r1   r@   r   r  r    s     	r2q"b)r2q"b)r2q"b)r2q"b)r2q"b)J uu{{?{AHllnGCJJz$r   c                 s   \         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  NrR  r    r    r%   r%   r    )r%   rf   rW   )
r'   rc  r(   rg   add_subplotr}   rw  column_stackZ
set_xticksZ
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                  s,   \         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  NrR  r  )r'   rc  r(   rg   r)   r*   r}   r  rw  
isinstancer}  Ztype)r   r   r0   r1   r  Zmasked_offsetsZunmasked_offsetsr   r   test_check_offsets_dtyper  5  s    
O/:A
		!QAllnGC::aDUU''/N^$d&&($~*>????v.%&d&&($/?*@AAAAr   gapcolorZoranger   r   c                 s   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# )io   r   )r   r   r  r   N)Z:r  z--)r  r-   r.   r   Zvlinesr  Zstrr   	itertoolsZcycleZaxvline)
r   r   r  r   r   r1   r   r  Z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                 s   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   )Zhatchzhatch.linewidthN))r   r   )r   rP  )rP  rP  )rP  r   ))rQ  rQ  )rQ  ?)r  r  )r  rQ  )r  r   Zset_hatch_linewidthr<  Z
rc_contextr+   Zget_hatch_linewidth)r   r   r   r   r  ZpolygonsZrefZtestr   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)rK  rG  r   rJ  rL  )r   NNNz't_direction must be 'x' or 'y', got 'z')r   N)r&   r%   Nz'x' is not 1-dimensional)r   )r   g      @)rT  )gffffff@g	@)r   ZpdfZsvgZeps)sr   r   r  Zplatformr_  Ztypesr   Znumpyr'   Znumpy.testingr   r   r  Z
matplotlibr<  Zmatplotlib.pyplotZpyplotr)   Zmatplotlib.collectionsZcollectionsri   Zmatplotlib.colorsr   ro  Zmatplotlib.pathZpathry   Zmatplotlib.transformsZ
transformsrp   r   r   r   r   r	   Zmatplotlib.testing.decoratorsr
   r   Zfixturer   r4   rA   rF   rH   rI   rK   rO   rP   rQ   rS   rT   r]   r_   r6   rm   rv   r{   r   r   Zcontextr   r   r   Zmachiner   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r!  r#  r(  r?  r@  rD  ZmarkZparametrizerI  rM  rO  rU  rX  rZ  r`  rd  re  rf  ri  rj  rl  rn  rr  rt  ru  rv  rz  r|  r~  r  r  r  r  r  rX   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   