+
     ]i/  c                   s   R t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RI	H
t ^ RIHt ^ RIHt  ! R R4      t ! R R4      t ! R R	4      t]P(                  ]P*                  ]P,                  .t. ROt ! R
 R4      t ! R R4      tR t ! R R4      t ! R R4      t ! R R4      t]P>                  PA                  R4      ]! R.R7      R 4       4       t!R t"R t#R t$R# )z#Catch all for categorical functionsN)Axes)check_figures_equalc                   s  a  ] tR t^t o RR.^ .33RR.^ .33R. RO. RO33.t]! ]!  w  tt]P                  P                  R]]R7      R	 4       tR
 tRR]P                  3RR^.3RR^.3.t]! ]!  w  tt]P                  P                  R]]R7      R 4       t]P                  P                  R]]R7      R 4       tRtV tR# )TestUnitDatasinglehello worldunicode   Здравствуйте мирmixedAz
data, locsidsc                s2    \         P                  ! V4      pR # N)catUnitData)selfdatalocsunit   &&& E/usr/lib64/python3.14/site-packages/matplotlib/tests/test_category.py	test_unitZTestUnitData.test_unit   s    ||D!    c                s|    R R.p^ ^.p. ROp. ROp. ROp\         P                  ! V4      pVP                  V4       R# )adN)br   e)r   r   r   r   )             )r   r   update)r   r   r   Zdata_updateZunique_dataZupdated_locsr   s   &      r   test_updateZTestUnitData.test_update   s?    Sz1v%*#||D! 	K r   Q	@nanlistz
mixed typefdatac                s    \         P                  ! \        4      ;_uu_ 4        \        P                  ! V4       R R R 4       R #   + '       g   i     R # ; ir   )pytestraises	TypeErrorr   r   )r   r#      &&r   test_non_string_failsZ"TestUnitData.test_non_string_fails0   s,    ]]9%%LL &%%%s   AA	c                s    \         P                  ! 4       p\        P                  ! \        4      ;_uu_ 4        VP                  V4       R R R 4       R #   + '       g   i     R # ; ir   )r   r   r$   r%   r&   r   )r   r#   Zunitdata   && r   test_non_string_update_failsZ)TestUnitData.test_non_string_update_fails5   s7    <<>]]9%%OOE" &%%%s   AA%	 N)r   znp.nanBz3.14   мир)r   r   r   r      )Znumberr    )__name__
__module____qualname____firstlineno__
test_caseszipr
   r   r$   markparametrizer   r   npr!   failing_test_casesfidsr#   r(   r*   __static_attributes____classdictcell__Z__classdict__   @r   r   r      s    }os34 ABQCHIC,. /0J Z IC[[\4S94 :4
<  +UBFFO!D":.Qx0HJ z"KD%[[We6  7  [[We6# 7#r   r   c                   s&   a  ] tR t^<t o R tRtV tR# )FakeAxisc                s    Wn         R # r   units)r   r@   r'   r   __init__ZFakeAxis.__init__=   s    
r   r?   N)r/   r0   r1   r2   rA   r:   r;   r<   r=   r   r>   r>   <   s      r   r>   c                   s  a  ] tR t^At o RtRR.3RR.3R. R O3RRR	.3R
. R!O3.t]! ]!  w  ttRRR]	P                  .3RR^*.3.t]! ]!  w  tt]P                  ! RR7      R 4       t]P"                  P%                  R]]R7      R 4       t]P"                  P%                  RRR.RR.R7      R 4       t]P"                  P%                  R]]R7      R 4       tR tR tRtV tR# )"TestStrCategoryConverterz
Based on the pandas conversion and factorization tests:

ref: /pandas/tseries/tests/test_converter.py
     /pandas/tests/test_algos.py:TestFactorize
r   r   asciir   r   zinteger string1Z2zsingle + values>10r   r   r    string integer42T)Zautousec                s    \         P                  ! 4       V n        \         P                  ! 4       V n        \        V P                  4      V n        R # r   )r   ZStrCategoryConverterccr   r   r>   ax)r   Zrequestr'   r   	mock_axisZ"TestStrCategoryConverter.mock_axisX   s/    **,LLN	499%r   valsr	   c                s    \         P                  P                  V P                  P	                  WP
                  P                  V P
                  4      \        \        V4      4      4       R # r   )	r7   testingassert_allcloserG   convertrH   r@   rangelen)r   rJ   r'   r   test_convertZ%TestStrCategoryConverter.test_convert_   s@    


""477??43777$<#(T#3	5r   valuehir-   c                    R # r   r+   )r   rQ   r'   r   test_convert_one_stringZ0TestStrCategoryConverter.test_convert_one_stringe       r   fvalsc                s    \         P                  ! \        4      ;_uu_ 4        V P                  P	                  WP
                  V P                  4       R R R 4       R #   + '       g   i     R # ; ir   )r$   r%   r&   rG   rM   r   rH   )r   rV   r'   r   test_convert_failZ*TestStrCategoryConverter.test_convert_faili   s:    ]]9%%GGOOE99dgg6 &%%%s   1AA/	c                sf    V P                   P                  V P                  V P                  4      pR # r   )rG   Zaxisinfor   rH   )r   axis   & r   test_axisinfoZ&TestStrCategoryConverter.test_axisinfon   s     ww		4773r   c                rS   r   r+   r      &r   test_default_unitsZ+TestStrCategoryConverter.test_default_unitss   rU   r   )rH   rG   r   Nr   r   c)r   r,   ZCZDZEZFZGZHZIZJZKZLZMZNZOZPZQZRZSZTZUZVZWZXZYZZ)r/   r0   r1   r2   __doc__r3   r4   r
   Zvaluesr7   Zinfr8   r9   fvaluesr$   fixturerI   r5   r6   rP   rT   rW   rZ   r]   r:   r;   r<   r=   r   rB   rB   A   sK     @AB]O,_-#c3Z0' *C D	EJ z"KC"T3$78+dBZ8: +,MD'^^D!& "& [[VV55 65
 [[WtX&6Wi<PQ? R? [[Wg487 97A
O Or   rB   c                   sn   a  ] tR t^{t o R t]P                  P                  R]]	R7      R 4       t
RtV tR# )TestStrCategoryLocatorc                s   . ROp\         P                  ! V Uu. uF  p\        V4      NK  	  up4      p\         P                  ! VP                  4      p\
        P                  P                  VP                  RR4      V4       R# u upi )r   N)r   r   r   r   r.         i   i   i	   i
   )	r   r   ZstrZStrCategoryLocator_mappingr7   rK   assert_array_equalZtick_values)r   r   Zjr   tickss   &    r   test_StrCategoryLocatorZ.TestStrCategoryLocator.test_StrCategoryLocator|   sb    1||T2TSVT23&&t}}5


%%e&7&7d&CTJ 3s   Bplotterr	   c                s    \         P                  ! 4       P                  4       pV! V. RO. RO4       \        P                  P                  VP                  P                  P                  4       \        ^4      4       R# )r   N)r   r   r   r^   )
pltfiguresubplotsr7   rK   rg   yaxismajorZlocatorrN   r   rj   rH   r)   r   test_StrCategoryLocatorPlotZ2TestStrCategoryLocator.test_StrCategoryLocatorPlot   sK    ZZ\""$I/


%%bhhnn&<&<&>aIr   r+   N)r/   r0   r1   r2   ri   r$   r5   r6   	PLOT_LISTPLOT_IDSrq   r:   r;   r<   r=   r   rc   rc   {   s8     K [[Y	x@J AJr   rc   c                   s  a  ] tR t^t o R. RO3RRR.3.t]! ]!  w  tt]P                  P                  R]]R7      R 4       t]P                  P                  R]]R7      ]P                  P                  R]]R7      R	 4       4       tR
tV tR# )TestStrCategoryFormatterrC   r      Здравствуйте   приветydatar	   c                s    \         P                  ! V4      p\         P                  ! VP                  4      p\	        V4       F  w  rEK  	  R # r   )r   r   ZStrCategoryFormatterrf   	enumerate)r   rw   r   labelsir   s   &&    r   test_StrCategoryFormatterZ2TestStrCategoryFormatter.test_StrCategoryFormatter   s5    ||E"))$--8e$DAq$r   rj   c                s    \         P                  ! 4       P                  4       pV! V\        \	        V4      4      V4       \        V4       F  w  rEK  	  R # r   )rk   rl   rm   rN   rO   rx   )r   rw   rj   rH   rz   r   s   &&&   r   test_StrCategoryFormatterPlotZ6TestStrCategoryFormatter.test_StrCategoryFormatterPlot   s>     ZZ\""$E#e*%u-e$DAq$r   r+   N)helloworldrR   )r/   r0   r1   r2   r3   r4   r
   Zcasesr$   r5   r6   r{   rr   rs   r|   r:   r;   r<   r=   r   rt   rt      s     459>JKMJ j!JC[[We5( 6( [[We5[[Y	x@3 A 63r   rt   c                 s    \        \        \        V4      4      4      p\        P                  P                  V P                  4       V4       V Uu. uF  q0P                  P                  W34      NK  	  ppR # u upi r   )	r"   rN   rO   r7   rK   rg   Zget_majorticklocsro   Z	formatter)rX   ry   rh   rz   Zgraph_labelss   &&   r   	axis_testr      sX    s6{#$EJJ!!$"8"8":EB8=>1JJ((.L>L>s   #A7c                   s   a  ] tR t^t o R. R
O3R. RO3R]P
                  ! . RO4      3.t]! ]!  w  tt	]
P                  P                  R]]R7      ]
P                  P                  R]	]R7      R 4       4       tRtV tR	# )TestPlotBytesstring list
bytes listbytes ndarrayrj   r	   bdatac                    \         P                  ! 4       P                  4       p\        P                  ! . RO4      pV! W2V4       \        VP                  V4       R# r.   N)r.   re   rd   rk   rl   rm   r7   arrayr   xaxis)r   rj   r   rH   counts   &&&  r   test_plot_bytesZTestPlotBytes.test_plot_bytes   >     ZZ\""$)$6""((E"r   r+   Nr^   )s   as   bs   c)r/   r0   r1   r2   r7   r   Zbytes_casesr4   Z	bytes_idsZ
bytes_datar$   r5   r6   rr   rs   r   r:   r;   r<   r=   r   r   r      s     !?3 "45#RXX.@%ABDK  -Iz[[Y	x@[[Wji@# A A#r   r   c                   s(  a  ] tR t^t o R. RO3R]P
                  ! . RO4      3R. RO3R]P
                  ! . RO4      3.t]! ]!  w  tt	]
P                  P                  R]]R7      ]
P                  P                  R]	]R7      R 4       4       tR	tV tR
# )TestPlotNumliker   zstring ndarrayr   r   rj   r	   ndatac                r   r   r   )r   rj   r   rH   r   r   r   test_plot_numlikeZ!TestPlotNumlike.test_plot_numlike   r   r   r+   N)rD   Z11Z3)s   1s   11s   3)r/   r0   r1   r2   r7   r   Znumlike_casesr4   Znumlike_idsZnumlike_datar$   r5   r6   rr   rs   r   r:   r;   r<   r=   r   r   r      s     #%56&1A(BC"$78%rxx0C'DEGM !$] 3K[[Y	x@[[WlD# E A#r   r   c                   sV  a  ] tR t^t o ]P
                  P                  R]]R7      R 4       t	]P                  R 4       t]P
                  P                  R4      ]P
                  P                  R]]R7      R 4       4       t]P
                  P                  R4      ]P
                  P                  R]]R7      R 4       4       t]P
                  P                  R4      ]P
                  P                  R]]R7      R 4       4       t]P
                  P                  R]]R7      R	 4       tR
 tRRR.3RR^.3RR^*.3RR]P&                  .3.t]! ]!  w  tt]P2                  ]P4                  ]P6                  ! ]P8                  ]P
                  P:                  R7      .t]P
                  P                  R]4      ]P
                  P                  R]]R7      R 4       4       t]P
                  P                  R]4      ]P
                  P                  R]]R7      R 4       4       t Rt!V t"R# )TestPlotTypesrj   r	   c                s    \         P                  ! 4       P                  4       pR R.pV! W#^ ^.4       \        VP                  V4       R# )ru   rv   N)rk   rl   rm   r   r   )r   rj   rH   Zwordss   &&  r   test_plot_unicodeZTestPlotTypes.test_plot_unicode   s<    ZZ\""$+^<Aq6""((E"r   c                sN    . ROV n         . ROV n        . ROV n        . ROV n        R# )r}   N)r}   Zhappyr~   )r   re   r   )ZPythonZisZfun)r   r.   rd   xxyyyxr[   r\   r   	test_dataZTestPlotTypes.test_data   s    ,(r   r   c                s    \         P                  ! 4       P                  4       pV! W0P                  V P                  4       \        VP                  V P                  4       R # r   )rk   rl   rm   r   r   r   r   r   r   rj   rH   r   r   test_plot_xaxisZTestPlotTypes.test_plot_xaxis   s<     ZZ\""$FFDGG$"((DFF#r   c                s    \         P                  ! 4       P                  4       pV! W0P                  V P                  4       \        VP                  V P                  4       R # r   )rk   rl   rm   r   r   r   rn   r   r   r   test_plot_yaxisZTestPlotTypes.test_plot_yaxis   s<     ZZ\""$GGTVV$"((DFF#r   c                s   \         P                  ! 4       P                  4       pV! W0P                  V P                  4       \        VP                  V P                  4       \        VP                  V P                  4       R # r   )rk   rl   rm   r   r   r   r   rn   r   r   r   test_plot_xyaxisZTestPlotTypes.test_plot_xyaxis   sN     ZZ\""$FFDFF#"((DFF#"((DFF#r   c                s    \         P                  ! 4       P                  4       pV! VR R.RR.4       V! V. RO. RO4       V! V. RO. RO4       \        VP                  . R	O4       \        VP
                  . R
O4       R# r   r   r   gN)r   r   r   )fr   r   )r   r_   r   )r   r   r   )r   r   r   r_   )r   r   r   r   r   r   )rk   rl   rm   r   r   rn   rp   r)   r   test_update_plotZTestPlotTypes.test_update_plot   s`    ZZ\""$S#Jc
+O_5O_5"((01"((:;r   c                s0   \         P                  ! 4       P                  4       pVP                  R R.RR.4       VP	                  . RO. RO4       VP                  . RO. RO4       \        VP                  . R	O4       \        VP                  . R
O4       R# r   )	rk   rl   rm   scatterplotbarr   r   rn   )r   rH   rY   r   %test_update_plot_heterogenous_plotterZ3TestPlotTypes.test_update_plot_heterogenous_plotter   sf    ZZ\""$


C:Sz*
1
0"((01"((:;r   r   r   r    znumber integerrD   rE   rF   ZmissingZ12)Zmarksxdatac                s    \         P                  ! 4       P                  4       p\        P                  ! \
        4      ;_uu_ 4        V! W2^^.4       RRR4       R#   + '       g   i     R# ; i)r   Nrk   rl   rm   r$   r%   r&   r   rj   r   rH   r   r   test_mixed_type_exceptionZ'TestPlotTypes.test_mixed_type_exception  sD     ZZ\""$]]9%%B1v& &%%%s   AA-	c                s    \         P                  ! 4       P                  4       p\        P                  ! \
        4      ;_uu_ 4        V! V^ ^.^^.4       V! W2^^.4       RRR4       R#   + '       g   i     R# ; i)r   Nr   r   r   r    test_mixed_type_update_exceptionZ.TestPlotTypes.test_mixed_type_update_exception  sX     ZZ\""$]]9%%BAA'B1v& &%%%s   A**A;	r   N)#r/   r0   r1   r2   r$   r5   r6   rr   rs   r   rb   r   Zusefixturesr   r   r   r   r   r7   r!   r8   r4   r9   ra   r    r   r   Zparamr   ZxfailZplottersr   r   r:   r;   r<   r=   r   r   r      sB    [[Y	x@# A# ^^  [[[)[[Y	x@$ A *$
 [[[)[[Y	x@$ A *$
 [[[)[[Y	x@$ A *$ [[Y	x@< A<< #S$K0+c1X6+dBZ8$tRVVn57
 +,MD'dhhTYYfkk.?.?@BH [[Y1[[Wg48' 9 2'
 [[Y1[[Wg48' 9 2'r   r   ZdefaultZpng)Z
extensionsc           	      s   ^ RI H p V! R^^4      pV! R^^4      pV! R^^4      pV! R^^4      pV P                  4       pVP                  4       p\        Wx./ \        RRR7      34       F_  w  rV	P                  ! W4.RR.3/ V
B  V	P
                  P                  pV	P                  P                  pV	P                  ! WV.RR.3/ V
B  Ka  	  R# )r   )datetimei  N)ZxunitsZyunitsZV1ZV2)r   rm   r4   Zdictr   r   r@   rn   )Zfig_testZfig_refr   Zt0Zt1Zt2Zt3Zax_testZax_refrH   ZkwargsZx_unitsZy_unitss   &&           r   test_overriding_units_in_plotr     s     "	$1	B	$1	B	$1	B	$1	B!GF7+t4=>@
 	4,1&1((..((..
4,1&1@r   c                 s    \         P                  ! 4       w  rVP                  P                  RR.4       VP	                  . . 4       R# )zI
Smoke test to check that no deprecation warning is emitted. See #22640.
r   r   N)rk   rm   r   Zupdate_unitsr   r   rH        r   !test_no_deprecation_on_empty_datar   4  s4     LLNEAHH3*%GGBOr   c                  s    \         P                  ! 4       w  rVP                  . RO4      w  r#p\        P                  P                  V. RO4       R# )r   N)r   r   r   r_   Zff)
g       @        r         ?r   r   r   r   r   r   )rk   rm   Zhistr7   rK   rL   )ZfigrH   ZnZbinsZpatchess        r   	test_histr   =  s8    llnGCww9:AWJJq"JKr   c                  s    \         P                  ! 4       w  rVP                  . RO. RO4       \        P                  ! 4       ;_uu_ 4        VP                  RR4       RRR4       R#   + '       g   i     R# ; i)r   r   r_   N)r   r   r_   r   )r   r   r   r.   )rk   rm   r   warningsZcatch_warningsZset_xlimr   r   r   test_set_limr   D  sL     LLNEAGG ,/		 	 	"	"
C 
#	"	"	"s   A((A9	)r   r   r   )%r`   r   r$   Znumpyr7   Z
matplotlibZmplZmatplotlib.axesr    Zmatplotlib.pyplotZpyplotrk   Zmatplotlib.categoryZcategoryr   Zmatplotlib.testing.decoratorsr   r   r>   rB   r   r   r   rr   rs   rc   rt   r   r   r   r   ZstyleZcontextr   r   r   r   r+   r   r   <module>r      s    )        ! =+# +#\ 
3O 3Ol \\499dhh/	%J J3 307# # # # M' M'` 9() ) ).Lr   