
    h'                     N   S SK Jr  S SKrS SKrS SKrS SKrS SKrS SKrS SK	r	S SK
rS SK
Jr  S SKJrJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJ r J!r!  S	 r"S
 r#\RH                  RK                  S5      \" S/S9S 5       5       r&S r'\RH                  RK                  S5      \" S/S9S 5       5       r(S r)S r*S r+S r,S r- " S S5      r.S r/S r0S r1S r2\	Rf                  Ri                  S\Rj                  Rm                  5       5      S 5       r7S r8S r9S  r:S! r;S" r<S# r=S$ r>\	Rf                  R                  S%\R                  ;   =(       d    S&\R                  ;   =(       a(    \R                  S':H  =(       a    \R                  SS( S):  S*S+9S, 5       rCg)-    )BytesION)cm)subprocess_run_helperis_ci_environment)check_figures_equal)rrulewrapper)VertexSelector)axes_dividerparasite_axesc                  ^   [         R                  " 5       n [        R                  " U [	        5       [        R
                  5        [         R                  " S5      n[        R                  " U[	        5       [        R
                  5        [         R                  " SS9n[         R                  " [        R                  " S5      SS9  [         R                  " 5         [        R                  " U[	        5       [        R
                  5        [         R                  " 5         [         R                  " [        R                  " S5      [        R                  " S5      S9  [        R                  " [         R                  " 5       [	        5       [        R
                  5        [         R                  " 5       n [         R                  " 5       n[         R                  " [        R                  " S5      5        UR                  S5        [        R                  " U [	        5       [        R
                  5        g )	Ny   polar)
projection
   foobarlabel)xheightlog)pltfigurepickledumpr   HIGHEST_PROTOCOLsubplotaxesplotnparangelegendbargca
set_yscalefigaxs     N/var/www/html/env/lib/python3.13/site-packages/matplotlib/tests/test_pickle.pytest_simpler)      s%   
**,C
KKWY 7 78	S	B
KKGIv667	W	%BHHRYYr](+JJL
KKGIv667
 JJLGGbiimBIIbM2
KK	79f&=&=>
**,C	BHHRYYr]MM%
KKWY 7 78    c                    U R                  S5        [        R                  " U 5        [        R                  " S5        [        R
                  " S5      [        R
                  " S5      p![        R                  " SSS5      R                  SS5      =n=pE[        R                  " US-  5      n[        R                  " SSS	5        [        R                  " [        [        S5      5      5        [        R                  " S
5        [        R                  " SSS5        [        R                  " USS/S9  [        R                  " 5         [        R                  " SSS5        [        R                   " U5        [        R                  " SSS5        [        R"                  " U5        [        R                  " S5        [        R                  " SSS5        [        R$                  " U5        [        R                  " SSS5      nUR'                  SS5        UR)                  SS5        [        R*                  " XXE5        [        R                  " SSS5      nUR'                  SS5        UR)                  SS5        [        R,                  " XXE5        [        R                  " SSS5        [        R.                  " XS-  SS9  [        R0                  " SS9  [        R                  " SSS5        [        R2                  " XS-  SSSS9  [        R0                  " SS9  U R5                  S5      nUS   R7                  S	S5        US	   R7                  S	S5        U R9                  5         g ) N)r      z!Can you fit any more in a figure?   r   r   P   g333333      hello   z//ooo)hatches   zhello
world!   r,      	   z$x^2$r   z
upper left)locg      g?g?z$-.5 x$)xerryerrr   T)	draggable)set_size_inchesr   r   suptitler   r    linspacereshapesinr   r   listrangeylabelcontourfcolorbar
pcolormeshimshowpcolorset_xlimset_ylim
streamplotquiverscatterr!   errorbar
subfiguressubplotsalign_ylabels)fig_refr   ydatauvr'   subfigss           r(   _generate_complete_test_figurerY   2   sV   G$JJwLL45 99Q<2q;;q"b)11"a88D81
q4xA KK1aHHT%)_JJwKK1aLLe}-LLNKK1aNN4KK1aJJtJJKK1aJJt	Q1	BKK1KK1NN1	Q1	BKK1KK1JJqQKK1aKK6)JJ< KK1aLLH3S	BJJ   #GAJ1AJ1r*   defaultpng)
extensionsc           	         [        U5        [        R                  " U[        R                  5      nS[        R
                  " U5       VVVs/ s H  u  p4oTPM	     snnn;  d   e[        R                  " U5      nUR                  R                  5         U R                  UR                  5       5        U R                  UR                  R                  R                  5       5        [        R                  " U5        g s  snnnf )NFigureCanvasAgg)rY   r   dumpsr   pickletoolsgenopsloadscanvasdrawr=   get_size_inchesfigimagerendererbuffer_rgbar   close)fig_testrS   pklopargposloadeds          r(   test_completerp   j   s     #7+
,,w 7 7
8C
 [=O=OPS=T$U=T\RcS=T$UUUU\\#F
MMV3356fmm,,88:;IIf %Vs   C=
c                      SS K n SS KnU R                  S   n[        US5       nUR                  " U5      nS S S 5        [        [        UR                  " W5      5      5        g ! , (       d  f       N3= f)Nr   PICKLE_FILE_PATHrb)osr   environopenloadprintstrr_   )rt   r   pathblobr&   s        r(   _pickle_load_subprocessr|   ~   sW    ::()D	dD	Tkk$ 
 
#fll3
 ! 
	s   A$$
A2c                    [        U5        US-  nUR                  5       (       a   eUR                  S5       n[        R                  " X[        R
                  5        S S S 5        UR                  5       (       d   e[        [        S[        U5      S[        R                  S.S9n[        R                  " [        R                  " UR                  5      5      nUR                  R!                  5         U R#                  UR%                  5       5        U R'                  UR                  R(                  R+                  5       5        [,        R.                  " U5        g ! , (       d  f       GN= f)Nzsinus.picklewb<   Agg)rr   
MPLBACKEND-SETUPTOOLS_SCM_PRETEND_VERSION_FOR_MATPLOTLIBtimeout	extra_env)rY   existsrv   r   r   r   r   r|   ry   mpl__version__rb   astliteral_evalstdoutrc   rd   r=   re   rf   rg   rh   r   ri   )rj   rS   tmp_pathfpfileproc
loaded_figs          r(    test_pickle_load_from_subprocessr      s    #7+	N	"Byy{{?	$G6#:#:; 
99;;;  #B
 >A__
D c..t{{;<JZ779:j''00<<>?IIj3 
s   &E
E.c                     [         R                  " S5      n [        5       n[        R                  " X[        R
                  5        [         R                  " S5        [         R                  R                  R                  0 :X  d   e[        R                  " UR                  5       5      n [         R                  R                  R                  0 :w  d   eU R                  5       S:X  d   eg )Nza labelall)r   r   r   r   r   r   ri   _pylab_helpersGcffigsrb   	getbuffer	get_label)r&   bufs     r(   test_gcfr      s    
**Y
C
)C
KK&112IIe!!&&",,,
,,s}}
'C!!&&",,,==?i'''r*   c                      SSK Jn   [        R                  " 5       nU " U5      nUR	                  SSS5      nUR                  / SQ/ SQ5        [        R                  " U[        5       [        R                  5        g )Nr   )FigureCanvasPdfr0   )r0   r2   r/   )
matplotlib.backends.backend_pdfr   mfigureFigureadd_subplotr   r   r   r   r   )r   r&   _r'   s       r(   test_no_pyplotr      sS    ?
..
CA	Aq	!BGGIy!
KKWY 7 78r*   c                  b    SSK Jn   U " SSS5      n[        R                  " U[	        5       5        g )Nr   )RendererAggr         )matplotlib.backends.backend_aggr   r   r   r   )r   rg   s     r(   test_rendererr      s#    ;2r2&H
KK')$r*   c                  N   SSK Jn   U " S5      nUR                  R                  nUR	                  SSS5      nUR                  [        R                  " S5      R                  SS5      5        UR                  R                  5         [        R                  " U[        5       5        g )Nr   )new_figure_manageri  r0      r/   r5   )r   r   rc   r   r   rH   r   r    r@   rd   r   r   r   )r   managerr&   r'   s       r(   
test_imager      st     C &G
..

C	Aq	!BIIbiim##Aq)*NN
KKWYr*   c                      [         R                  " SS9  [         R                  " 5       n [        R                  " U 5      n[        R
                  " U5        [         R                  " 5         g )NT)r   )r   r   gcfr   r_   rb   rd   )r&   pfs     r(   
test_polarr      s<    KKd
'')C	c	B
LLHHJr*   c                       \ rS rSrS rSrg)TransformBlob   c                 v   [         R                  " 5       U l        [         R                  " 5       U l        [         R                  " U R                  U R                  5      U l        [         R                  " U R
                  5      U l        [         R                  " U R                  U R                  5      U l        g N)	mtransformsIdentityTransformidentity	identity2CompositeGenericTransform	compositeTransformWrapperwrapper
composite2)selfs    r(   __init__TransformBlob.__init__   sz    #557$668$>>MMNN #33DNNC%??LLMMr*   )r   r   r   r   r   N)__name__
__module____qualname____firstlineno__r   __static_attributes__ r*   r(   r   r      s    r*   r   c                     [        5       n [        R                  " U 5      nA [        R                  " U5      n U R                  R
                  U R                  :X  d   eU R                  R                  R                  5        Vs/ s H	  o"" 5       PM     snU R                  /:X  d   eU R                  R                  U R                  R                  :X  d   eU R                  R                  U R                  R                  :X  d   eg s  snf r   )r   r   r_   rb   r   _childr   _parentsvaluesr   
input_dimsoutput_dims)objr   rW   s      r(   test_transformr      s    
/C	c	B
,,r
C;;...--44676AAC67CNN;KKKK;;!!S]]%=%====;;""cmm&?&???? 8s   D	c                      [        S5      n  [        R                  " [        R                  " U 5      5        g ! [         a    [        S5        e f = f)Nr2   z!rrulewrapper pickling test failed)r   r   rb   r_   RecursionErrorrx   )rs    r(   test_rrulewrapperr      s?    QAV\\!_% 12s	   *8 Ac                  
   [         R                  " SSS9u  p[        R                  " [        R                  " U 5      5      n U R
                  S   R                  SS5        U R
                  S   R                  5       S:X  d   eg )	Nr2   T)sharexr   r   r   r0   )r   r   )r   rQ   r   rb   r_   r   rJ   get_xlim)r&   axss     r(   test_sharedr     sb    ||Ad+HC
,,v||C(
)CHHQKR 88A;!X---r*   c                     [         R                  " 5       u  pUR                  / SQ5        UR                  S[        R
                  [        R                  4S9  [        R                  " [        R                  " U 5      5        g )N)皙?r   333333?r   top)	functions)
r   rQ   
inset_axessecondary_xaxisr   squaresqrtr   rb   r_   r%   s     r(   test_inset_and_secondaryr     sQ    llnGCMM"#uBGG(<=
LLc"#r*   cmapc                 0    [         R                  " U 5        g r   )r   r_   )r   s    r(   	test_cmapr     s    
LLr*   c                      [         R                  " 5       n U R                  c   e[        5       n[        R
                  " X5        UR                  S5        [        R                  " U5      nUR                  c   eg )Nr   )r   r   rc   r   r   r   seekrw   )r&   outfig2s      r(   test_unpickle_canvasr     sZ    
..
C::!!!
)C
KKHHQK;;sD;;"""r*   c                      [         R                  " / SQ5      n [        R                  " U 5        [	        [
        R                  " [
        R                  " U 5      5      5      [         R                  :X  d   eg )N)r   r   r0   r0   )	r   	host_axesr
   make_axes_area_auto_adjustabletyper   rb   r_   HostAxesr'   s    r(   test_mpl_toolkitsr   "  sK    		 	 	.B//3V\\"-./=3I3IIIIr*   c                      [        [        R                  " [        R                  " [        R
                  R                  5       5      5      5      [        R
                  R                  :X  d   eg r   )r   r   rb   r_   r   colorsLogNormr   r*   r(   test_standard_normr   (  sE    V\\#***<*<*>?@A::  r*   c                  2   [         R                  R                  [         R                  R                  [         R                  R
                  5      " 5       n [        [        R                  " [        R                  " U 5      5      5      [        U 5      :X  d   eg r   )
r   r   make_norm_from_scalescale
LogitScale	Normalizer   r   rb   r_   )logit_norm_instances    r(   test_dynamic_normr   -  sh    **99		cjj224 6V\\*=>?@#$% % %r*   c                      [         R                  " SS/SS9u  n [        R                  " [        R                  " [        U 5      5      5        g )Nr   r0   T)picker)r   r   r   rb   r_   r	   )lines    r(   test_vertexselectorr  4  s2    HHaVD)ED
LLnT234r*   c                  <   [         R                  " 5       R                  5       n U R                  / SQS9  U R	                  SS/5        [
        R                  " [
        R                  " U 5      5      n U R	                  SS/5      u  nUR                  5       S:X  d   eg )N)cmrT   k)r  r0   r2   r/   r5   r  )	r   r   r   set_prop_cycler   r   rb   r_   	get_color)r'   ls     r(   test_cyclerr	  9  su    		!	!	#B,-GGQFO	fll2&	'B	!QBA;;=Cr*   c                      [         R                  " 5       R                  5       n [        R                  " [
        R                  R                  U S5      5        g )Nbutton)r   r   r   r   r_   r   widgetsButtonr   s    r(   _test_axeswidget_interactiver  D  s3    		!	!	#B
LL##B12r*   TF_BUILDGITHUB_ACTIONdarwinr2   )r/      z%Tk version mismatch on Azure macOS CI)reasonc                  H    [        [        [        5       (       a  SOSSS0S9  g )Nx   r   r   tkaggr   )r   r  r   r   r*   r(   test_axeswidget_interactiver  I  s$     $(**)r*   )Dior   r   rt   sysr   r`   numpyr   pytest
matplotlibr   r   matplotlib.testingr   r   matplotlib.testing.decoratorsr   matplotlib.datesr   matplotlib.linesr	   matplotlib.pyplotpyplotr   matplotlib.transforms
transformsr   matplotlib.figurer   r   mpl_toolkits.axes_grid1r
   r   r)   rY   stylecontextrp   r|   r   r   r   r   r   r   r   r   r   r   r   markparametrize
_colormapsr   r   r   r   r   r   r  r	  r  xfailru   platformversion_infor  r   r*   r(   <module>r/     s    
 	 
       G = ) +  + # ?965p 9( ) $	" 9( ) D(9%	   @.$ !5!5!78 9#J
%5
 3
 	rzz	!	B_

%B 	D 	D%(%5%5bq%9G%C6  

r*   