+
    i$                    ~   ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RI	t
^ RIHtHt ^ RIt^ RIt^ RIHt ^ RIHt  ! R R4      t ! R R4      t ! R	 R
4      t ! R R4      t ! R R4      t ! R R4      t ! R R4      t ! R R4      t ! R R4      t ! R R4      t  ! R R4      t! ! R R4      t" ! R R4      t# ! R R 4      t$ ! R! R"4      t% ! R# R$4      t& ! R% R&4      t' ! R' R(4      t( ! R) R*4      t) ! R+ R,4      t* ! R- R.4      t+R/ t,]PZ                  P]                  R0. RJO4      R1 4       t/ ! R2 R34      t0R4 t1R5 t2R6 t3R7 t4R8 t5R9 t6R: t7R; t8]PZ                  P]                  R<RK4      R= 4       t9]PZ                  P]                  R>R?R@.]
Pt                  ! RL4      .4      RA 4       t;]PZ                  P]                  RB. RMO4      ]Px                  P{                  RC4      RD 4       4       t>RE t?]PZ                  P]                  RF]P                  ! RG 4      ]P                  ! RN4      34      RH 4       tBRI tCR# )O    )nullcontextN)parse)assert_almost_equalassert_array_equalc            
       F  a  ] tR t^t o ^^d]P
                  ! . RO4      3RR]P
                  ! . RO4      3RR]P
                  ! . RO4      3^ R]P                  ! ^4      R,          3R^ ]P                  ! R^4      R,          3.tRRR]P
                  ! . RO4      3RRR]P
                  ! . RO4      3^^7. RO]P
                  ! . R O4      3.t]	P                  P                  R	]4      R
 4       t]	P                  P                  R]4      R 4       t]	P                  P                  RR^ /]]P                   ! R4      3R^^./]R3R^/]R3R^^./]R3.4      R 4       t]	P                  P                  R. R!O. R!O3^^
.. R!O3^^.. R!O3^.. R!O3.4      R 4       tRtV tR# )"TestMaxNLocatorMbP?-C6?  4&kCg&q5gLog5皙?Nffffff?vmin, vmax, expectedc                j    \         P                  ! ^R7      p\        VP                  W4      V4       R# )   nbinsNmtickerMaxNLocatorr   tick_values)selfvminvmaxexpectedlocs   &&&& |/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/matplotlib/tests/test_ticker.py
test_basicTestMaxNLocator.test_basic    s%    !!*COOD7B    zvmin, vmax, steps, expectedc                n    \         P                  ! ^RVR7      p\        VP                  W4      V4       R# )r   T)r   integerstepsNr   )r   r   r   r"   r   r   s   &&&&& r   test_integerTestMaxNLocator.test_integer%   s)    !!4uECOOD7Br   zkwargs, errortype, matchfooz5set_params() got an unexpected keyword argument 'foo'r"   z$steps argument must be an increasingc                    \         P                  ! W#R 7      ;_uu_ 4        \        P                  ! R/ VB  RRR4       R#   + '       g   i     R# ; i)matchN )pytestraisesr   r   )r   kwargs	errortyper(   s   &&&&r   test_errorsTestMaxNLocator.test_errors*   s3     ]]922)&) 3222s   AA	zsteps, resultc                ~    \         P                  ! VR 7      pVP                  V8H  P                  4       '       g   Q hR# ))r"   N)r   r   _stepsall)r   r"   resultr   s   &&& r   test_paddingTestMaxNLocator.test_padding5   s2     !!.

f$))++++r   r)   )      4@g      D@g      N@g      T@      Y@)        g-C6*?g-C6:?ga2U0*C?g-C6J?r	     4&k)r9   g  4&kr8   g  4&kBr   g&q皙)r         )g      пr         ?      ?      ?      ?)r=         ?r      
   )r         -   <   )r=   r>   rE   )__name__
__module____qualname____firstlineno__nparrayarange
basic_datainteger_datar*   markparametrizer   r#   	TypeErrorreescape
ValueErrorr.   r4   __static_attributes____classdictcell____classdict__s   @r   r   r      s    	S"((567	!LMN	bhhJKL	
HbiilU*+	AryyQ'%/0J 
sD"((=12	tT288$DEF	
B"BHH-@$ABL [[3Z@C AC [[:LIC JC [[7
Y	J	K	M
Aq6	J(NO
1z#IJ
Ar7	Z)OP: ** [[_	Z 
R*
Q
j	/ ,,r   r   c                   8   a  ] tR t^@t o R tR tR tR tRtV t	R# )TestLinearLocatorc                    \         P                  ! ^R7      p\        P                  ! . RO4      p\	        VP                  RR4      V4       R# )   numticks皙?N皙)rd   333333ӿrc   )r   LinearLocatorrN   rO   r   r   r   r   
test_values   &  r   r   TestLinearLocator.test_basicA   s6    ##Q/XX/0
COOD#6
Cr   c                ^    \         P                  ! ^ R7      pVP                  RR4      . 8H   R# )r   ra   rc   Nrd   )r   rf   r   r   r   s   & r   test_zero_numticks$TestLinearLocator.test_zero_numticksF   s%    ##Q/c"b(r   c                    \         P                  ! ^R7      pVP                  ^R. /R7       VP                  ^8X  g   Q hVP                  R. /8X  g   Q hR# )z
Create linear locator with presets={}, numticks=2 and change it to
something else. See if change was successful. Should not exception.
ra   )rb   presetsNr   r=   )r   rf   
set_paramsrb   ro   rk   s   & r   test_set_params!TestLinearLocator.test_set_paramsJ   sP    
 ##Q/FB<8||q   {{vrl***r   c                   \         P                  ! R. ROR	RR./R7      pVP                  ^^4      . RO8X  g   Q hVP                  ^^4      . RO8X  g   Q hVP                  ^ ^4      RR.8X  g   Q hVP                  RR4      RR.8X  g   Q hVP                  ^ ^4      \        P                  ! ^ ^^4      8H  P                  4       '       g   Q hR# )
r=   r@   rC   )ro   r8          @N)r=   r>   )r=         ?      ?r   r>   )r   rf   r   rN   linspacer2   rk   s   & r   test_presetsTestLinearLocator.test_presetsT   s    ##V_-3c3Z-A Bq!$777q!$777q!$c
222sC(S#J6661%Q2)>>CCEEEEr   r)   N)
rJ   rK   rL   rM   r   rl   rr   rz   rY   rZ   r[   s   @r   r^   r^   @   s!     D
)+F Fr   r^   c                   J   a  ] tR t^^t o R tR tR tR tR tR t	R t
RtV tR	# )
TestMultipleLocatorc                    \         P                  ! R R7      p\        P                  ! . RO4      p\	        VP                  R^
4      V4       R# )V-	@baseN)go"V-gV-	r8   r   V-@go"@gV-)@r   MultipleLocatorrN   rO   r   r   rg   s   &  r   r   TestMultipleLocator.test_basic_   s:    %%51XX . /
COOB3Z@r   c                    \         P                  ! R RR7      p\        P                  ! . RO4      p\	        VP                  R^
4      V4       R# )r   333333?r   offsetN)gZd{ gK7A`gx&r   gSc@g`"@gx&1H%@r   r   rg   s   &  r   test_basic_with_offset*TestMultipleLocator.test_basic_with_offsete   s<    %%5=XX ' (
COOB3Z@r   c                    \         P                  ! RR/4      ;_uu_ 4        \        P                  ! RR7      p\	        VP                  R^4      R4       RRR4       R#   + '       g   i     R# ; i)z%
Test basic behavior of view limits.
axes.autolimit_modedatar   r   Nr:   )r:   r   mpl
rc_contextr   r   r   view_limitsrk   s   & r   test_view_limits$TestMultipleLocator.test_view_limitsk   sM     ^^2F;<<))u5CA 6@ =<<<   4AA0	c                    \         P                  ! RR/4      ;_uu_ 4        \        P                  ! RR7      p\	        VP                  R^4      R4       RRR4       R#   + '       g   i     R# ; i)J
Test that everything works properly with 'round_numbers' for auto
limit.
r   round_numbersr   r   N)r   r   r   rk   s   & r   test_view_limits_round_numbers2TestMultipleLocator.test_view_limits_round_numberss   sN    
 ^^2ODEE))u5CA 6H FEEEr   c                    \         P                  ! RR/4      ;_uu_ 4        \        P                  ! RRR7      p\	        VP                  R^4      R4       RRR4       R#   + '       g   i     R# ; i)	r   r   r   r   ?r   Nr   )g`"g}?5^@r   rk   s   & r   *test_view_limits_round_numbers_with_offset>TestMultipleLocator.test_view_limits_round_numbers_with_offset|   sP    
 ^^2ODEE))uSACA 6H FEEEs   5A  A1	c                    \         P                  ! RR/4      ;_uu_ 4        \        P                  ! ^R7      p\	        VP                  RR4      R4       RRR4       R#   + '       g   i     R# ; i)z=
Test that 'round_numbers' works properly with a single bin.
r   r   r   gffffff@Ngffffff)r      )r   r   r   r   r   r   rk   s   & r   test_view_limits_single_bin/TestMultipleLocator.test_view_limits_single_bin   sN     ^^2ODEE%%A.Cc :GD FEEEr   c                    \         P                  ! RR7      pVP                  RR7       VP                  P                  R8X  g   Q hVP                  ^R7       VP
                  ^8X  g   Q hR# )zg
Create multiple locator with 0.7 base, and change it to something else.
See if change was successful.
ffffff?r   333333?)r   N)r   r   rq   _edgestep_offset)r   mults   & r   rr   #TestMultipleLocator.test_set_params   sX    
 &&C0S!zz#%%%q!||q   r   r)   N)rJ   rK   rL   rM   r   r   r   r   r   r   rr   rY   rZ   r[   s   @r   r}   r}   ^   s3     AAAIIE	! 	!r   r}   c            
         a  ] tR t^t o R tRR.tR t]P                  P                  R]4      R 4       t
. ROtR t]P                  P                  R]4      R 4       t. ROt. RO. RO. RO. RO. RO. RO. RO. RO.t]! ]! ]]4      4      t]P                  P                  R]4      R	 4       t]P                  P                  R
RR.4      ]P                  P                  RR. RO3R. RO3.4      R 4       4       t]P                  P                  R
RR.4      ]P                  P                  R^R . R!O3^R". R#O3^
R$. R%O3.4      R 4       4       tRtV tR# )&TestAutoMinorLocatorc                    \         P                  ! 4       w  rVP                  ^ R4       VP                  4        \        P
                  ! . RO4      p\        VP                  P                  RR7      V4       R# )r   =
ףp=?TminorN皙?皙?g333333?r?   333333?gffffff??r@   皙?g?r   rA   g333333??r   ?r   gffffff?rv   r   g?)	pltsubplotsset_xlimminorticks_onrN   rO   r   xaxisget_ticklocsr   figaxrh   s   &   r   r   TestAutoMinorLocator.test_basic   s\    ,,.
At
XX G H
 	BHH111=zJr   c                L   \         P                  ! 4       w  rVP                  RR4       VP                  P	                  \
        P                  ! 4       4       \        P                  ! . RNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NRNRNRNRNRNRNR
NR	NRNRNRNRNRNRNRNRN4      p\        VP                  P                  RR7      V4       VP                  R$^4       \        P                  ! . R%O4      p\        VP                  P                  RR7      V4       R# )&z9
Test that first and last minor tick appear as expected.
gffffff?g?r   g?gffffff?r   r   r   r   皙?r   333333?皙?r   rc   r   Tr   Ngffffffg333333ggffffffgg333333皙grd   gffffffg333333皙ٿre   皙ɿr;   r:   )g      g      g      g      g      g                  r@   rB   rC         @g      @      @g      @      @)r   r   r   r   set_minor_locatorr   AutoMinorLocatorrN   rO   r   r   r   s   &   r   test_first_and_last_minorticks3TestAutoMinorLocator.test_first_and_last_minorticks   s   
 ,,.
D#
""7#;#;#=>XX Bt BT B4 B Bt BT B4 B B#B%)B+/B15B7;B=ABCGBIMB"B$'B),B.1B36B8;B=@BBEBGJB  #B %(B *-B /2B 47B 9<B >AB C
 	BHH111=zJ
BXX G H
BHH111=zJr   z%nb_majorticks, expected_nb_minorticksc                   \         P                  ! 4       w  r4RpVP                  ! V!   VP                  \        P
                  ! V^ ,          V^,          V4      4       VP                  4        VP                  P                  \        P                  ! 4       4       \        VP                  P                  4       4      V8X  g   Q hR# )r   N)r   r   )r   r   r   
set_xticksrN   ry   r   r   r   r   r   lenget_minorticklocs)r   nb_majorticksexpected_nb_minorticksr   r   xlimss   &&&   r   test_low_number_of_majorticks2TestAutoMinorLocator.test_low_number_of_majorticks   s     ,,.
U
bkk%(E!HmDE

""7#;#;#=>288--/04JJJJr   c                F   \         P                  ! R R/4      ;_uu_ 4        V P                   Uu. uF  q^ ,          NK  	  pp\        P                  P                  V\        P                  ! 4       P                  4       RRR4       R# u upi   + '       g   i     R# ; i)_internal.classic_modeFN)	r   r   majorstep_minordivisionsrN   testingassert_allcloser   AutoLocatorr1   )r   x
majorstepss   &  r   "test_using_all_default_major_steps7TestAutoMinorLocator.test_using_all_default_major_steps   su    ^^5u=>>(,(E(EF(E1A$$(EJFJJ&&z'.':':'<'C'CE ?>F ?>>s   BB
?B
BB 	z&major_step, expected_nb_minordivisionsc                ^   \         P                  ! 4       w  r4^ V3pVP                  ! V!   VP                  V4       VP	                  4        VP
                  P                  \        P                  ! 4       4       \        VP
                  P                  4       4      ^,           pWb8X  g   Q hR# r   N)r   r   r   r   r   r   r   r   r   r   r   )r   
major_stepexpected_nb_minordivisionsr   r   r   nb_minor_divisionss   &&&    r   test_number_of_minor_ticks/TestAutoMinorLocator.test_number_of_minor_ticks   s     ,,.J
U
e

""7#;#;#=> !;!;!=>B!???r   zlim, refc                   \         P                  ! 4       w  r4VP                  4        VP                  R RR^R7       VP                  R RR^R7       VP	                  V4       \        VP                  P                  R R7      V4       R# )	Tr   y)	linewidthmajork)colorr   r   N)r   r   r   gridset_ylimr   yaxisr   )r   limrefr   r   s   &&&  r   test_additional$TestAutoMinorLocator.test_additional  sk    ,,.

gsa0
gSA6
CBHH111=sCr   use_rcparamFTc           	     l   V'       d
   R RRR/p/ pM/ pRR/p\         P                  ! V4      ;_uu_ 4        \        P                  ! 4       w  rgVP                  ! V!   VP
                  ! V!   VP                  P                  \        P                  ! R/ VB 4       VP                  P                  \        P                  ! R/ VB 4       \        VP                  P                  RR7      V4       \        VP                  P                  RR7      V4       RRR4       R#   + '       g   i     R# ; i)xtick.minor.ndivsautoytick.minor.ndivsnTr   Nr)   )r   r   r   r   r   r   r   r   r   r   r   r   r   )r   r   r   r   contextr,   r   r   s   &&&&    r   test_number_of_minor_ticks_auto4TestAutoMinorLocator.test_number_of_minor_ticks_auto  s     *F4GPGFG6]F^^G$$llnGCKKKKHH&&w'?'?'I&'IJHH&&w'?'?'I&'IJ 5 5D 5 A3G 5 5D 5 A3G %$$$s   C"D""D3	zn, lim, refc           	     (   V'       d
   R VRV/p/ pM/ pRV/p\         P                  ! V4      ;_uu_ 4        \        P                  ! 4       w  rxVP                  ! V!   VP
                  ! V!   VP                  P                  \        P                  ! ^4      4       VP                  P                  \        P                  ! R/ VB 4       VP                  P                  \        P                  ! ^4      4       VP                  P                  \        P                  ! R/ VB 4       \        VP                  P                  RR7      V4       \        VP                  P                  RR7      V4       RRR4       R#   + '       g   i     R# ; i)r   r  r  Tr   Nr)   )r   r   r   r   r   r   r   set_major_locatorr   r   r   r   r   r   r   )	r   r  r   r   r   r  r,   r   r   s	   &&&&&    r   test_number_of_minor_ticks_int3TestAutoMinorLocator.test_number_of_minor_ticks_int.  s    *A/BAFGFG1XF^^G$$llnGCKKKKHH&&w'>'>q'ABHH&&w'?'?'I&'IJHH&&w'>'>q'ABHH&&w'?'?'I&'IJ 5 5D 5 A3G 5 5D 5 A3G %$$$s   E F  F	r)   Nr   r   )r=   r   ))r=   r   )r>   r   )r   r   )r   r   )rE   r   r   r   r   gn?)r  r  )r   ԍ;)r   gVs?=)gH׊gIhG|a)gv!>ҷ>)ʔA{v()g"s2_dglEՎfUr   ){Gzt?{Gz?Q?g?gQ?gQ?g
ףp=
?r   g)\(?gp=
ף?gQ?g333333?g(\µ?g
ףp=
?gRQ?gzG?)\(?gq=
ףp?      ?gp=
ף?gHzG?)gO
;gO
;gU;g#B;gU;g̈=;gnP*@;g#B;gԍ;gaW;g̈=;gmx;gJ;gnP*@;gnXen;g+3M;r  )g+<g+=gt=gvIh%=gt =g(#=gQu.U)=gvIh%,=gU.=gnb]K2=g(3=g7Q5=gU>?7=gQu.U9=gc߯x:=g; ==gU>=)g*#&,gYg#"5Ԉg_eG|gS'цgBY[%gk̈́gv!g|)vgQ؎gqrgƀg%e~gw$}g߈/|gYygv(xgS'vgv!tgz]rgqrqgw$mgHjgv(hgz]b)gL>gE/w>gZMϢ>gkʹ>g	ʧ#>g!+lěN>g:0y>gR>g};h>gBY[%>gqwNP>gʔA{>gS'Ѷ>g>g.W'>gG)R>gxz)e秷>r  )g5m/Gg<gT跾g`gxz)e秷gIGmg肸zggG)Rg<g&|gg5_涾gqdqAg34gY#)g#"5Ըg_~r  gҷg.W'gS'Ѷr  gBY[%g:0yg	ʧ#gkʹgE/wgE̳g|)vg<sAC gz]ʲgQ؎g 4PSȱgqrg>g\+-eqg+i)+gM7܉g%eޮgw$)r   r   )r@   rC   r   r   rx   )r?   r@   rA   rv   rC   rw   rp   )	r   rc   r   r   r@   r   r   r   r   )rJ   rK   rL   rM   r   paramsr   r*   rS   rT   r   r   r   r   limits	referencelistzipadditional_datar   r  r	  rY   rZ   r[   s   @r   r   r      s    K 	F
K& [[DfM	K N	K )E [[E57	@7	@>F	B		'	'	
	1	E	/I: 3vy12O[[Z9D :D [[]UDM:[[GH "#	
	H	 ;H" [[]UDM:[[,-:;FG
H ;Hr   r   c                   J   a  ] tR tRt o R tR tR tR tR tR t	R t
R	tV tR
# )TestLogLocatoriI  c                   \         P                  ! ^R7      p\        P                  ! \        4      ;_uu_ 4        VP                  ^ R4       RRR4       \        P                  ! . RO4      p\        VP                  RR4      V4       \         P                  ! ^R7      p\        P                  ! . RO4      p\        VP                  ^^d4      V4       R#   + '       g   i     L; i)	r   ra     Nr	   g     @r   )h㈵>r	   r         $@     @@     j@    cA    eA)
r@   rB   ru         @g       @g      0@g      @@g      P@g      `@g      p@)	r   
LogLocatorr*   r+   rX   r   rN   rO   r   rg   s   &  r   r   TestLogLocator.test_basicJ  s      !,]]:&&OOAt$ ' XX @ A
 	COOE59:F  a(XXNO
COOAs3Z@ '&s   CC&	c                    \         P                  ! RR/R7      w  rVP                  R4       VP                  ^^d4       \	        VP                  4       . RO4       R# )z,
Polar Axes have a different ticking logic.

projectionpolar)
subplot_kwlogN)rE   d   r   )r   r   
set_yscaler   r   
get_yticksr   r   r   s   &  r   test_polar_axesTestLogLocator.test_polar_axesX  sC     ,,<*AB
e
As2==?O<r   c                ,   \         P                  ! R R7      p\        VP                  RR4      . R	O4       \         P                  ! \        P
                  ! ^^
4      R7      pRVP                  RR4      9  g   Q hRVP                  RR4      9  g   Q hR# )
r2   subsr   r   rB   r   r6   r"  N)g)\(?gq=
ףp?gQ?r@   gp=
ף?gHzG?gQ?)r   r(  r   r   rN   rP   rk   s   & r   test_switch_to_autolocator)TestLogLocator.test_switch_to_autolocatora  sz      e,3??46D	F   bii2&67#//#s33333??34444r   c                    \         P                  ! 4       pVP                  ^R.^R7       VP                  ^8X  g   Q hVP                  ^8X  g   Q h\        VP                  4      R.8X  g   Q hR# )z
Create log locator with default value, base=10.0, subs=[1.0],
numticks=15 and change it to something else.
See if change was successful. Should not raise exception.
ru   )rb   r7  r   N)r   r(  rq   rb   _baser  _subsrk   s   & r   rr   TestLogLocator.test_set_paramsj  s`       "A6||q   yyA~~CII3%'''r   c                    \         P                  ! RR7      p\        P                  ! . RO4      p\	        VP                  ^R4      V4       R# )r=   r6  r%  Nr=   r>   r   )r   rc   r@   rB   ru   r   r"  r6         I@r7         i@     @@r#       @@     @     @     @     j@r$       jA    A    .A    >A    SAr%      sA    ׇA    חA    קA    eͽA)r   r(  rN   rO   r   r   r   llrh   s   &  r   test_tick_values_correct'TestLogLocator.test_tick_values_correctv  s>    Y/XX O P

 	BNN1c2J?r   c                B   R \         P                  R&   \        P                  ! R%R7      p\        P
                  ! . RNRNRNRNRNRNR	NR
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#N4      p\        VP                  ^R4      V4       R$# )&Fr   r6  r   rc   r@   rB   ru   r   r"  r6   r@  r7   rA  rB  r#  rC  rD  rE  rF  rG  r$  rH  rI  rJ  rK  rL  r%  rM  rN  rO  rP  rQ  r&  g    eAg    _ANr?  )r   rcParamsr   r(  rN   rO   r   r   rR  s   &  r   test_tick_values_not_empty)TestLogLocator.test_tick_values_not_empty  ss   16-.Y/XX 7v 7v 7v 7v 7v 7v 7%7'-7/577=7?E7GM7%7'-7/577=7?E7GM7  &7 (.7 067 8>7 @F7 HN7  &	7 (.	7 06	7 8>	7 @F	7 HN	7
  &7
 (.7
 067 8
 	BNN1c2J?r   c                @   \         P                  P                  R 4      pVP                  ^dR7      . . .p\        P
                  ! \        V4      RRR7      w  r4\        VP                  4       V4       F+  w  rVVP                  V^
R7       VP                  RRR7       K-  	  VP                  4        Fh  p\        VP                  4       V^ ,          P                  4       8H  4      '       g   Q hVP                  4       V^ ,          P                  4       8X  d   Kh  Q h	  R# )	i!N,)sizeT)sharexsharey)binsr.  clip)nonpositiveN)rN   randomdefault_rngnormalr   r   r   r  flattenhistr0  r2   r1  get_ylim)r   rng
dummy_datar   axesr   r   s   &      r   test_multiple_shared_axes(TestLogLocator.test_multiple_shared_axes  s    ii##H-jjcj*B3
LLZdK	DLLNJ7HBGGDrG"MM%VM4 8 ,,.Br}}$q'*<*<*>>????;;=DG$4$4$6666 !r   r)   N)rJ   rK   rL   rM   r   r3  r8  rr   rT  rX  rj  rY   rZ   r[   s   @r   r  r  I  s0     A=5
(@	@7 7r   r  c                   &   a  ] tR tRt o R tRtV tR# )TestNullLocatori  c                    \         P                  ! 4       p\        P                  ! \        4      ;_uu_ 4        VP                  4        RRR4       R#   + '       g   i     R# ; i)zp
Create null locator, and attempt to call set_params() on it.
Should not exception, and should raise a warning.
N)r   NullLocatorr*   warnsUserWarningrq   rk   s   & r   rr   TestNullLocator.test_set_params  s:    
 !!#\\+&&NN '&&&s   AA$	r)   NrJ   rK   rL   rM   rr   rY   rZ   r[   s   @r   rm  rm    s      r   rm  c                   @   a  ] tR tRt o ]R 4       t]R 4       tRtV tR# )_LogitHelperi  c                   ^ T u;8  d   ^8  ds   M Mo^ Tu;8  d   ^8  da   M M]\         P                  ! \         P                  ! ^V ,          ^,
          4      ) \         P                  ! ^V,          ^,
          4      ) 4      # R# )r   F)rN   iscloser.  )r   r   s   &&r   rw  _LogitHelper.isclose  sZ     q919Q 

BFF1Q3q5M>BFF1Q3q5M>: 	705	7r   c                   \         P                  ! V 4      p\         P                  ! V4      p\         P                  ! V^ 8  4      '       d    \         P                  ! V^8  4      '       g   Q h\         P                  ! V^ 8  4      '       d    \         P                  ! V^8  4      '       g   Q h\         P                  ! ^V,          ^,
          4      ) p\         P                  ! ^V,          ^,
          4      ) p\	        WE4       R# r   )rN   rO   r2   r.  r   )r   r   r   aylxlys   &&    r   r    _LogitHelper.assert_almost_equal  s    XXa[XXa[vvb1f~~"&&a..00vvb1f~~"&&a..00ffQrT!Vn_ffQrT!Vn_B#r   r)   N)	rJ   rK   rL   rM   staticmethodrw  r   rY   rZ   r[   s   @r   ru  ru    s+     7 7 $ $r   ru  c                     a ] tR tRt o. ROt^^
]P                  ! ^^4      ,          ,          ^^
]P                  ! ^^4      ,          ,          ^^
]P                  ! ^^4      ,          ,          ^^
]P                  ! ^^4      ,          ,          ^^
]P                  ! ^^4      ,          ,          ^^
]P                  ! ^^4      ,          ,          ^^
]P                  ! ^^	4      ,          ,          ^^
]P                  ! ^^
4      ,          ,          .t. ROt]	P                  P                  R]! ]]4      4      R 4       t]	P                  P                  R]4      R 4       t]	P                  P                  R]],           4      R 4       t]	P                  P                  R]! ]]4      4      R 4       tR t. R	]P                  ! R^ 4      ,          O^R	]P                  ! R^ 4      ,          ,
          Ot]	P                  P                  R]P(                  ! ]^R
7       U Uu. uF  w  rW8w  g   K  W3NK  	  upp 4      R 4       t]	P                  P                  R]4      R 4       tRtVtR# u upp i )TestLogitLocatori  zlims, expected_low_ticksc                    \        . VORN^V,
          O4      p\        P                  ! ^dR7      p\        P	                  VP
                  ! V!  V4       R# )zB
Create logit locator with huge number of major, and tests ticks.
r@   r   N)sortedr   LogitLocatorru  r   r   )r   limsexpected_low_ticksexpected_ticksr   s   &&&  r   test_basic_major!TestLogitLocator.test_basic_major  sV      A A#A-?)?A
 ""-((OOT"	
r   r  c                p   \         P                  ! ^dR7      p\         P                  ! ^d. ROR7      pR F~  pVP                  VR7       VP                  VR7       VP                  ! V!  pVP                  ! V!  pVP
                  VP
                  8X  g   Q hWV8H  P                  4       '       d   K~  Q h	  R# )zR
When the axis is zoomed, the locator must have the same behavior as
MaxNLocator.
r   )r   r"   N)r=   r>   r   rE   )r         )r   r  r   rq   r   shaper2   )r   r  r   maxn_locr   ticks
maxn_tickss   &&     r   test_maxn_major TestLogitLocator.test_maxn_major  s     ""-&&SFENNN'e,OOT*E!--t4J;;*"2"2222',,....  r   c                `   \        \        P                  ! \        P                  ! V^ ,          4      4      ) 4      ^,          ^,           p\        P
                  ! ^dR7      p\        V^R4       F<  pVP                  VR7       \        VP                  ! V!  4      V^,           8:  d   K<  Q h	  R# )z2
Assert logit locator for respecting nbins param.
r   Nr<   )
intrN   floorlog10r   r  rangerq   r   r   )r   r  basic_neededr   r   s   &&   r   test_nbins_major!TestLogitLocator.test_nbins_major  s     BHHRXXd1g%67781<q@""-<B/ENNN's-.%!);;; 0r   c                (   \        . VORN^V,
          O4      p\        V4      p\        P                  ! ^dR7      p\        P                  ! ^dRR7      p\	        V^R4       F  pVP                  VR7       VP                  VR7       VP                  ! V!  pVP                  ! V!  p	\        V4      \        V4      8  d,   \        V4      ^,
          ^,          \        V	4      8  g   Q hK  \        P                  \        . VOV	O4      V4       K  	  R# )z\
In large scale, test the presence of minor,
and assert no minor when major are subsampled.
r@   r   T)r   r   Nr<   )	r  r   r   r  r  rq   r   ru  r   )
r   r  r  r  r  r   	minor_locr   major_ticksminor_tickss
   &&&       r   
test_minorTestLogitLocator.test_minor  s      A A#A-?)?A
 >*""-((s$?	<B/ENNN'  u -//40K#//6K;3~#66K(1,1C4DDDD 007[7;78.J 0r   c                    \         P                  ! ^dR7      pVP                  '       d   Q hRVn        VP                  '       g   Q hVP                  RR7       VP                  '       d   Q hR# )r/  r   TFr   N)r   r  r   rq   rk   s   & r   test_minor_attr TestLogitLocator.test_minor_attr  sS    ""-999}	yyyyU#999}9r   r   )repeatc                    \         P                  ! 4       pVP                  ! V!  p\        V4      \        V4      8X  g   Q hR# )zL
Create logit locator, and test the nonsingular method for acceptable
value
N)r   r  nonsingularr  )r   r  r   lims2s   &&  r   test_nonsingular_ok$TestLogitLocator.test_nonsingular_ok$  s6     ""$&d|ve},,,r   okvalc                    \         P                  ! 4       pRTrCVP                  W44      w  rVWd8X  g   Q h^ Tu;8  d	   V8  g   Q h Q hT^rCVP                  W44      w  rVWS8X  g   Q hYVu;8  d	   ^8  g   Q h Q hR# )zP
Create logit locator, and test the nonsingular method for non
acceptable value
Nr<   )r   r  r  )r   r  r   r   r   vmin2vmax2s   &&     r   test_nonsingular_nok%TestLogitLocator.test_nonsingular_nok5  s     ""$%dt2}}5 5     Qdt2}} q     r   r)   N)r   r   )r  gףp=
?)gMb@?gCl?-C6
?gSt$?)gh㈵>g;?)gƠ>g?gHj>ge(?)g:0y5>g$P?))r   r   )r   rc   )r   r   )rJ   rK   rL   rM   ref_basic_limitsrN   rP   ref_basic_major_ticksref_maxn_limitsr*   rS   rT   r  r  r  r  r  r  acceptable_vmin_vmax	itertoolsproductr  r  rY   rZ   )abr\   s   00@r   r  r    sV    	 	
R299Q?"#	R299Q?"#	R299Q?"#	R299Q?"#	R299Q?"#	R299Q?"#	R299Q?"#	R299Q##$	 GO[["34
	
 [[V_5/ 6/ [[V%5%GH	< I	< [["34J	J2
2q!
!
cRYYr1%%
%
 [[ $++,@K	
Kv QFK	
-- [[W&:;! <!!	
s   
I*-I*r  c                   &   a  ] tR tRt o R tRtV tR# )TestFixedLocatoriF  c                    \         P                  ! \        ^ ^4      ^R7      pVP                  ^R7       VP                  ^8X  g   Q hR# )zy
Create fixed locator with 5 nbins, and change it to something else.
See if change was successful.
Should not exception.
r   N)r   FixedLocatorr  rq   r   )r   fixeds   & r   rr    TestFixedLocator.test_set_paramsG  s?     $$U1b\;q!{{ar   r)   Nrs  r[   s   @r   r  r  F  s        r   r  c                   &   a  ] tR tRt o R tRtV tR# )TestIndexLocatoriR  c                    \         P                  ! ^^R7      pVP                  ^^R7       VP                  ^8X  g   Q hVP                  ^8X  g   Q hR# )z
Create index locator with 3 base, 4 offset. and change it to something
else. See if change was successful.
Should not exception.
r   N)r   IndexLocatorrq   r;  r   )r   indexs   & r   rr    TestIndexLocator.test_set_paramsS  sM     $$!A6a*{{a||q   r   r)   Nrs  r[   s   @r   r  r  R  s     	! 	!r   r  c                      a  ] tR tRt o R t]P                  P                  R^ ^^ ^.3R	^. R
O3.4      R 4       tR t	R t
RtV tR# )TestSymmetricalLogLocatori_  c                    \         P                  ! ^
^R7      pVP                  R.^R7       VP                  R.8X  g   Q hVP                  ^8X  g   Q hR# )z
Create symmetrical log locator with default subs =[1.0] numticks = 15,
and change it to something else.
See if change was successful.
Should not exception.
r   	linthreshru   )r7  rb   N)r   SymmetricalLogLocatorrq   r<  rb   r   syms   & r   rr   )TestSymmetricalLogLocator.test_set_params`  sN     ++qASEA.yySE!!!||q   r   r   c                p    \         P                  ! ^
^R7      pVP                  WR7      p\        WS4       R# )rE   r  )r   r   N)r   r  r   r   )r   r   r   r   r  r  s   &&&&  r   test_values%TestSymmetricalLogLocator.test_valuesl  s.     ++qAT55+r   c                    \         P                  ! ^
^RR.R7      pVP                  4        VP                  P	                  R^
4       \        V! 4       . RO4       R# )rE   ru   r'  )r   r  r7  N)	ir   r   r>   r      (   )r   r  create_dummy_axisaxisset_view_intervalr   r  s   & r   	test_subs#TestSymmetricalLogLocator.test_subsy  sG    ++qSzR""3+35"EFr   c                   \         P                  ! ^
^R7      pVP                  4        VP                  P	                  ^^	4       V! 4       R.8H  P                  4       '       g   Q hVP                  P	                  ^^4       V! 4       RR.8H  P                  4       '       g   Q hVP                  ^
^
4      R8X  g   Q hVP                  RR4      R8X  g   Q hVP                  ^ ^ 4      R8X  g   Q hR# )	rE   r  rB   r"  N)r=   r/  r  )r<   )MbPr	   )r   r  r  r  r  r2   r   r  s   & r   test_extending(TestSymmetricalLogLocator.test_extending  s    ++qA""1a(###%%%%""1b)#t$))++++r2&(222sC(J666q!$777r   r)   Nr<   r<   r   r=   )rJ   rK   rL   rM   rr   r*   rS   rT   r  r  r  rY   rZ   r[   s   @r   r  r  _  s\     
! [["A1vQ
#,,G	8 	8r   r  c                   P   a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
tV tR# )TestAsinhLocatori  c                    \         P                  ! R ^R7      pVP                  R 8X  g   Q hVP                  ^8X  g   Q hVP                  ^
8X  g   Q hR# )gX9v@)linear_widthrb   N)r   AsinhLocatorr  rb   r   r   lctrs   & r   	test_initTestAsinhLocator.test_init  sJ    ##D  E)))}}"""yyBr   c                f   \         P                  ! ^^R^R	R7      pVP                  ^8X  g   Q hVP                  R8X  g   Q hVP                  ^8X  g   Q hVP
                  R	8X  g   Q hVP                  ^R7       VP                  ^8X  g   Q hVP                  R4       VP                  ^8X  g   Q hVP                  RR7       VP                  R8X  g   Q hVP                  RR7       VP                  R8X  g   Q hVP                  ^R7       VP                  ^8X  g   Q hVP                  RR7       VP                  ^8X  g   Q hVP                  R
R7       VP
                  R
8X  g   Q hVP                  RR7       VP
                  R
8X  g   Q hVP                  . R7       VP
                  e   Q hR# )r   r  )r  rb   	symthreshr   r7  ra   Nr@   )r  r   r6  )r   g      
@)r>   g     @)r   r  rb   r  r   r7  rq   r  s   & r   rr    TestAsinhLocator.test_set_params  s~   ##-/5)*> }}"""~~&&&yyA~~yyK'''$}}"""}}"""#&~~$$$$'~~$$$QyyA~~T"yyA~~Z(yyJ&&&T"yyJ&&&R yy   r   c                d   \         P                  ! ^d^^ R7      p\        VP                  R^4      \        P
                  ! RRR4      4       \        VP                  RR4      \        P
                  ! RRR4      4       \        VP                  RR4      \        P
                  ! RRR	4      4       R
# )r/  r  rb   r   )\(?rc   r   gB`"۹?{Gz?r  gMO?Mb`?Nr<   r;   g{Gzr   r  r   r   rN   rP   r  s   & r   test_linear_values#TestAsinhLocator.test_linear_values  s    ##rJD,,R3IIb$4	6D,,T37IIdE48	:D,,UD9IIeVU;	=r   c                    \         P                  ! R ^^ R7      p\        VP                  R^d4      . RO4       \        VP                  RR4      . RO4       R# )r   r  r   Nr  )r  r  r:   r<   r   r   rc   r=   r   r  r/  )r  r  r  r  r   r   r   r`   r  r/  r   r   r  r   r   r  s   & r   test_wide_values!TestAsinhLocator.test_wide_values  sP    ##rJD,,T374	5 	D,,UD97	8r   c                t    \         P                  ! ^d^^ R7      p\        VP                  RR4      . RO4       R# )z<Check that manually injected zero will supersede nearby tickr  r   Nr   )r   r8   r   r  r  s   & r   test_near_zeroTestAsinhLocator.test_near_zero  s.    ##qqID,,T379IJr   c                    \         P                  ! R ^R7      p\        VP                  ^e^f4      \        P
                  ! ^eRR4      4       R# )rB   ra   gq=
ףY@r   Nr  r  s   & r   test_fallbackTestAsinhLocator.test_fallback  s;    ##C"5D,,S#6IIc637	9r   c                   \         P                  ! ^^R^ R7      pVP                  4        VP                  P	                  R^4       \        V! 4       . RO4       VP                  P	                  RR4       \        V! 4       . R	O4       VP                  P	                  R
R4       \        V! 4       . R	O4       VP                  P	                  ^R4       \        V! 4       . RO4       R# )r=   r?   )r  rb   r  r   r   r   r   Nr<   )r<   r   r>   r  g333333)r=   r   r   )r   r  r  r  r  r   r  s   & r   test_symmetrizing"TestAsinhLocator.test_symmetrizing  s    ##Q.2< 		##B*DFJ/		##B,DFJ/		##E40DFJ/		##As+DFN3r   c                    \         P                  ! ^^^
RR7      p\        VP                  R^n4      . RO4       \         P                  ! ^^^R7      p\        VP                  RR4      . R	O4       R# )
r=   )r  rb   r   r7  r  i  N)r=   r`   r   )iir  iir  r:   r  r<   r   re   r;   r   r   r   r@   r=   r`   r   rE   rG   2   r/  i,    i)iiir:   r<   r   r   rc   r=   r      }   iq  r  )r   lctr10lctr5s   &  r   test_base_rounding#TestAsinhLocator.test_base_rounding  sk    %%1q+-I?F..tS9A	B
 $$!bqIE--eT:6	7r   r)   N)rJ   rK   rL   rM   r  rr   r  r  r  r  r  r  rY   rZ   r[   s   @r   r  r    s3     !>=8K94"7 7r   r  c                     a  ] tR tRt o . R$OtRR.tRR.t. R%OtRR.RR.RR	.R
R.RR..t. R&Ot	]
P                  P                  RR'R(.4      R 4       t]
P                  P                  R]4      R 4       t]
P                  P                  R]4      R 4       t]
P                  P                  R]4      R 4       tR tR t]
P                  P                  R]4      R 4       t]
P                  P                  R]	4      R 4       t]
P                  P                  R]4      R 4       t]
P                  P                  R]4      R 4       tR tR  tR! tR"tV tR## ))TestScalarFormatteri  TFr8   z0.000g(0?z0.012grh|?z0.123gGz?z1.230g(@z12.300zunicode_minus, resultc                    V\         P                  R &   \        P                  ! 4       P                  P                  4       P                  R4      P                  4       V8X  g   Q hR# )axes.unicode_minusNr<   )r   rW  r   gcar   get_major_formatterformat_data_shortstrip)r   unicode_minusr3   s   &&&r   test_unicode_minus&TestScalarFormatter.test_unicode_minus2  sO     .;)*GGIOO//1CCBGMMO	r   zleft, right, offsetc                   \         P                  ! 4       w  rEVP                  P                  4       pW8X  d   \        P
                  ! \        R R7      M	\        4       ;_uu_ 4        VP                  W4       RRR4       VP                  P                  4        VP                  V8X  g   Q hW8X  d   \        P
                  ! \        R R7      M	\        4       ;_uu_ 4        VP                  W!4       RRR4       VP                  P                  4        VP                  V8X  g   Q hR#   + '       g   i     L; i  + '       g   i     LR; i)zAttempting to set identicalr'   N)r   r   r   r  r*   rp  rq  r   r   _update_ticksr   )r   leftrightr   r   r   	formatters   &&&&   r   test_offset_value%TestScalarFormatter.test_offset_value:  s    ,,.HH002	  ll;.KL$/M2 2KK$2 	 6)))  ll;.KL$/M2 2KK$2 	 6)))2 22 2s   &D*!D=*D:	=E	
use_offsetc                    \         P                  ! R V/4      ;_uu_ 4        \        P                  ! 4       pWP	                  4       8X  g   Q hVP
                  ^ 8X  g   Q h RRR4       R#   + '       g   i     R# ; i)zaxes.formatter.useoffsetN)r   r   r   ScalarFormatterget_useOffsetr   )r   r#  tmp_forms   && r   test_use_offset#TestScalarFormatter.test_use_offsetK  s\    ^^7DEE..0H!7!7!9999??a''' FEEEs   ?A++A<	use_math_textc                    \         P                  ! R V/4      ;_uu_ 4        \        P                  ! 4       pWP	                  4       8X  g   Q h RRR4       R#   + '       g   i     R# ; i)axes.formatter.use_mathtextN)r   r   r   r%  get_useMathText)r   r*  r'  s   && r   test_useMathText$TestScalarFormatter.test_useMathTextR  sJ    ^^:MJKK..0H $<$<$>>>> LKKKs   ,AA)	c                    \         P                  ! 4       pVP                  R 4       VP                  4       '       d   Q hVP                  R 8X  g   Q hR# )r@   N)r   r%  set_useOffsetr&  r   r   r'  s   & r   test_set_use_offset_float-TestScalarFormatter.test_set_use_offset_floatX  sE    **,s#))++++#%%%r   c                2   \         P                  ! 4       pVR ,          pV'       d#   VR,          RR . \         P                  .39   d   \        P                  ! R4       \
        P                  ! RR/4      ;_uu_ 4        \        P                  ! 4       pVP                  4       '       g   Q hVP                  4        VP                  P                  ^ ^
4       VP                  . RO4       W#! R4      9   g   Q h RRR4       R#   + '       g   i     R# ; i)	thousands_sepgroupingNzLocale does not apply groupingzaxes.formatter.use_localeTr&  r<   )r=   r>   r`   )locale
localeconvCHAR_MAXr*   skipr   r   r   r%  get_useLocaler  r  set_data_intervalset_locs)r   convsepr'  s   &   r   test_use_locale#TestScalarFormatter.test_use_locale^  s      "?#d:&rs+V__4E/FFKK89^^8$?@@..0H))++++&&(MM++Ar2i((3-''' A@@@s   ?A;DD	z.sci_type, scilimits, lim, orderOfMag, fewticksc                   \         P                  ! 4       pVP                  V4       VP                  V4       \        P
                  ! 4       w  rxVP                  P                  V4       VP                  ! V!   V'       d0   VP                  P                  \         P                  ! ^4      4       VP                  VP                  P                  4       4       WFP                  8X  g   Q hR# )r   N)r   r%  set_scientificset_powerlimitsr   r   r   set_major_formatterr   r  r   r>  get_majorticklocsorderOfMagnitude)	r   sci_type	scilimitsr   
orderOfMagfewticksr'  r   r   s	   &&&&&&   r   test_scilimits"TestScalarFormatter.test_scilimitsm  s     **,)  +,,.
$$X.
SHH&&w':':1'=>"((446766666r   zvalue, expectedc                    R \         P                  R&   \        P                  ! 4       pVP	                  V4      V8X  g   Q hR# )Fr  N)r   rW  r   r%  format_data)r   valuer   sfs   &&& r   test_format_data$TestScalarFormatter.test_format_data|  s6    -2)*$$&~~e$000r   zdata, expectedc                    \         P                  ! 4       w  r4VP                  R^4       VP                  P	                  4       P
                  pV! V4      V8X  g   Q hR# )r=   Nr<   )r   r   r   r   r  r  )r   r   r   r   r   fmts   &&&   r   test_cursor_precision)TestScalarFormatter.test_cursor_precision  sG    ,,.
Bhh**,>>4yH$$$r   c                B   \         P                  ! 4       pVP                  4        VP                  P	                  ^ ^
4       VP
                  pV! V4      V8X  g   Q hVP                  P                  4       ^	8X  g   Q hVP                  P                  4       ^ 8X  g   Q hR# r   )r   r%  r  r  r  r  get_tick_space
get_minpos)r   r   r   rR  rV  s   &&&  r   test_cursor_dummy_axis*TestScalarFormatter.test_cursor_dummy_axis  s     $$&

!!!R(""4yH$$$ww%%'1,,,ww!!#q(((r   c           	     8   \         P                  P                  R RRRRR/4       \        \        P
                  4      P                  ^8  dt   \        P                  ! \        RR7      ;_uu_ 4        \        P                  ! 4       w  rVP                  . R
O4       VP                  P                  4        RRR4       R# \        P                  ! \        R	R7      ;_uu_ 4        \        P                  ! \        RR7      ;_uu_ 4        \        P                  ! 4       w  rVP                  . R
O4       VP                  P                  4        RRR4       RRR4       R#   + '       g   i     R# ; i  + '       g   i     L.; i  + '       g   i     R# ; i)font.familyserifz
font.serifcmr10r,  Fzcmr10 font should ideallyr'   Nz
Glyph 8722r  )r   rW  updateparse_versionr*   __version__r   rp  rq  r   r   r   canvasdrawr2  s   &  r   test_mathtext_ticks'TestScalarFormatter.test_mathtext_ticks  s   7')5
 	 ++,22Q6k1LMM,,.j)

! NM
 ,,{,??,,{2MNN,,.j)

! O @? NMM ON @??s2   2AE!%%F
AE5	F!E2	5F FF	c           	        \         P                  P                  R RRRRR/4       VP                  \        P
                  RR7      ;_uu_ 4        \        P                  ! 4       w  r#VP                  RR.^(R.4       VP                  R	4       . ROp\        P                  ! 4       pVP                  V\        WT4      4       VP                  P                  4        VP                   '       d   Q h R
R
R
4       R
#   + '       g   i     R
# ; i)r_  ra  zmathtext.fontsetcmr,  Tzmatplotlib.mathtext)loggerr   r.  NgQ)r  r   r   r	  )r   rW  rb  at_levelloggingWARNINGr   r   plotr0  r   LogFormatterSciNotation
set_yticksmapre  rf  text)r   caplogr   r   yticksr   s   &&    r   test_cmr10_substitutions,TestScalarFormatter.test_cmr10_substitutions  s    7)4
 	 __W__5J_KKllnGCGGUDMB:.MM% 'F779IMM&#i"89JJOO{{{"?{ LKKKs   B!C;;D	c                p    \         P                  ! 4       pVP                  . 4       V! R 4      R8X  g   Q hR# )r@    N)r   r%  r>  )r   rR  s   & r   test_empty_locs#TestScalarFormatter.test_empty_locs  s+    $$&
B#w"}}r   r)   N)){      r   )iCir   )i50  i=0  i40  )iii)g    i@g    j@順 )g    jg    i`y)g    hi@g    j@r~  )g    jg    hir  )iO iQ iP )i+i+i+)r=   r=   r=   )r|  r|  r   )g/'?g_L?r   )g
ףp=@g33333@i  )g@g    `@iȯ  )g1е/G?gg޻G?g9̗G?)g\h@gp=
@i.1  )g      "@g      (@r   )g      @     @r   )g     @r  r   )Gz?r  r=   )g{G#@gQ$@rE   )g(\X@gq=
ף Y@r/  )g(\@g
ףp=
@rD   )g{G/@g(\0@r  )g!rhܿrh|?r   )grh|߿r  r   )g3333@g    @@i0  )gffffgffff@r   )	)Fr  )r"  r6   r   F)Tr  r>   )r  r  r   F)Tr  )r  rE   r   F)Tr  )r  x   r>   F)Tr  )in   r>   F)Tr  )r  r  r  F)T)r      )g   tAg   0A	   T)Tr  g     jr$  r   F)T)rD   rD   r  rD   F))r   1e-1)r  z1.1e-1)rO  1e8)g    9Az1.1e8)T   −1)F-1)rJ   rK   rL   rM   offset_datause_offset_datauseMathText_datascilimits_datacursor_datarP  r*   rS   rT   r  r!  r(  r.  r3  rA  rM  rS  rW  r\  rg  rv  rz  rY   rZ   r[   s   @r   r  r    s    KB UmOe}
N 
W				xKK [[47GII [[2K@* A*  [[\?;( <( [[_.>?? @?
&( [[8.J7J7 [[.<1 =1
 [[-{;% <% [[-{;) <)"&#$ r   r  c                     a  ] tR tRt o R^]P
                  ! RR4      ]P
                  ! RR4      . RO3R^
]P                  ! RR]P                  RRR.4      ]! ^4      . RO3R^2]P                  ! . RO]	R7      ]! ^4      . RO3.t
R	R
R]P                  ]P                  .t]P                  P                  R]
4      ]P                  P                  R]4      R 4       4       tR tRtV tR# )TestLogFormatterExponenti  Tr'  Fr   r!  rc   dtyperu   r   r"  z2labelOnlyBase, exponent, locs, positions, expectedr   c                X   \         P                  ! VVR 7      pVP                  4        VP                  P	                  ^W#,          4       W$,          p\        W4       U	U
u. uF  w  rV! W4      NK  	  pp	p
V Uu. uF  qP                  RR4      NK  	  ppW8X  g   Q hR# u up
p	i u upi )r   labelOnlyBase-u   −N)r   LogFormatterExponentr  r  r  r  replace)r   r  r   exponentlocs	positionsr   r   valsr   poslabelslabels   &&&&&&&      r   r   #TestLogFormatterExponent.test_basic  s    
 00d?LN	##%((DN;z474HI4H)A#4HIFNOhUMM#'78hO!!! JOs   !B!;B'c                    \         P                  ! ^
RR7      pVP                  4        VP                  P	                  ^^
4       V! R4      R8X  g   Q hR# )rE   Tr  ry  Ng&$?)r   r  r  r  r  )r   r   s   & r   
test_blank#TestLogFormatterExponent.test_blank  sG    00bM	##%((B/!R'''r   r)   Nr  )z-3z-2r  0123r   gh㈵)0.1z1e-053.14z0.2z-0.2z-1e-05)r`   r      *   )r  51242)rJ   rK   rL   rM   rN   rP   rO   pir  float
param_datae	base_datar*   rS   rT   r   r  rY   rZ   r[   s   @r   r  r    s     	q"))B$biiC&8	/	1 
BHHc7BEE3hGH	qD	F	BHH^5958		!	J c4-I[[@*N[[VY/	" 0N	"( (r   r  c                      a  ] tR tRt o ]P
                  ! 4       t. ROt]P                  P                  R]4      R 4       tRtV tR# )TestLogFormatterMathtexti  zmin_exponent, value, expectedc                    \         P                  ! R V/4      ;_uu_ 4        V P                  V4      V8X  g   Q h RRR4       R#   + '       g   i     R# ; i)zaxes.formatter.min_exponentN)r   r   rV  )r   min_exponentrQ  r   s   &&&&r   test_min_exponent*TestLogFormatterMathtext.test_min_exponent  s=    ^^:LIJJ88E?h... KJJJs   AA	r)   N))r   r=   $\mathdefault{10^{0}}$)r   r  z$\mathdefault{10^{-2}}$)r   r7   z$\mathdefault{10^{2}}$)r`   r=   z$\mathdefault{1}$)r`   r  z$\mathdefault{0.01}$)r`   r7   z$\mathdefault{100}$)r`   r	   z$\mathdefault{10^{-3}}$)r`   r#  z$\mathdefault{10^{3}}$)rJ   rK   rL   rM   r   LogFormatterMathtextrV  	test_datar*   rS   rT   r  rY   rZ   r[   s   @r   r  r    sA     

&
&
(C	I [[<iH/ I/r   r  c                      a  ] tR tRt o . ROt]P                  P                  R4      ]P                  P                  R]4      R 4       4       tRtV tR# )TestLogFormatterSciNotationi  defaultzbase, value, expectedc                    \         P                  ! VR 7      p\        P                  ! RR/4      ;_uu_ 4        V! V4      V8X  g   Q h RRR4       R#   + '       g   i     R# ; i)r   text.usetexFN)r   rp  r   r   )r   r   rQ  r   r   s   &&&& r   r   &TestLogFormatterSciNotation.test_basic
  sJ     33>	^^]E233U#x/// 4333s   AA$	r)   N))r>   g      ?z$\mathdefault{2^{-5}}$)r>   r=   z$\mathdefault{2^{0}}$)r>       z$\mathdefault{2^{5}}$)r>   g333333?z$\mathdefault{1.2\times2^{-5}}$)r>   r   z$\mathdefault{1.2\times2^{0}}$)r>   g333333C@z$\mathdefault{1.2\times2^{5}}$)rE   r<   z$\mathdefault{-10^{0}}$)rE   r!  z$\mathdefault{10^{-5}}$)rE   r=   r  )rE   r~  z$\mathdefault{10^{5}}$)rE   gh㈵>z$\mathdefault{2\times10^{-5}}$)rE   r>   z$\mathdefault{2\times10^{0}}$)rE   i@ z$\mathdefault{2\times10^{5}}$)rE   r  z$\mathdefault{5\times10^{-5}}$)rE   r   z$\mathdefault{5\times10^{0}}$)rE   i  z$\mathdefault{5\times10^{5}}$)rJ   rK   rL   rM   r  r   styler  r*   rS   rT   r   rY   rZ   r[   s   @r   r  r    sJ     I& 	YYy![[4i@0 A "0r   r  c                     a  ] tR tRt o . RNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR0NR1NR2NR3NR4NR5NR6NR7NR8NR9NR:NR;NR<NR=NR>NR?NR@NRANRBNRCNRDNRENRFNRGNRHNRINRJNRKNRLNRMNRNNRONRPNRQNRRNRSNRTNRUNRVNRWNRXNRYNRZNR[NR\NR]NR^NR_NR`NRaNRbNRcNRdNReNRfNRgNRhNRiNRjNRkNRlNRmNRnNRoNRpNRqNRrNRsNRtNRuNRvNRwNRxNRyNRzNR{NR|NR}NR~NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNt]P                  P                  R]4      R 4       t]P                  P                  R. RO4      R 4       t	RR lt
]P                  P                  R4      R 4       t]P                  P                  R	. RO4      R
 4       t]P                  P                  R	. RO4      R 4       tRtV tR# )TestLogFormatteri  zvalue, domain, expectedc                b    \         P                  ! 4       pVP                  W4      pWS8X  g   Q hR # N)r   LogFormatter_pprint_val)r   rQ  domainr   rV  r  s   &&&&  r   test_pprintTestLogFormatter.test_pprint  s*    ""$.   r   zvalue, long, shortc                    \         P                  ! 4       w  rEVP                  R 4       VP                  P	                  4       pVP                  V4      V8X  g   Q hVP                  V4      V8X  g   Q hR# )r.  N)r   r   
set_xscaler   r  rP  r  )r   rQ  longshortr   r   rV  s   &&&&   r   rS  !TestLogFormatter.test_format_data  s_     ,,.
ehh**,u%---$$U+u444r   c                h   VP                  4       pVP                  4       pVP                  V4       V^
\        P                  ! \        P
                  ! V4      4      ,          ,          pV Uu. uF  p\        V4      V9   NK  	  ppV Uu. uF  q! V4      R8g  NK  	  p	pW8X  g   Q hR# u upi u upi )z.Test whether locator marks subs to be labeled.ry  N)get_minor_formatterr   r>  rN   r  r  round)
r   r  r7  rV  minor_tlocscoefsclabel_expectedr   
label_tests
   &&&       r   _sub_labelsTestLogFormatter._sub_labels  s    &&(,,.[!b288BHH[,A#BCC49:Eq%(d*E:,78Kqc!flK
8+++ ;8s   .B*B/r  c           	     D   \         P                  ! 4       w  rVP                  R 4       VP                  P	                  \
        P                  ! ^
. R7      4       VP                  P                  \
        P                  ! ^
\        P                  ! ^^
4      R7      4       VP                  P                  \
        P                  ! RR7      4       VP                  P                  \
        P                  ! RR7      4       VP                  ^R4       VP                  P                  4       pVP                  VP                  P!                  4       4       VP                  P!                  4        Uu. uF  pV! V4      R8g  NK  	  pp\        P"                  ! V4      '       g   Q hV P%                  VP                  . R7       VP                  ^R4       V P%                  VP                  . R7       VP                  ^^P4       V P%                  VP                  . R7       VP                  ^^4       V P%                  VP                  . ROR7       VP                  R	R
4       V P%                  VP                  \        P                  ! ^^
\&        R7      R7       R# u upi )r.  )r   r7  T)r  FrE  ry  r6  i   r@   r   r  N)r>   r`   r   rD   )r   r   r  r   r  r   r(  r   rN   rP   rF  r  set_minor_formatterr   r  r>  rG  r2   r  r  )r   r   r   rV  r   show_major_labelss   &     r   test_sublabelTestLogFormatter.test_sublabel  s    ,,.
e
""7#5#52B#GH
""7#5#52;=99Q;K$M 	N
$$W%9%9%MN
$$W%9%9%NO
Ashh**,RXX//12&(hh&@&@&BD&B !Vr\&B 	 Dvv'((((+ 	As+ 	Ar+ 	Aq5 	C		!Rs(CD-Ds   1Jvalc                    \         P                  ! 4       pVP                  4        VP                  P	                  ^^
4       V! V4      \        V4      8X  g   Q hR# r=   N)r   r  r  r  r  strr   r  temp_lfs   && r   test_LogFormatter_call'TestLogFormatter.test_LogFormatter_call  sH     &&(!!#&&q"-s|s3x'''r   c                    \         P                  ! 4       pVP                  4        VP                  P	                  ^^
4       V! V4       R# r  )r   r  r  r  r  r  s   && r   test_LogFormatter_call_tiny,TestLogFormatter.test_LogFormatter_call_tiny  s9     &&(!!#&&q"-r   r)   N)}9x ?r	   z3.142e-5)Gŷ4?r	   z3.142e-4)ei?r	   z3.142e-3)\, ?r	   z3.142e-2)s7v/?r	   z3.142e-1)PERT!	@r	   3.142)f)zj?@r	   z3.142e1)&FYs@r	   z3.142e2)WXp/@r	   z3.142e3)mnL@r	   z3.142e4),Ar	   z3.142e5)r!  r	   1e-5)r
   r	   1e-4)r	   r	   1e-3)r  r	   1e-2)r   r	   r  )r=   r	   r  )rE   r	   10)r/  r	   100)r   r	   1000)'  r	   1e4)r~  r	   1e5)r  r  r  )r  r  r  )r  r  0.003)r  r  0.031)r  r  0.314)r  r  r  )r  r  31.416)r  r  314.159)r  r  3141.593)r  r  	31415.927)r  r  
314159.265)r!  r  r  )r
   r  r  )r	   r  0.001)r  r  0.01)r   r  r  )r=   r  r  )rE   r  r   )r/  r  r  )r   r  r  )r  r  10000)r~  r  100000)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  )r!  r@   r  )r
   r@   r  )r	   r@   r  )r  r@   r  )r   r@   r  )r=   r@   r  )rE   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   z0.03)r  r   z0.31)r  r   r  )r  r   z31.42)r  r   z314.16)r  r   z3141.59)r  r   z31415.93)r  r   z	314159.27)r!  r   r  )r
   r   r  )r	   r   r  )r  r   r  )r   r   r  )r=   r   r  )rE   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/  z0.3)r  r/  3.1)r  r/  z31.4)r  r/  z314.2)r  r/  z3141.6)r  r/  z31415.9)r  r/  z314159.3)r!  r/  r  )r
   r/  r  )r	   r/  r  )r  r/  r  )r   r/  r  )r=   r/  r  )rE   r/  r   )r/  r/  r  )r   r/  r  )r  r/  r  )r~  r/  r  )r  rJ  z3.1e-5)r  rJ  z3.1e-4)r  rJ  z3.1e-3)r  rJ  z3.1e-2)r  rJ  z3.1e-1)r  rJ  r  )r  rJ  z3.1e1)r  rJ  z3.1e2)r  rJ  z3.1e3)r  rJ  z3.1e4)r  rJ  z3.1e5)r!  rJ  r  )r
   rJ  r  )r	   rJ  r  )r  rJ  r  )r   rJ  r  )r=   rJ  r  )rE   rJ  r   )r/  rJ  r  )r   rJ  r  )r  rJ  r  )r~  rJ  r  ))r8   r  r  )r   r  r  )r   z-10^0r  )g|=z2x10^-10z2e-10)g    _Bz10^10z1e+10)r)   )r=   rE   r/  r   )g       g       g       g       )rJ   rK   rL   rM   pprint_datar*   rS   rT   r  rS  r  r   r  r  r  r  r  rY   rZ   r[   s   @r   r  r    sJ    E,E,E 	,E 	+	E
 	*E 	&E 	(E 	(E 	(E 	(E 	(E 	E 	 E 	E 	E  	!E" 	#E$ 	%E& 	'E( 	)E* 	+E, 	-E. 	&/E0 	&1E2 	)3E4 	(5E6 	'7E8 	&9E: 	';E< 	(=E> 	)?E@ 	*AEB 	+CED 	EEF 	GEH 	 IEJ 	KEL 	MEN 	OEP 	QER 	SET 	UEV 	 WEX 	"YEZ 	$[E\ 	$]E^ 	'_E` 	&aEb 	%cEd 	$eEf 	%gEh 	&iEj 	'kEl 	(mEn 	)oEp 	qEr 	sEt 	uEv 	wEx 	yEz 	{E| 	}E~ 	E@ 	AEB 	CED 	 EEF 	"GEH 	"IEJ 	!KEL 	#MEN 	"OEP 	!QER 	"SET 	#UEV 	$WEX 	%YEZ 	&[E\ 	]E^ 	_E` 	aEb 	cEd 	eEf 	gEh 	iEj 	kEl 	mEn 	oEp 	qEr 	$sEt 	$uEv 	#wEx 	"yEz 	#{E| 	"}E~ 	#E@ 	$AEB 	%CED 	&EEF 	'GEH 	IEJ 	KEL 	MEN 	OEP 	QER 	SET 	UEV 	WEX 	YEZ 	[E\ 	 ]E^ 	/_E` 	/aEb 	.cEd 	-eEf 	,gEh 	(iEj 	*kEl 	*mEn 	*oEp 	*qEr 	*sEt 	#uEv 	$wEx 	#yEz 	"{E| 	!}E~ 	E@ 	AEB 	 CED 	"EEF 	"GEH 	#IEKN [[6D! E!
 [[1 4 55, 	YYy!#E "#EJ [[U$67( 8( [[U$FG Hr   r  c                     a ] tR tRt o]R 4       t]P                  P                  R. RO4      R 4       t	]
! ]! ^^
4       U u. uF  p ^
V ) ,          NK  	  up ]! ^^
4       U u. uF  p ^^
V ) ,          ,
          NK  	  up ,           R.,           4      t]P                  P                  R]4      R 4       t]P                  P                  RR4      R	 4       t]P                  P                  R^^]P                   ! ]P"                  ! R^^
4      ) 4      ,           ,          4      R
 4       t. ROt]P                  P                  R]4      R 4       tR tR tR t]P                  P                  RR4      R 4       tRtVtR# u up i u up i )TestLogitFormatteri  c                   \         P                  ! RV 4      pV'       d   VR,          RJpVR,          '       d   \        VR,          4      M^pVR,          e   \        VR,          4      M^ pV^
V,          ,          pVR,          '       g   VR,          e   V'       d
   ^V,
          # V# \         P                  ! RV 4      pV'       d,   \        VR,          4      \        VR,          4      rvWg,          # \	        R	4      h)
z
Parser to convert string as r'$\mathdefault{1.41\cdot10^{-4}}$' in
float 1.41e-4, as '0.5' or as r'$\mathdefault{\frac{1}{2}}$' in float
0.5,
zT[^\d]*(?P<comp>1-)?(?P<mant>\d*\.?\d*)?(?:\\cdot)?(?:10\^\{(?P<expo>-?\d*)})?[^\d]*$compNmantexpoz4[^\d]*\\frac\{(?P<num>\d+)\}\{(?P<deno>\d+)\}[^\d]*$numdenozNot formatted by LogitFormatter)rV   r(   r  r  rX   )stringr(   r  mantissar  rQ  r  r  s   &       r   logit_deformatter$TestLogitFormatter.logit_deformatter  s      
 =,D/4V}}uU6]+!H).v)B3uV}%DrTz)EV}}f 9u9$CV
 eEl+U5=-A::;;r   zfx, xNc                   VfC   \         P                  ! \        4      ;_uu_ 4        \        P	                  V4       R R R 4       R # \        P	                  V4      p\
        P                  W#4      '       g   Q hR #   + '       g   i     R # ; ir  )r*   r+   rX   r  r  ru  rw  )r   fxr   r   s   &&& r   test_logit_deformater(TestLogitFormatter.test_logit_deformater  sc     9z**"44R8 +* #44R8A''----	 +**s   A;;B	r   c                    \         P                  ! RR7      pVP                  V P                  4       V! V4      p\        P                  V4      p\        P                  W4      '       g   Q hR# )zR
Test the formatted value correspond to the value for ideal ticks in
logit space.
Fuse_overlineN)r   LogitFormatterr>  decade_testr  r  ru  rw  )r   r   r   sx2s   &&   r   r   TestLogitFormatter.test_basic*  sX     **>	4++,aL11!4##A****r   r@   c                    \         P                  ! RR7      pVP                  V P                  4       V! V4      pVR8X  g   Q hR# )zT
Test that invalid value are formatted with empty string without
raising exception.
Fr%  ry  N)r   r'  r>  r(  )r   r   r   r)  s   &&  r   test_invalidTestLogitFormatter.test_invalid6  s<     **>	4++,aLBwwr   c                   \         P                  ! RR7      pR F  pV^V,          ,           ^8  g   K  VP                  V^V,          ,
          W^V,          ,           .4       V! V4      pV! V^V,          ,           4      p\        P	                  V4      \        P	                  V4      ,
          p^ Tu;8  d   ^V,          8  d   K  Q h Q h	  R# )zC
The format length should change depending on the neighbor labels.
Fr%  N)	rE   r  r	  r/     r   i  i  r  )r   r'  r>  r  r  )r   r   r   Nsxsx1ds   &&     r   test_variablelength&TestLogitFormatter.test_variablelengthA  s    
 **>	@A1q5y1}""AAIqa!e)#<=q\AE	*&88=(::2>?  1}q1u}$}$} Ar   zmethod, lims, casesc                   V'       d)   \         P                  ! RR7      pVP                  ! V!  pM\        P                  ! V4      p\         P
                  ! RR7      pV F  w  rxVP                  V4       VP                  V4      p	V	 U
u. uF  p
\        V
4      ^ 8  g   K  V
NK  	  pp
V'       d   \        V4      ^ 8  g	   Q Wx34       hKl  \        V4      ^ 8X  d   K~  Q Wx34       h	  R# u up
i )z
Test minor/major displays.
Tr   N)	r   r  r   rN   rO   r'  set_minor_thresholdformat_ticksr   )r   methodr  casesmin_locr  min_form	threshold	has_minor	formattedflabelleds   &&&&        r   test_minor_vs_major&TestLogitFormatter.test_minor_vs_majorY  s     **6G''.EHHTNE))5$) I((3 --e4I#,;9aA
9H;8}q(@9*@@(8})AI+AA) %* <s   C*"C*c                P   \         P                  ! RR7      p\         P                  ! RR7      pVP                  RR4      pR FZ  pVP	                  V4       VP                  V4      pV Uu. uF  p\        V4      ^ 8  g   K  VNK  	  pp\        V4      V8X  d   KZ  Q h	  R# u upi )z!
Test the parameter minor_number
Tr   r   Nr   )r>   r   r  r  )r   r  r'  r   set_minor_numberr9  r   )r   r<  r=  r  minor_numberr@  rA  rB  s   &       r   test_minor_number$TestLogitFormatter.test_minor_numbern  s     &&T2))5##D(3)L%%l3 --e4I#,;9aA
9H;x=L000	 * <s   ,B#B#c                    RpRpRp\         P                  ! RR7      pV! V4      V8X  g   Q hVP                  R4       V! V4      V8X  g   Q hVP                  R4       V! V4      V8X  g   Q hR# )z!
Test the parameter use_overline
z$\mathdefault{1-10^{-2}}$z"$\mathdefault{\overline{10^{-2}}}$Fr%  TNr  )r   r'  r&  )r   r   fx1fx2forms   &    r   test_use_overline$TestLogitFormatter.test_use_overline{  so     *3%%59Aw#~~$Aw#~~% Aw#~~r   c                    \         P                  ! 4       pRV! R4      9   g   Q hVP                  R4       RV! R4      9   g   Q hVP                  R4       RV! R4      9   g   Q hR# )z
Test the parameter one_half
z\frac{1}{2}z1/2zone halfNr@   )r   r'  set_one_half)r   rM  s   & r   test_one_half TestLogitFormatter.test_one_half  sd     %%'c***% S	!!!*%T#Y&&&r   r1  c                P   \         P                  ! ^ ^V4      ^R p\        P                  ! 4       pV Fo  pVP	                  V4      pVP                  R4      '       d   ^\        VR,          4      ,
          pM\        V4      p\        WF,
          4      ^V,          8  d   Ko  Q h	  R# )r   z1-:r>   NNNr<   )rN   ry   r   r'  r  
startswithr  abs)r   r1  r  rM  r   r!  r*  s   &&     r   test_format_data_short)TestLogitFormatter.test_format_data_short  s    {{1a#Ab)%%'A''*B}}T""r"v&2Yqv;Q&&& r   r)   ))zSTUFF0.41OTHERSTUFFg=
ףp=?)zSTUFF1.41\cdot10^{-2}OTHERSTUFFg!u?)zSTUFF1-0.41OTHERSTUFFgzG?)z!STUFF1-1.41\cdot10^{-2}OTHERSTUFFgx$(~?)STUFFN)zSTUFF12.4e-3OTHERSTUFFN)r<   r   r;   r   rC   r>   r   ))Tr  )r  F)K   F)Tr  )rZ  r[  T)Tr  )r  Tr\  )F)rA   gRQ?gp=
ף?))r  Tr]  r\  )r/     i  )rJ   rK   rL   rM   r~  r  r*   rS   rT   r"  r  r  r(  r   r-  rN   expry   r5  lims_minor_majorrC  rH  rN  rR  rW  rY   rZ   )ir\   s   0@r   r  r    s    < <@ [[	

.
. "1b\*\\*#(B<
0<a1rqbz>><
0	1'	K [[S+.	+ /	+ [[S"?@ A [[S!q2662;;r1b3I2I+J'J"KL% M%  [[24DEB FB(1	' [[S/2	' 3	'a 	+
0s   F #F
r  c                   &   a  ] tR tRt o R tRtV tR# )TestFormatStrFormatteri  c                P    \         P                  ! R 4      pRV! ^4      8X  g   Q hR# )z%05d00002N)r   FormatStrFormatterr2  s   & r   r   !TestFormatStrFormatter.test_basic  s$    --f5(1+%%%r   r)   N)rJ   rK   rL   rM   r   rY   rZ   r[   s   @r   rc  rc    s     & &r   rc  c                   l   a  ] tR tRt o . ROt]P                  P                  R]4      R 4       tRt	V t
R# )TestStrMethodFormatteri  z&format, input, unicode_minus, expectedc                    \         P                  ! R V/4      ;_uu_ 4        \        P                  ! V4      pV! V!  V8X  g   Q h RRR4       R#   + '       g   i     R# ; i)r  N)r   r   r   StrMethodFormatter)r   formatinputr  r   rV  s   &&&&& r   r   !TestStrMethodFormatter.test_basic  sI    ^^1=ABB,,V4C;(*** CBBBs   $AA!	r)   N)){x:05d}r>   Fre  )ro  rp  Tre  )ro  r  Fz-0002)ro  rq  Tu   −0002){x:03d}-{pos:02d}r>   r=   F002-01)rr  rs  Trt  )rr  r  r=   Fz-02-01)rr  ru  Tu   −02-01)rJ   rK   rL   rM   r  r*   rS   rT   r   rY   rZ   r[   s   @r   ri  ri    s3     	I [[EyQ+ R+r   ri  c                   l   a  ] tR tRt o . ROt]P                  P                  R]4      R 4       tRt	V t
R# )TestEngFormatteri  zunicode_minus, input, expectedc           	       aa	a
 V\         P                  R&   Ro	RoTp\        P                  ! 4       \        P                  ! ^ R7      \        P                  ! ^R7      3p\	        WT4       F  w  rgV! V4      V8X  d   K  Q h	  VV	3R lV 4       p\        P                  ! S	R7      \        P                  ! S	^ R7      \        P                  ! S	^R7      3p\	        WT4       F  w  rgV! V4      V8X  d   K  Q h	  R F  o
VV	V
3R lV 4       p\        P                  ! S	S
R	7      \        P                  ! S	^ S
R
7      \        P                  ! S	^S
R
7      3p\	        WT4       F  w  rgV! V4      V8X  d   K  Q h	  V
3R lV 4       p\        P                  ! S
R7      \        P                  ! ^ S
R7      \        P                  ! ^S
R7      3p\	        WT4       F  w  rgV! V4      V8X  d   K  Q h	  K  	  R# )a  
Test the formatting of EngFormatter for various values of the 'places'
argument, in several cases:

0. without a unit symbol but with a (default) space separator;
1. with both a unit symbol and a (default) space separator;
2. with both a unit symbol and some non default separators;
3. without a unit symbol but with some non default separators.

Note that cases 2. and 3. are looped over several separator strings.
r  r)  
0123456789)placesc              3   r   <"   T F,  pVR,          S9   d   VR,           S,           MVS,           x  K.  	  R# 5ir=    Nr<   r)   ).0_sDIGITSUNITs   & r   	<genexpr>/TestEngFormatter.test_params.<locals>.<genexpr>  s7      :08" +-R&F*:rCx$I&08s   47)unit)r  rz  c              3      <"   T F<  pVR,          S9   d   VS,           S,           MVP                  RS4      S,           x  K>  	  R# 5ir|  r  )r~  r  r  r  _seps   & r   r  r    sD      /%-r 02"v/?29t+ "

3 5 <=%-s   AA)r  r@  )r  rz  r@  c              3   F   <"   T F  qP                  R S4      x  K  	  R# 5i)r}  Nr  )r~  r  r  s   & r   r  r  "  s     D8R::c4008s   !)r@  )rz  r@  N)ry  u    z@_@)r   rW  r   EngFormatterr  )r   r  rm  r   exp_outputs
formatters
_formatter_exp_outputr  r  r  s   &&&&    @@@r   test_paramsTestEngFormatter.test_params  s    .;)*   "  *  *


 (+:'C#Je$333 (D:08:   d+  d15  d15


 (+:'C#Je$333 (D
 =D/%-/K $$$D9$$$qdC$$$qdCJ
 ,/z+G'
!%(K777 ,H E8DK$$.$$A48$$A48J
 ,/z+G'
!%(K777 ,H1 =r   r)   N))FEJ)z
-1.23457 k-1 kz-1.23 k)Tr  )u   −1.23457 k   −1 ku	   −1.23 k)FރB)z-1.23457r  z-1.23)Tr  )u
   −1.23457r  u   −1.23)F_c97ݚ)z
-123.457 mz-123 mz	-123.46 m)Tr  )u   −123.457 mu   −123 mu   −123.46 m)FQ^-':T)z
-1.23457 mz-1 mz-1.23 m)Tr  )u   −1.23457 mu   −1 mu	   −1.23 m)Tg       r  r  z0.00Tr   r  r  )Tgm>)u
   1.23457 µu   1 µu   1.23 µ)Tg_c97ݚ?)z	123.457 mz123 mz123.46 m)Tr   )100 mr  z100.00 m)Tr=   )r  r  z1.00)TgރB?)z1.23457r  z1.23)Tg33333?@)z999.91 kz999.90)Tg*:?@r  r  1.00 k)F*:?)r  r  z-1.00 k)Tr  )r  r  u	   −1.00 k)Tr   r  )Ti  )z1.001 kr  r  )Ti )z	100.001 kz100 kz100.00 k)TgZ$.A)z	987.654 kz988 kz987.65 k)TgCY,dRF)1230 Qr  z	1230.00 Q)rJ   rK   rL   rM   raw_format_datar*   rS   rT   r  rY   rZ   r[   s   @r   rw  rw    s6     #OJ [[=OD8 PD8r   rw  c                     \         P                  ! 4       w  rVP                  . RO. RO4       VP                  . RO4       \        P
                  ! RR7      \        P
                  ! RR7      3 Fo  pVP                  P                  V4       V P                  P                  4        VP                  4        Uu. uF  q3P                  4       NK  	  ppV. RO8X  d   Ko  Q h	  R# u upi )r   T)usetex)useMathTextN)r   r
  r   )z$0$z$500$z$1$ k)r   r   ro  r   r   r  r   rF  re  rf  get_xticklabelsget_text)r   r   r   lablx_tick_label_texts        r   $test_engformatter_usetex_useMathTextr  ,  s    llnGCGGNN+MM.!**$7**t<>	
$$Y/

9;9K9K9MN9M]]_9MN !$====> Os   9C$z9data_offset, noise, oom_center_desired, oom_noise_desiredc                    R p\         P                  ! 4       w  rVV \        P                  ! R^\        R7      V,          ,           pVP                  V4       \        P                  ! RVR7      pRVP                  ^ &   VP                  P                  V4       VP                  P                  4        VP                  4       p	VP                  4        U
u. uF  qP                  4       NK  	  pp
VP                   '       dm   V	^,          pVP                  V,          pV	R	\#        V4      ,
          ,          pVP                  V,          pW8X  g   Q hW8X  g   Q hV F  pVV9  d   K  Q h	  R# V^ 8X  g   Q hV	R8X  g   Q hV FF  pV^ ,          R8X  d   ^ MTpVP%                  VP                  V,          V,           4      '       d   KF  Q h	  R# u up
i )
eVr  T)	useOffsetr  _ry  r  Nr:   r<   )r   r   rN   rP   r  ro  r   r  ENG_PREFIXESr   rF  re  rf  
get_offsetget_yticklabelsr  r   r   endswith)data_offsetnoiseoom_center_desiredoom_noise_desiredr  r   r   ydatar   
offset_gotr  	ticks_gotprefix_noise_gotprefix_noise_desiredprefix_center_gotprefix_center_desiredtick
prefix_idxs   &&&&              r   test_engformatter_offset_oomr  :  s   < DllnGC"))B7==EGGEN$$t$?I #I1HH  +JJOO%%'J-/-?-?-AB-AT-AIB %a=(556GH&r#d)|4 ) 6 67I J#777$999Dt###  "Q&&&RD #1gn2CJ==!7!7
!Cd!JKKKK	 ) Cs   Gc                      a  ] tR tRt o . R	Ot. R
Ot. ROt]P                  P                  R]]R7      R 4       t
]P                  P                  R]4      R 4       tRtV tR# )TestPercentFormatteri}  Nz2xmax, decimals, symbol, x, display_range, expected)idsc                    \         P                  ! WV4      p\        P                  ! R R/R7      ;_uu_ 4        VP	                  WE4      V8X  g   Q h RRR4       R#   + '       g   i     R# ; i)r  FrcNr   PercentFormatterr   r   
format_pct)r   xmaxdecimalssymbolr   display_ranger   r   s   &&&&&&& r   r   TestPercentFormatter.test_basic  sR    
 ,,TVD	^^u566''9XEEE 7666s   AA.	zis_latex, usetex, expectedc                    \         P                  ! R VR7      p\        P                  ! RV/R7      ;_uu_ 4        VP	                  ^2^d4      V8X  g   Q h RRR4       R#   + '       g   i     R# ; i)z\{t}%)r  is_latexr  r  Nr  )r   r  r  r   rV  s   &&&& r   
test_latexTestPercentFormatter.test_latex  sP    &&hJ^^v677>>"c*h666 8777s   AA0	r)   ))r/  r   %r  r/  z120%)r/  r   r  r/  Z   z100%)r/  r   r  r  r	  z90%)r/  r   r  r   r  z-2%)r/  r=   r  g     V@r/  z90.0%)r/  r=   r  gfffffT@r  z80.1%)r/  r=   r  gQQ@r	  z70.2%)r/  r=   r  gxFNr  z-60.6%)r/  Nr  _   r=   z95.00%)rB   Nr  r`   rD   z300%)      1@Nr  r=   g      !@z6%)r  Nr  r=   g @z5.9%)r   Nr  r  gư>z-2000.00000%)rB   r>   Nr   r/  z120.00)r[  r`   ry  r	  r/  z66.667)r  Nz
^^Foobar$$   r  z50.0^^Foobar$$)zdecimals=0, x>100%zdecimals=0, x=100%zdecimals=0, x<100%zdecimals=0, x<0%zdecimals=1, x>100%zdecimals=1, x=100%zdecimals=1, x<100%zdecimals=1, x<0%z$autodecimal, x<100%, display_range=1z7autodecimal, x>100%, display_range=6 (custom xmax test)z;autodecimal, x<100%, display_range=8.5 (autodecimal test 1)z;autodecimal, x<100%, display_range=8.4 (autodecimal test 2)z=autodecimal, x<-100%, display_range=1e-6 (tiny display range)zNone as percent symbolzEmpty percent symbolzCustom percent symbol))FF50\{t}%)FTz50\\\{t\}\%)TFr  )TTr  )rJ   rK   rL   rM   percent_datapercent_ids
latex_datar*   rS   rT   r   r  rY   rZ   r[   s   @r   r  r  }  ss     L.K,J [[@k  +F+F [[9:F7 G7r   r  c                      \         P                  ! \         P                  R 4       \
        P                  ! RRR7      p RpT P                  TR4      pTR8X  g   Q hRpT P                  TR4      pTR	8X  g   Q h\
        P                  ! R
RR7      p RpT P                  TR4      pTR8X  g   Q hR#   \         P                   d    \	        R4        R# i ; i)zde_DE.UTF-8z9SKIP: Locale de_DE.UTF-8 is not supported on this machineNT)r  	useLocalez$\mathdefault{%1.1f}$r@   z$\mathdefault{0{,}5}$z,$\mathdefault{,%1.1f},$z,$\mathdefault{,0{,}5},$Fz%1.1fz0,5)r8  	setlocaleLC_ALLErrorprintr   r%  _format_maybe_minus_and_locale)r  rV  r   s      r   _impl_locale_commar    s    6 ##EE
"C,,S#6A((((
%C,,S#6A++++##FE
C,,S#6A:: << IJs   %B0 0 CCc                      \         P                  P                  \        ^<RR/R7      p \	        R V P
                  P                  4        4       R4      pV'       d   \        P                  ! V4       R# R# )rI   
MPLBACKENDAgg)timeout	extra_envc              3      "   T F:  pVP                  R 4      '       g   K  V\        R 4      R P                  4       x  K<  	  R# 5i)zSKIP:N)rU  r   r  )r~  lines   & r   r  $test_locale_comma.<locals>.<genexpr>  s<      2!90 1T#g,-(..00!9s
   A$Ary  N)	r   r   subprocess_run_helperr  nextstdout
splitlinesr*   r;  )procskip_msgs     r   test_locale_commar    sj     ;;,,-?8De7L - ND 2!%!7!7!92 H H r   c                     \         P                  ! 4       w  r\        P                  ! \        4      ;_uu_ 4        VP
                  P                  \        P                  ! 4       4       R R R 4       R #   + '       g   i     R # ; ir  )	r   r   r*   r+   rU   r   rF  r   r(  r   r   s     r   test_majformatter_typer    H    llnGC	y	!	!
$$W%7%7%9: 
"	!	!	!   /A33B	c                     \         P                  ! 4       w  r\        P                  ! \        4      ;_uu_ 4        VP
                  P                  \        P                  ! 4       4       R R R 4       R #   + '       g   i     R # ; ir  )	r   r   r*   r+   rU   r   r  r   r(  r  s     r   test_minformatter_typer    r  r  c                     \         P                  ! 4       w  r\        P                  ! \        4      ;_uu_ 4        VP
                  P                  \        P                  ! 4       4       R R R 4       R #   + '       g   i     R # ; ir  )	r   r   r*   r+   rU   r   r  r   r  r  s     r   test_majlocator_typer    H    llnGC	y	!	!
""7#7#7#9: 
"	!	!	!r  c                     \         P                  ! 4       w  r\        P                  ! \        4      ;_uu_ 4        VP
                  P                  \        P                  ! 4       4       R R R 4       R #   + '       g   i     R # ; ir  )	r   r   r*   r+   rU   r   r   r   r  r  s     r   test_minlocator_typer    r  r  c                     a \         P                  ! 4       oV3R  lp V ! RR^4       V ! RR^4       V ! RR^4       V ! RR^4       R# )c                 d  < R V RV/p\         P                  ! VR7      ;_uu_ 4        SP                  ^^V4      pRRR4       \        XP                  P                  4       4      ^ 8  V 8X  g   Q h\        VP                  P                  4       4      ^ 8  V8X  g   Q hR#   + '       g   i     Ll; i)zxtick.minor.visiblezytick.minor.visibler  N)r   r   add_subplotr   r   get_minor_ticksr   )xminoryminorra  r  r   r   s   &&&  r   minorticksubplot,test_minorticks_rc.<locals>.minorticksubplot  s    #V#V-^^r""Aq)B # BHH,,./!3>>>BHH,,./!3>>>	 #"s   BB/	FTN)r   figure)r  r   s    @r   test_minorticks_rcr    sE    
**,C? UE1%T5!$UD!$T4#r   c                    a \         P                  ! 4       oV3R lp . ROpV F?  pV ! RRV^4       V ! RRV^4       V ! RRV^4       V ! RRV^4       SP                  4        KA  	  \         P                  ! S4       R# )a\  
Test toggling minor ticks

Test `.Axis.minorticks_on()` and `.Axis.minorticks_off()`. Testing is
limited to a subset of built-in scales - `'linear'`, `'log'`, `'asinh'`
and `'logit'`. `symlog` scale does not seem to have a working minor
locator and is omitted. In future, this test should cover all scales in
`matplotlib.scale.get_scale_names()`.
c                   < SP                  ^^V4      pVP                  V4       VP                  V4       V '       g   V'       g   VP                  4        V '       d=   V'       g5   VP                  P                  4        VP                  P                  4        V '       g=   V'       d5   VP                  P                  4        VP                  P                  4        V '       d   V'       d   VP                  4        \        VP                  P                  4       4      ^ 8  V 8X  g   Q h\        VP                  P                  4       4      ^ 8  V8X  g   Q hR# )r>   N)	r  r  r0  minorticks_offr   r   r   r   r  )r  r   scalera  r   r   s   &&&& r   minortickstoggle0test_minorticks_toggle.<locals>.minortickstoggle  s    __Q1%
e
ef&HH""$HH##%&HH##%HH""$fBHH,,./!3>>>BHH,,./!3>>>r   FTN)linearr.  asinhlogit)r   r  clearclose)r	  scalesr  r   s      @r   test_minorticks_toggler    st     **,C?$ 1Fua0ueQ/eQ/tUA.		  IIcNr   z%remove_overlapping_locs, expected_numc                 T   \         P                  ! R RRR7      p\         P                  ! \        V4      4      p\        P
                  ! 4       w  rEVP                  W#4       VP                  P                  \        P                  P                  4       4       VP                  P                  \        P                  P                  R4      4       VP                  P                  \        P                  P                  R4      4       VP                  P!                  \        P                  P                  R4      4       VP                  P#                  ^4       V e   WP                  n        VP                  P$                  pWeP                  P'                  4       8X  g   Q h\        P(                  ! VP                  VR7       VP                  P$                  pWuP                  P$                  8X  g   Q h\        VP                  P+                  4       4      V8X  g   Q h\        VP                  P#                  4       4      V8X  g   Q h\        VP                  P-                  4       4      V8X  g   Q h\        VP                  P/                  4       4      V^,          8X  g   Q hR# )	z
2018-11-03z
2018-11-06
datetime64r  z
%az%H:%MN)remove_overlapping_locs)r   rD   r     )rN   rP   onesr   r   r   ro  r   r  r   dates
DayLocatorrF  DateFormatterr   HourLocatorr  r  r  get_remove_overlapping_locssetpr   get_minorticklabelsget_minorticklines)r  expected_numtr   r   r   currentnews   &&      r   test_remove_overlapr#  9  s   
 			,LAA
AAllnGCGGAMHHsyy3356HH  !8!8!@AHHsyy44^DEHH  !8!8!ABHHR *+B( hh..Gxx;;==>=HHRXXw7
((
*
*C8833343 rxx))+,<<<rxx'')*l:::rxx++-.,>>>rxx**,-a???r   subhiaardvarkc                     \         P                  ! 4       p\        P                  ! \        4      ;_uu_ 4        VP                  V R 7       RRR4       R#   + '       g   i     R# ; i)r6  N)r   r(  r*   r+   rX   rq   )r$  rS  s   & r   test_bad_locator_subsr(  ^  s>     
			B	z	"	"
3 
#	"	"	"s   AA&	rb   r  c           	      0   \         P                  ! 4       pVP                  V R 7       R Fh  pVP                  RV4      p\        P
                  ! \        P                  ! VP                  ^^4      4      4      ^8H  P                  4       '       d   Kh  Q h	  R# )ra   r@   N)r   r  r     rF   r	  r/  r   )r   r(  rq   r   rN   diffr  r2   )rb   rS  topr  s   &   r   test_small_range_loglocatorr-  g  sq     
			BMM8M$/r3'3!789Q>CCEEEE 0r   c                      \         P                  ! 4       p V ! R 4      R8X  g   Q hV P                  R 4      R8X  g   Q hV P                  R 4      R8X  g   Q hR# )rB   ry  N)r   NullFormatterrP  r  r   s    r   test_NullFormatterr1  q  sT    %%'IS>R  %+++&&s+r111r   r   c                     R V  2# )zval: r)   )r  s   &r   <lambda>r3  y  s
    eA3Kr   c                     V P                  4       R 8X  g   Q hV P                  R4       V P                  4       R8X  g   Q hR# )ry  r   N)r  set_offset_stringr0  s   &r   test_set_offset_stringr6  x  s@     !R'''&!U***r   c                 d   \         P                  ! 4       w  rVP                  \        P                  ! ^
4      ^ .R7       VP                  \        P                  ! ^
4      ^ .R7       VP                  \        P                  ! ^
4      ^.R7       VP                  RR7       VP                  RR7       VP                  4        V P                  4        VP                  4       '       g   Q h\        VP                  P                  4       \        P                  P                  4      '       g   Q hR# )z
Turning on minor gridlines in a multi-Axes Figure
that contains more than one boxplot and shares the x-axis
should not raise an exception.
)r  r   )whichr   N)r   r   boxplotrN   rP   r   r   draw_without_renderingget_xgridlines
isinstancer   get_minor_locatorr   tickerr   r  s     r   test_minorticks_on_multi_figr?    s     llnGCJJryy}J,JJryy}J,JJryy}J,GG'GGG'G bhh002CJJ4O4OPPPPr   ))g  @ROBrE   r  r   )g  BBi r  rD   )/$&;@r  r   r  )g5@r  r`   r  )g    Ar	   r`   r  )p=
p@r	   r   r  )g   uHBr/  r  r`   )r@  gHz>r   i)rA  r
   r   r  )r@  r
   r   r  )g    @@r  r   r`   )r@  r  r   r`   )r@  r   r   r`   )r@  r/  r   r   )r@  rE   r   r   ))TrD   )NrD   )Fr  )r>   r>   )r=   r>   r`   r  )r%   bar)D
contextlibr   r  r8  rm  rV   packaging.versionr   rc  numpyrN   numpy.testingr   r   r*   
matplotlibr   matplotlib.pyplotpyplotr   matplotlib.tickerr>  r   r   r^   r}   r   r  rm  ru  r  r  r  r  r  r  r  r  r  r  r  rc  ri  rw  r  rS   rT   r  r  r  r  r  r  r  r  r  r  r#  zerosr(  r  r  r-  r1  FuncFormatterFixedFormatterr6  r?  r)   r   r   <module>rN     s   "    	 4  A    #,, ,,^F F<8! 8!vmH mH`L7 L7^ $ $"O! O!d	  	 
! 
!)8 )8Xb7 b7JL L^!( !(H/ /&0 08Z Zzo' o'd& &+ +&n8 n8b> ? B0(L10(LVB7 B7J* ;;;;$$%P @&'@	'@B 	:HHV!    \29F  3F2 /0>*', -+-+Qr   