+
     ]ic,  c                   s*   ^ RI t ^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RI	H
t
 ^ RIHt ]! RR.RR7      RR	 l4       t].tR
.tR t]P"                  P%                  R]]R7      R 4       t]P"                  P%                  R]]R7      R 4       t]P"                  P%                  R]]R7      R 4       t]P"                  P%                  R]]R7      R 4       t]P"                  P%                  R]]R7      R 4       tR tR tR tR tR t ! R R4      tR# )i    N_preprocess_data)Axes)subprocess_run_for_testing)check_figures_equalxyreplace_nameslabel_namerc           
      H    R \        V4       R\        V4       RV RV RV 2
# zx: z, y: z, ls: z, w: z	, label: Zlistaxr   r   ZlsZlabelw   &&&&&&L/usr/lib64/python3.14/site-packages/matplotlib/tests/test_preprocess_data.py	plot_funcr      s/    a	tAwivbTqc5'JJ    r   c                 s   R p R pR pR p\        RR.R7      ! V 4       \        RR.R7      ! V4       \        RR.R7      ! V4       \        P                  ! \        4      ;_uu_ 4        \        . ROR7      ! V4       R	R	R	4       \        . R	R
7      ! V 4       \        . R	R
7      ! V4       \        . R	R
7      ! V4       \        . R	R
7      ! V4       \        P                  ! \        4      ;_uu_ 4        \        RR7      ! V 4       R	R	R	4       \        P                  ! \        4      ;_uu_ 4        \        RR7      ! V4       R	R	R	4       R	#   + '       g   i     L; i  + '       g   i     Lb; i  + '       g   i     R	# ; i)z.Test decorator invocations -> no replacements.c                     R # N )r   r   r   s   &&&r   funcZ%test_compiletime_checks.<locals>.func   s    r   c                 r   r   r   )r   r   r   argss   &&&*r   	func_argsZ*test_compiletime_checks.<locals>.func_args    s    Dr   c                 r   r   r   )r   r   r   kwargss   &&&,r   func_kwargsZ,test_compiletime_checks.<locals>.func_kwargs!   s    r   c                  r   r   r   )r   r   s   *,r   func_no_ax_argsZ0test_compiletime_checks.<locals>.func_no_ax_args"   s    $r   r   r   r   zNr   r	   )r   r   r   )r   pytestraisesZAssertionError)r   r   r   r   s       r   test_compiletime_checksr"      s    (-. C:.t4C:.{;C:.y9 
~	&	&7	B 
'
 248>248C248E248I 
~	&	&S)$/ 
' 
~	&	&S))4 
'	& 
'	& 
'	& 
'	&	&s$   +E6E#3E6E 	#E3	6F	r   )Zidsc                    R# )z%Test without data -> no replacements.Nr   )r   s   &r   test_function_call_without_datar$   =       r   c                s    R^R^/pR# )z8Tests with dict input, unpacking via preprocess_pipelineabNr   r   data   & r   "test_function_call_with_dict_inputr+   N   s     CDr   c                s    R^^.R^^	.RR/pR# )zCTest with dict data -> label comes from the value of 'x' parameter.r&   r'   r   NOTNr   r(   r*   r   !test_function_call_with_dict_datar-   V   s     !Qq!fc51Dr   c                s    R^^.RR/pR# )zETest the case that one var is not in data -> half replaces, half keptr&   r   r,   Nr   r(   r*   r   -test_function_call_with_dict_data_not_in_datar.   h   s     !Qe$Dr   c           
     s    VP                  R\        P                  ! ^^.\        P                  R7      R\        P                  ! ^^	.\        P                  R7      RRR./4      pR# )zDTest with pandas dataframe -> label comes from ``data["col"].name``.r&   )Zdtyper'   r   r,   N)Z	DataFramenpZarrayZint32)r   Zpdr)   s   && r   #test_function_call_with_pandas_datar0   z   sO     <<bhh1vRXX>bhh1vRXX>uen. /Dr   c                 sF    R^^.R^^	.RR/p \        RR7      R	R l4       pR# )
zETest without a "replace_names" argument, all vars should be replaced.r&   r'   r   xyzr   r   Nc           
      r
   r   r   r   r   r   func_replace_allZ8test_function_call_replace_all.<locals>.func_replace_all   /    T!WIU47)6"U1#YugNNr   )r   Nr,   r    )r)   r2        r   test_function_call_replace_allr5      s5    !Qq!fc51D#&O 'Or   c                 sL    \        RR.RR7      R
R l4       p R^^.R^^	.RR	/pR# )z<Test with "label_namer=None" -> no label replacement at all.r   r   Nr   c           
      r
   r   r   r   r   r   func_no_labelZ1test_no_label_replacements.<locals>.func_no_label   r3   r   r&   r'   r   r,   r   Nr1   r    )r6   r)   r4   r   test_no_label_replacementsr8      s@     S#JDAO BO !Qq!fc51Dr   c                  s    \        R R.RR7      RR l4       p R^^.R^^	.RR/p\        P                  ! \        4      ;_uu_ 4        V ! RRRR	R	VR
7       RRR4       R#   + '       g   i     R# ; i)r   r   r   c                 r   r   r   )r   r   r   r   s   &&&&r   r   Z/test_more_args_than_pos_parameter.<locals>.func   s    r   r&   r'   r   r,   Nr   r)   )   )r   r    r!   Z	TypeErrorr(   r4   r   !test_more_args_than_pos_parameterr;      sl    S#JC@ A !Qq!fc51D	y	!	!T3S#D1 
"	!	!	!s   AA0	c                  s    \        4       R  4       p \        . R7      R	R l4       p \        R.R7      R	R l4       p \        RR.R7      R	R l4       p R# )
c                r#   zX
Parameters
----------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER
Nr   )r   r   r   s   &*,r   funcy&test_docstring_addition.<locals>.funcy   r%   r   r   Nc                r#   r<   r   r   r   r   r   bar   &&&&&r   r=   r>      r%   r   r@   c                r#   r<   r   r?   rA   r   r=   r>      r%   r   r   tc                r#   r<   r   )r   r   r   r   rB   rA   r   r=   r>      r%   r   r   r    )r=   s    r   test_docstring_additionrC      sh      B' ( UG, - S#J/ 0r   c                 sL    Rp \         P                  RV .p\        VRRR7      pR# )zw
Test that the docstring contains the correct *data* parameter stub
for all methods that we run _preprocess_data() on.
zYimport logging; logging.basicConfig(level=logging.DEBUG); import matplotlib.pyplot as pltz-cT)ZtextZcapture_outputN)sysZ
executabler   )ZprogramZcmdZcompleted_procs      r   test_data_parameter_replacementrE      s/    	* 
 >>4
)C/$tNr   c                   s"  a  ] tR tRt o ]P
                  ]P                  ]P                  .t]	P                  P                  R]4      ]! R.R7      R 4       4       t]	P                  P                  R]4      ]! R.R7      R 4       4       tRtV tR# )	TestPlotTypesi	  plotterZpng)Z
extensionsc                s    . ROp. ROp\        \        WE4      4      pV! VP                  4       VP                  4       VP	                  4       4       V! VP                  4       WE4       R# )r:   Nr:   i   i   i   i   i   )ZdictZzipsubplotsZkeysZvalues)selfrG   fig_testfig_refr   r   Zddicts   &&&&   r   test_dict_unpackZTestPlotTypes.test_dict_unpack  sR     SY!!#

elln	.  "A)r   c           	     s    . ROp. ROpV! VP                  4       RRRVRV/R7       V! VP                  4       WE4       R# )r:   ZxvalZyvalr9   NrH   rI   )rJ   )rK   rG   rL   rM   r   r   s   &&&&  r   test_data_kwargZTestPlotTypes.test_data_kwarg  sD     !!#VVa+	-  "A)r   r   N)Z__name__Z
__module__Z__qualname__Z__firstlineno__r   Zscatterr@   ZplotZplottersr    markparametrizer   rN   rO   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   rF   rF   	  s     dhh		2H[[Y1UG,* - 2* [[Y1UG,* - 2*r   rF   r7   )ZrerD   Znumpyr/   r    Z
matplotlibr   Zmatplotlib.axesr   Zmatplotlib.testingr   Zmatplotlib.testing.decoratorsr   r   Z	all_funcsZall_func_idsr"   rP   rQ   r$   r+   r-   r.   r0   r5   r8   r;   rC   rE   rF   r   r   r   <module>rR      sR   	 
   '   9 = c
<K =K K	}5B => >>  =D >D =@ >@" =? >?" =@ >@(<2@$21(hI"* *r   