+
    ,i/                        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                     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                    \         P                  ! V4      p\        VP                  P	                  4       4      V8X  g   Q h\        VP                  P                  4       4      V8X  g   Q hR # N)catUnitDatalist_mappingkeysvalues)selfdatalocsunits   &&& @/usr/lib/python3/dist-packages/matplotlib/tests/test_category.py	test_unitTestUnitData.test_unit   sP    ||D!DMM&&()T111DMM((*+t333    c                   R R.p^ ^.p. ROp. ROp. ROp\         P                  ! V4      p\        VP                  P	                  4       4      V8X  g   Q h\        VP                  P                  4       4      V8X  g   Q hVP                  V4       \        VP                  P	                  4       4      V8X  g   Q h\        VP                  P                  4       4      V8X  g   Q hR# )adN)br    e)r   r    r!   r"   )             )r   r   r   r   r   r   update)r   r   r   data_updateunique_dataupdated_locsr   s   &      r   test_updateTestUnitData.test_update   s    Sz1v%*#||D!DMM&&()T111DMM((*+t333K DMM&&()[888DMM((*+|;;;r   Q	@nanr   z
mixed typefdatac                    \         P                  ! \        4      ;_uu_ 4        \        P                  ! V4       R R R 4       R #   + '       g   i     R # ; ir   )pytestraises	TypeErrorr   r   )r   r/   s   &&r   test_non_string_fails"TestUnitData.test_non_string_fails0   s,    ]]9%%LL &%%%s   AA	c                    \         P                  ! 4       p\        P                  ! \        4      ;_uu_ 4        VP                  V4       R R R 4       R #   + '       g   i     R # ; ir   )r   r   r1   r2   r3   r'   )r   r/   unitdatas   && r   test_non_string_update_fails)TestUnitData.test_non_string_update_fails5   s7    <<>]]9%%OOE" &%%%s   AA%	 N)r   znp.nanBz3.14   мир)r#   r$   r%   r&      )numberr-   )__name__
__module____qualname____firstlineno__
test_caseszipr   r   r1   markparametrizer   r+   npr.   failing_test_casesfidsr/   r4   r8   __static_attributes____classdictcell____classdict__s   @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                   &   a  ] tR t^<t o R tRtV tR# )FakeAxisc                    Wn         R # r   units)r   rR   s   &&r   __init__FakeAxis.__init__=   s    
r   rQ   N)r?   r@   rA   rB   rS   rJ   rK   rL   s   @r   rO   rO   <   s      r   rO   c                     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12zsingle + values>10r   r
   r-   string integer42T)autousec                    \         P                  ! 4       V n        \         P                  ! 4       V n        \        V P                  4      V n        R # r   )r   StrCategoryConverterccr   r   rO   ax)r   requests   &&r   	mock_axis"TestStrCategoryConverter.mock_axisX   s/    **,LLN	499%r   valsr   c                    \         P                  P                  V P                  P	                  WP
                  P                  V P
                  4      \        \        V4      4      4       R # r   )	rG   testingassert_allcloser_   convertr`   rR   rangelen)r   rd   s   &&r   test_convert%TestStrCategoryConverter.test_convert_   s@    


""477??43777$<#(T#3	5r   valuehir<   c                t    V P                   P                  WP                  V P                  4      ^ 8X  g   Q hR# r#   N)r_   rh   r   r`   )r   rm   s   &&r   test_convert_one_string0TestStrCategoryConverter.test_convert_one_stringe   s'    wwuii9Q>>>r   fvalsc                    \         P                  ! \        4      ;_uu_ 4        V P                  P	                  WP
                  V P                  4       R R R 4       R #   + '       g   i     R # ; ir   )r1   r2   r3   r_   rh   r   r`   )r   rs   s   &&r   test_convert_fail*TestStrCategoryConverter.test_convert_faili   s:    ]]9%%GGOOE99dgg6 &%%%s   1AA/	c                   V P                   P                  V P                  V P                  4      p\	        VP
                  \        P                  4      '       g   Q h\	        VP                  \        P                  4      '       g   Q hR # r   )
r_   axisinfor   r`   
isinstancemajlocr   StrCategoryLocatormajfmtStrCategoryFormatter)r   axiss   & r   test_axisinfo&TestStrCategoryConverter.test_axisinfon   sZ    ww		4773$++s'='=>>>>$++s'?'?@@@@r   c                    \        V P                  P                  R .V P                  4      \        P
                  4      '       g   Q hR# )r   N)ry   r_   default_unitsr`   r   r   r   s   &r   test_default_units+TestStrCategoryConverter.test_default_unitss   s0    $''//tww?NNNNr   )r`   r_   r   Nr   r!   c)r   r;   CDEFGHIJKLMNOPQRSTUVWXYZ)r?   r@   rA   rB   __doc__rC   rD   r   r   rG   infrH   rI   fvaluesr1   fixturerb   rE   rF   rk   rq   ru   r   r   rJ   rK   rL   s   @r   rV   rV   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   rV   c                   n   a  ] tR t^{t o R t]P                  P                  R]]	R7      R 4       t
RtV tR# )TestStrCategoryLocatorc                   . 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=               	   
   )	r   r   strr{   r   rG   rf   assert_array_equaltick_values)r   r   jr   tickss   &    r   test_StrCategoryLocator.TestStrCategoryLocator.test_StrCategoryLocator|   sb    1||T2TSVT23&&t}}5


%%e&7&7d&CTJ 3s   Bplotterr   c                    \         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subplotsrG   rf   r   yaxismajorlocatorri   r   r   r`   s   && r   test_StrCategoryLocatorPlot2TestStrCategoryLocator.test_StrCategoryLocatorPlot   sK    ZZ\""$I/


%%bhhnn&<&<&>aIr   r:   N)r?   r@   rA   rB   r   r1   rE   rF   	PLOT_LISTPLOT_IDSr   rJ   rK   rL   s   @r   r   r   {   s8     K [[Y	x@J AJr   r   c                     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# )TestStrCategoryFormatterrW   r      Здравствуйте   приветydatar   c                    \         P                  ! V4      p\         P                  ! VP                  4      p\	        V4       F$  w  rEV! WD4      V8X  g   Q hV! VR 4      V8X  d   K$  Q h	  R # r   )r   r   r}   r   	enumerate)r   r   r   labelsir    s   &&    r   test_StrCategoryFormatter2TestStrCategoryFormatter.test_StrCategoryFormatter   s[    ||E"))$--8e$DA!<1$$$!T?a''' %r   r   c                j   \         P                  ! 4       P                  4       pV! V\        \	        V4      4      V4       \        V4       F1  w  rEVP                  P                  P                  V4      V8X  d   K1  Q h	  VP                  P                  P                  X^,           4      R8X  g   Q hR# )r$    N)	r   r   r   ri   rj   r   r   r   	formatter)r   r   r   r`   r   r    s   &&&   r   test_StrCategoryFormatterPlot6TestStrCategoryFormatter.test_StrCategoryFormatterPlot   s     ZZ\""$E#e*%u-e$DA88>>++A.!333 %xx~~''!,222r   r:   N)helloworldrn   )r?   r@   rA   rB   rC   rD   r   casesr1   rE   rF   r   r   r   r   rJ   rK   rL   s   @r   r   r      s     459>JKMJ j!JC[[We5( 6( [[We5[[Y	x@3 A 63r   r   c                 d   \        \        \        V4      4      4      p\        P                  P                  V P                  4       V4       V Uu. uF  q0P                  P                  W34      NK  	  ppYA Uu. uF"  p\        P                  P                  V4      NK$  	  up8X  g   Q h\        V P                  P                  P                  4       4      V Uu. uF  qUNK  	  up8X  g   Q h\        V P                  P                  P                  4       4      V8X  g   Q hR # u upi u upi u upi r   )r   ri   rj   rG   rf   r   get_majorticklocsr   r   r   r}   _textrR   r   r   r   )r~   r   r   r   graph_labelsls   &&    r   	axis_testr      s    s6{#$EJJ!!$"8"8":EB8=>1JJ((.L>vNv!C44::1=vNNNN

##((*+6/B6a6/BBBB

##**,-666	 ?N/Bs   #D#9(D(
D-c                      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 ndarrayr   r   bdatac                    \         P                  ! 4       P                  4       p\        P                  ! . RO4      pV! W2V4       \        VP                  V4       R# r=   N)r=   r   r   r   r   r   rG   arrayr   xaxis)r   r   r   r`   countss   &&&  r   test_plot_bytesTestPlotBytes.test_plot_bytes   >     ZZ\""$)$6""((E"r   r:   Nr   )   a   b   c)r?   r@   rA   rB   rG   r   bytes_casesrD   	bytes_ids
bytes_datar1   rE   rF   r   r   r   rJ   rK   rL   s   @r   r   r      s     !?3 "45#RXX.@%ABDK  -Iz[[Y	x@[[Wji@# A A#r   r   c                   (  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   r   r   ndatac                    \         P                  ! 4       P                  4       p\        P                  ! . RO4      pV! W2V4       \        VP                  V4       R# r   r   )r   r   r   r`   r   s   &&&  r   test_plot_numlike!TestPlotNumlike.test_plot_numlike   r   r   r:   N)rX   113)   1s   11   3)r?   r@   rA   rB   rG   r   numlike_casesrD   numlike_idsnumlike_datar1   rE   rF   r   r   r   rJ   rK   rL   s   @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                   V  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# )TestPlotTypesr   r   c                    \         P                  ! 4       P                  4       pR R.pV! W#^ ^.4       \        VP                  V4       R# )r   r   N)r   r   r   r   r   )r   r   r`   wordss   &&  r   test_plot_unicodeTestPlotTypes.test_plot_unicode   s<    ZZ\""$+^<Aq6""((E"r   c                N    . ROV n         . ROV n        . ROV n        . ROV n        R# )r   N)r   happyr   )r%   r   r&   )Pythonisfun)r&   r=   r   xxyyyxr   s   &r   	test_dataTestPlotTypes.test_data   s    ,(r   r  c                    \         P                  ! 4       P                  4       pV! W0P                  V P                  4       \        VP                  V P                  4       R # r   )r   r   r   r  r	  r   r   r   r  r   r`   s   &&& r   test_plot_xaxisTestPlotTypes.test_plot_xaxis   s<     ZZ\""$FFDGG$"((DFF#r   c                    \         P                  ! 4       P                  4       pV! W0P                  V P                  4       \        VP                  V P                  4       R # r   )r   r   r   r  r
  r   r   r  s   &&& r   test_plot_yaxisTestPlotTypes.test_plot_yaxis   s<     ZZ\""$GGTVV$"((DFF#r   c                   \         P                  ! 4       P                  4       pV! W0P                  V P                  4       \        VP                  V P                  4       \        VP                  V P                  4       R # r   )r   r   r   r  r
  r   r   r   r  s   &&& r   test_plot_xyaxisTestPlotTypes.test_plot_xyaxis   sN     ZZ\""$FFDFF#"((DFF#"((DFF#r   c                    \         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    )r   r   r   r   r   r   r   s   && r   test_update_plotTestPlotTypes.test_update_plot   s`    ZZ\""$S#Jc
+O_5O_5"((01"((:;r   c                0   \         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  )	r   r   r   scatterplotbarr   r   r   )r   r`   s   & r   %test_update_plot_heterogenous_plotter3TestPlotTypes.test_update_plot_heterogenous_plotter   sf    ZZ\""$


C:Sz*
1
0"((01"((:;r   r
   r   r-   znumber integerrX   rZ   r[   missing12)marksxdatac                    \         P                  ! 4       P                  4       p\        P                  ! \
        4      ;_uu_ 4        V! W2^^.4       RRR4       R#   + '       g   i     R# ; i)r$   Nr   r   r   r1   r2   r3   r   r   r'  r`   s   &&& r   test_mixed_type_exception'TestPlotTypes.test_mixed_type_exception  sD     ZZ\""$]]9%%B1v& &%%%s   AA-	c                    \         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rp   r)  r*  s   &&& r    test_mixed_type_update_exception.TestPlotTypes.test_mixed_type_update_exception  sX     ZZ\""$]]9%%BAA'B1v& &%%%s   A**A;	r  N)#r?   r@   rA   rB   r1   rE   rF   r   r   r   r   r  usefixturesr  r  r  r  r"  rG   r.   rH   rD   rI   r   r   r  r!  paramr   xfailplottersr+  r.  rJ   rK   rL   s   @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   defaultpng)
extensionsc           	         ^ 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  WP
                  P                  J g   Q hWP                  P                  J d   K  Q h	  R# )r#   )datetimei  N)xunitsyunitsV1V2)r8  r   rD   dictr   r   rR   r   )fig_testfig_refr8  t0t1t2t3ax_testax_refr`   kwargsx_unitsy_unitss   &&           r   test_overriding_units_in_plotrI    s     "	$1	B	$1	B	$1	B	$1	B!GF7+t4=>@
 	4,1&1((..((..
4,1&1((..(((((..(((@r   c                     \         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)r   r   r   update_unitsr   r  r`   s     r   !test_no_deprecation_on_empty_datarM  4  s4     LLNEAHH3*%GGBOr   c                      \         P                  ! 4       w  rVP                  . RO4      w  r#pVP                  R8X  g   Q h\        P
                  P                  V. RO4       R# )r   N)r   r!   r   r   ff)r   )
g       @        rP        ?rP  rP  rQ  rP  rP  rQ  )r   r   histshaperG   rf   rg   )figr`   nbinspatchess        r   	test_histrX  =  sJ    llnGCww9:AW77eJJq"JKr   c                      \         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=   )r   r   r   warningscatch_warningsset_xlimrL  s     r   test_set_limr]  D  sL     LLNEAGG ,/		 	 	"	"
C 
#	"	"	"s   A((A9	)r  r   r!  )%r   rZ  r1   numpyrG   
matplotlibmplmatplotlib.axesr   matplotlib.pyplotpyplotr   matplotlib.categorycategoryr   matplotlib.testing.decoratorsr   r   rO   rV   r  r   r!  r   r   r   r   r   r   r   r   stylecontextrI  rM  rX  r]  r:   r   r   <module>ri     s    )        ! =+# +#\ 
3O 3Ol \\499dhh/	%J J3 307# # # # M' M'` 9() ) ).Lr   