+
     ]iq  c            	       s   ^ RI H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IHt ^ RIHtHt ^ RIHtHt ^ RIHtHtHt ^ R	IHtHtHtH t H!t!H"t" ^ R
I#H$t$H%t%H&t&H't' ^ RI(H)t)H*t*H+t+H,t,H-t- ^ RI.H/t/ ^ RI0H1t1H2t2H3t3H4t4 ^ RI5t6^ RI7t7^ RI8t9^ RI:H;t;H<t< R t=]! R.R.^RbR7      R 4       t>R t?R t@R tA]! R.RRR7      R 4       tB]! R.RRR7      R 4       tCR tDR tE]! R .RR!R"7      R# 4       tF]! R$R%.Rb]P                  ! 4       R&8X  d   ^ MR'R(7      R) 4       tH]! R*.]P                  ! 4       R&8X  d   ^ MR+RbR,7      R- 4       tI]! R..RbR/7      R0 4       tJR1 tK]! R2.R!R3R4/R57      R6 4       tL]! R7.R!R3R4/R57      R8 4       tMR9 tN]! R:.RR!R3R4/R;7      R< 4       tOR= tP]7P                  P                  R>R?R@.4      ]7P                  P                  RA. RcO4      RB 4       4       tS]! RC.RR!R"7      RD 4       tTRE tURF tVRG tWRH tX]7P                  P                  RIRd4      RJ 4       tY]7P                  P                  RKReR]ZRL3^oRf][RM3^o^][RM334      RN 4       t\]7P                  P                  ROR]ZRP3RQ][RR3Rg]ZRP334      RS 4       t]]! R.RT7      RU 4       t^RV t_]! RW.RRbR"7      RX 4       t`]! RY.RR!RZR[7      R\ 4       taR] tbR^ tc]! R_.R!R/7      R` 4       tdRa teR# )h    )productN)cbook)
MouseEvent)LogNorm)CircleEllipse)BboxTransformedBbox)check_figures_equalimage_comparisonremove_ticks_and_titles)	axes_sizehost_subplotmake_axes_locatableGridAxesGrid	ImageGrid)AnchoredAuxTransformBoxAnchoredDrawingAreaAnchoredDirectionArrowsAnchoredSizeBar)DividerHBoxDividermake_axes_area_auto_adjustableSubplotDividerVBoxDivider)RGBAxes)zoomed_inset_axes
mark_inset
inset_axesBboxConnectorPatch)assert_array_equalassert_array_almost_equalc                  s   \         P                  ! 4       w  r\        V4      pR VRVP                  RRRVR7      RVP                  RRRVR7      RVP                  RRRVR7      RVP                  RRRVR7      /pV P                  P                  4        V Uu/ uF  qDW4,          P                  4       bK  	  ppV P                  pR	# u upi )
Zmaintop333333?皙?)padZsharexbottomleft)r%   ZshareyrightN)pltsubplotsr   append_axescanvasdrawZget_window_extentdpi)figaxdividerZaxsZkZbboxesr.             T/usr/lib64/python3.14/site-packages/mpl_toolkits/axes_grid1/tests/test_axes_grid1.pytest_divider_append_axesr4   $   s    llnGC!"%Gw""5#3r"B'%%hR%H##FCS#D$$Wcs2$FC JJOO589S))++SF9
''C :s   CZtwin_axes_empty_and_removedZpng)
extensionstolstylec            	      s   \         P                  P                  R ^R^R^/4       . ROp . ROp\        \	        V4      ^,           \	        V 4      ^4      pVP                  RRRR	R	R
7       \        \        W4      \	        V 4      ^,           4       F  w  pw  rE\        \	        V4      ^,           \	        V 4      V4      p\        W%4      ! 4       pRV9   d#   VP                  R,          P                  R4       RV9   d   VP                  4        RV9   d#   VP                  R,          P                  R4       TP                  RRYT'       d
   RV,           MR,           R	R	R
7       K  	  \        P                  ! R^R7       R# )z	font.sizezxtick.labelsizezytick.labelsize host invisibletwin removedtwin invisible      ?r   Zcenter)ZhorizontalalignmentZverticalalignment:NNNFZ
)ZwspaceZhspaceN)twinxZtwinytwin)r8   r9   r:   r;   ztwin removed
host invisible)mplZrcParamsZupdater   ZlenZtextZ	enumerater   Zgetattraxisset_visibleremover)   subplots_adjust)Z
generatorsZ	modifiersZhiZmodZgenZtr2   r3    test_twin_axes_empty_and_removedrE   @   sI    LL	a*A/@!DF+J1I 	S^A%s::AFF3^'8  E #79#A#&z?Q#68:CY)3z?A>AOs"FF1I!!%(S HHJs"FF1I!!%(	sCcs
r:#+x 	 	I8 s1-    c            	      s$   \        ^o4      p \        P                  ! \        P                  4      ;_uu_ 4        V P                  . RO. RORRR7       RRR4       V P                  4       pVP                  . RO4       R#   + '       g   i     L5; i)o   FT)ZxdateZydateN)r          )Zabc)r   pytestwarnsr?   ZMatplotlibDeprecationWarningZ	plot_dater=   plot)hostr>        r3   test_twin_axes_both_with_unitsrQ   ]   sZ    D	c66	7	7y)5E 
8::<DIIo 
8	7s   A??B	c            
      s,   \         P                  ! 4       p \        V ^oR	^RRRR7      pR\        P                  P                  ^
^
4      ,          pV^ ,          P                  VR\        4       R7      pVP                  ^ ,          P                  V4       R# )
rG   ZLr"   single)nrows_ncolsngrids
label_modecbar_location	cbar_modei'  nearest)interpolationnormNrH   rH   )
r)   figurer   nprandomZrandimshowr   	cbar_axescolorbar)r/   gridZim       r3   $test_axesgrid_colorbar_log_smoketestrf   g   sv    
**,CC &""'&D 			r2&&A	a	CBNN1r"rF   c                  sb   \         P                  ! ^^4      w  rVP                  ^ ^.^ ^.^^.R7      p\        VRRR7      p\         P                  ! W#R7       \
        P                  ! \        RR7      ;_uu_ 4        \         P                  ! 4        RRR4       R#   + '       g   i     R# ; i)	rH   )rK   z3%z70%widthheight)caxzThis figure includes AxesZmatchN)	r)   r*   Zscatterr   ra   rL   rM   UserWarningZtight_layout)r/   r0   Zptsrj   re   r3   *test_inset_colorbar_tight_layout_smoketestrm   w   s|    ll1a GC
**aVaV1v*
.C
RtE
2CLL	k)D	E	E 
F	E	E	Es   =BB.	zinset_locator.pngZdefaultT)r7   remove_textc                  s   \         P                  ! ^^.R7      w  r\        P                  ! R4      pRp\        P
                  ! R4      pVP                  w  rVW$^^V,           1^^V,           13&   VP                  WCRRR7       \        V^RR7      pVP                  WCRRR7       VP                  P                  4       P                  ^R7       VP                  P                  4       P                  ^R7       Rw  rrVP                  W4       VP                  W4       \         P                  ! R	R
7       \         P                   ! R	R
7       \#        W^^RRR7       \%        VP&                  RRRRR^R	R7      pVP)                  V4       R# )   figsizeaxes_grid/bivariate_normal.npyrX   lowerextentrY   originupper rightZzoomlocZnbinsFZvisiblenone0.5loc1loc2fcecr<   lower centerr$   ry   r%   	borderpadsepframeonNi   i      r   g      gg      gffffff)r)   r*   r   get_sample_datar]   zerosshaper_   r   yaxisget_major_locator
set_paramsxaxisset_xlimset_ylimxticksyticksr   r   	transData
add_artistr/   r0   rc   ru   ZZ2ZnyZnxaxinsZx1Zx2Zy1Zy2asb                r3   test_inset_locatorr      s\   llAq6*GC 	>?AF	*	BWWFBr"R%xBrEIIby   bqm<E	LL)  !	KK!!#..Q.7	KK!!#..Q.7+NBB	NN2	NN2JJuJJu rqqV>
",,,!Sa"')C MM#rF   zinset_axes.pngc                  s6   \         P                  ! ^^.R7      w  r\        P                  ! R4      pRp\        P
                  ! R4      pVP                  w  rVW$^^V,           1^^V,           13&   VP                  WCRRR7       \        VRRRVP                  R7      pVP                  WCRRR7       VP                  P                  4       P                  ^R7       VP                  P                  4       P                  ^R7       Rw  rrVP                  W4       VP                  W4       \         P                   ! R	R
7       \         P"                  ! R	R
7       \%        W^^RRR7       \'        VP(                  RRRRR^R	R7      pVP+                  V4       R# )ro   rp   rr   rX   rs   rt         ?)rh   ri   bbox_to_anchorbbox_transformrz   Fr{   r|   r}   r~   r<   r   r$   r   Nr   r   r[   r   )r)   r*   r   r   r]   r   r   r_   r   	transAxesr   r   r   r   r   r   r   r   r   r   r   r   r   r   r3   test_inset_axesr      si   llAq6*GC 	>?AF	*	BWWFBr"R%xBrEIIby   rBv&(ll4E 
LL)  !	KK!!#..Q.7	KK!!#..Q.7+NBB	NN2	NN2JJuJJu rqqV>
",,,!Sa"')C MM#rF   c            
      s   ^dp Rp\         P                  ! WR7      w  r#VP                  RRRR4       \        VRR^ R7      pVP                  P                  4        \        VP                  4       P                  RV^ ,          ,          R,
          V^ ,          ,          RV^,          ,          R,
          V^,          ,          RR.4       \        VRR^ R7      pVP                  P                  4        \        VP                  4       P                  . RO4       \        VRR	R^^ R
7      pVP                  P                  4        \        VP                  4       P                  ^V ,          V^ ,          ,          ^dV ,          V^,          ,          ^V ,          ^,           V^ ,          ,          ^dV ,          R	,           V^,          ,          .4       \        VRR^^R7      p\        VRRRVP                  ^^R7      pVP                  P                  4        \        VP                  4       P                  VP                  4       P                  4       \        P                  ! \        4      ;_uu_ 4        \        VRRRR7      pRRR4       \        P                  ! \        4      ;_uu_ 4        \        VRRVP                  R7      pRRR4       R#   + '       g   i     LV; i  + '       g   i     R# ; i)d   )rq   r.   r$   ?g       @)rh   ri   r   z40%z30%r   r#   )rh   ri   r   ry   r   z35%z60%)rh   ri   ry   r   z100%)rh   ri   r   r   ry   r   )rh   ri   r   N)rh   ri   r   )   ro   )g(\?gQ?r   r   )i   r   )r    r    gffffff?333333?)皙?r<   )r)   r*   rC   r   r,   r-   r!   get_positionextentsr   r    rL   raises
ValueErrorrM   rl   )r.   rq   r/   r0   ZinsZins1Zins2r2   r3   test_inset_axes_completer      sI   
CGll74GCBB'
Rr"
:CJJOO""
gaj.
WQZ	'#gaj.*;WQZ)G	c	
 RuUa
@CJJOO""$BD Rr#ja)CJJOO""	S	SWWQZ/
c'!)WQZ	#c'#+wqz!9	;<
 beaHDbv%5%'\\qAGD JJOOt((*22((*224 
z	"	"5(24 
# 
k	"	"5(*6 
#	"	 
#	" 
#	"	"s   1K+K"K	"K3	c                  s    \         P                  ! 4       w  r\        VR RR7       \        P                  ! 4       pV P                  VRR7       R# )g?r   rg   tight)bbox_inchesN)r)   r*   r   ioZBytesIOZsavefig)r/   r0   Zf      r3   test_inset_axes_tightr     s6    llnGCrS)


AKKwK'rF   zfill_facecolor.pngZmpl20)rn   r7   c                  sh
   \         P                  ! ^^4      w  rV P                  ^^4       \        ^^4       F$  pW,          P                  P                  R4       K&  	  V^,          P                  P                  4        \        P                  ! ^ R^R4      p\        W1^ ,          P                  4      p\        W1^,          P                  4      p\        WE^^^^RRR7      pVP                  R4       V^ ,          P                  V4       \        V^ ,          ^RR7      pVP                  ^ R	4       VP!                  ^ R	4       \         P"                  ! 4       P$                  P&                  P)                  . 4       \         P"                  ! 4       P$                  P                  P)                  . 4       \+        V^ ,          V^^RR
R7       \        W1^,          P                  4      p\        W1^,          P                  4      p	\        W^^^^RRR7      pVP                  R4       V^,          P                  V4       \        V^,          ^RR7      pVP                  ^ R	4       VP!                  ^ R	4       \         P"                  ! 4       P$                  P&                  P)                  . 4       \         P"                  ! 4       P$                  P                  P)                  . 4       \+        V^,          V^^RR
R7       \        W1^,          P                  4      p
\        W1^,          P                  4      p\        W^^^^RRR7      pVP                  R4       V^,          P                  V4       \        V^,          ^RR7      pVP                  ^ R	4       VP!                  ^ R	4       \         P"                  ! 4       P$                  P&                  P)                  . 4       \         P"                  ! 4       P$                  P                  P)                  . 4       \+        V^,          V^^RR
R7       \        W1^,          P                  4      p\        W1^,          P                  4      p\        W^^^^RRRR7	      pVP                  R4       V^,          P                  V4       \        V^,          ^RR7      pVP                  ^ R	4       VP!                  ^ R	4       VP&                  P)                  . 4       VP                  P)                  . 4       \+        V^,          V^^RR
RR7       R# )rH   Fr   r   rrJ   )loc1aloc2aloc1bloc2br   r   rw   ry   皙?r}   r~   y)r   r   r   r   r   	facecolor)r   r   r   r   g)r   r   r   r   r   color)r   r   r   r   )r   r   r   r   r   r   fill)r   r   r   r   r   N)r)   r*   Zset_size_inchesranger   rA   Z
tick_rightr   Zfrom_extentsr   r   r   Zset_clip_on	add_patchr   r   r   gcaaxesr   Z	set_ticksr   )r/   r0   rD   bboxZbbox1Zbbox2Zpr   Zbbox3Zbbox4Zbbox5Zbbox6Zbbox7Zbbox8s                 r3   test_fill_facecolorr     s   ll1a GC11a[
& qEKKQQ,D DQ%//2EDQ%//2EAQaq3	A MM%qEOOAbeQM:E	NN1c	NN1cGGINN""2&GGINN""2&r!ue!!> DQ%//2EDQ%//2EAQaq#	A MM%qEOOAbeQM:E	NN1c	NN1cGGINN""2&GGINN""2&r!ue!!suE DQ%//2EDQ%//2EAQaqc	A MM%qEOOAbeQM:E	NN1c	NN1cGGINN""2&GGINN""2&r!ue!!35A DQ%//2EDQ%//2EAQaq3U	$A MM%qEOOAbeQM:E	NN1c	NN1c	KK"	KK"r!ue!!EJrF   zzoomed_axes.pngzinverted_zoomed_axes.pngZx86_64{Gz?)r7   r6   c                  s   \         P                  ! 4       w  rVP                  . RO. RO4       VP                  . RO4       \	        VRRR7      pVP                  . RO4       \         P                  ! 4       w  rVP                  . RO. RO4       VP                  . RO4       \	        VRRR7      pVP                  . R	O4       R# )
rH         @lower rightrx   NrH   rI   r   )rH   r   rH   r   )皙?ffffff?r   r   )r   rH   r   rH   )r   r   r   r   )r)   r*   rN   r@   r   )r/   r0   Zinset_axr   r3   test_zooming_with_inverted_axesr   [  s     llnGCGGIy!GGL #=AHMM&'llnGCGGIy!GGL #=AHMM&'rF   zanchored_direction_arrows.pngg{Gz?)r6   r7   c                  s    \         P                  ! 4       w  rVP                  \        P                  ! R4      RR7       \        VP                  RR4      pVP                  V4       R# )
   rX   rY   ZXZYNr   r   )r)   r*   r_   r]   r   r   r   r   )r/   r0   Zsimple_arrowr   r3   test_anchored_direction_arrowsr   m  sH     llnGCIIbhhx 	I:*2<<cBLMM,rF   z'anchored_direction_arrows_many_args.png)r7   c                  s    \         P                  ! 4       w  rVP                  \        P                  ! R4      4       \        VP                  RRRRRR^RRRRR^	^
^R	7      pVP                  V4       R
# )r   ZAZBrw   Zredr   Tgffffff?r$   )ry   r   Zaspect_ratior%   r   r   ZalphaZsep_xZsep_yZback_lengthZ
head_widthZhead_lengthZ
tail_widthNr   g      gQg{Gz)r)   r*   r_   r]   Zonesr   r   r   )r/   r0   Zdirection_arrowsr   r3   (test_anchored_direction_arrows_many_argsr   y  sh     llnGCIIbggh .LL#sU3!Tu#!q	*
 MM"#rF   c                  s   \         P                  ! 4       w  r\        V4      p\        P                  ! R R/4      ;_uu_ 4        VP                  RRR7      pRRR4       V P                  P                  4        R#   + '       g   i     L,; i)zfigure.subplot.wspacer   r(   z5%)sizeN)r)   r*   r   r?   Z
rc_contextr+   r,   r-   )r/   r0   r1   rj   re   r3   test_axes_locatable_positionr     s_    llnGC!"%G	0$7	8	8!!'!5 
9JJOO 
9	8s   A;;B	z'image_grid_each_left_label_mode_all.pngr   r   )r7   savefig_kwargc                  s(   \         P                  ! ^d4      P                  R	4      p \        P                  ! ^R
4      p\        VRRRRRRRR7      p\        W"P                  4       F)  w  r4VP                  V RR7      pVP                  V4       K+  	  R# )r   Zeachr'   z15%Zall)rS   axes_padrW   rV   	cbar_sizerU   r|   r   Nr   r   r   rH   rH   rH   )r   rI   )r<   333333?)
r]   arangereshaper)   r\   r   zipr`   r_   ra   )imdatar/   rb   r0   rj   rd            r3   (test_image_grid_each_left_label_mode_allr     s}     YYs^##H-F
**Q
CS)*%Vu %'D t^^,YYvVY4R -rF   z)image_grid_single_bottom_label_mode_1.pngc                  s@   \         P                  ! ^d4      P                  R
4      p \        P                  ! ^R4      p\        VRRRRRRRRR7	      p\        ^4       F  pW#,          P                  V RR7      pK  	  VP                  ^ ,          P                  X4       R	# )r   rR   r   r&   z10%Z1)rS   r   rW   Zcbar_padrV   r   rU   r|   r   Nr   )r   g      ?r    r    rH   rH   )rH   r   )r   g333333?)
r]   r   r   r)   r\   r   r   r_   r`   ra   )r   r/   rb   rD   rd           r3   test_image_grid_single_bottomr     s     YYs^##H-F
**Q

#CS,F)X#+uND
 1XW^^F&^9 NN1r"rF   c            	      s    \         P                  ! 4       p \        P                  ! \        R R7      ;_uu_ 4        \        V RRRR7       RRR4       R#   + '       g   i     R# ; i)z#'foo' is not a valid value for moderk   Zfoo)rU   Nr   )rI   rH   )r)   r\   rL   r   r   r   )r/   s    r3   "test_image_grid_label_mode_invalidr     s=    
**,C	z)N	O	O#|V> 
P	O	O	Os   AA%	zimage_grid.png)rn   r7   r   c                  s    \         P                  ! ^d4      P                  R4      p \        P                  ! ^R4      p\        V^oRRR7      p\        ^4       F  pW#,          P                  V RR7       K  	  R# )	r   r$   )rS   r   rX   r   Nr   r   r   rI   rI   )r]   r   r   r)   r\   r   r   r_   )rd   r/   rb   rD   re   r3   test_image_gridr     s\    
 
3			)B
**Q
CS#6C@D1Xr3 rF   c            	      s   \         P                  ! RR7      w  rVP                  . RO. RO4      w  p\        V^4      pVP                  . RO. RO4       \	        W^^RRR7       \        V 4       V P                  V P                  P                  4       4      p\        P                  P                  VP                  . R	O4       R# )
   rp   r|   z0.3r~   N)r   r   r   )r    rH   r    )g333331g+g@g@)r)   r*   rN   r   r   r   get_tightbboxr,   Zget_rendererr]   Ztestingr!   r   )r/   r0   ZlZax_zoomr   r   r3   test_gettightbboxr     s    ll6*GC	I	&BAA&GLLI&rv%@C SZZ4467DJJ(()ACrF   click_onbigsmallzbig_on_axes,small_on_axesc                sr  a \         P                  ! RRR^R7      p\         P                  ! RRRR^R7      p. oV3R lp\         P                  ! 4       P                  P	                  RV4       W3pRR	R
R	RR	/pRV9   d   \         P
                  ! 4       VR&   R
V9   g   RV9   d)   \        ^o4      VR
&   VR
,          P                  4       VR&   Wp,          P                  V4       Wq,          P                  V4       VR8X  d   Wp,          pRp	M
Wq,          pRp	WR,          J d
   VR
,          pVP                  P                  V	4      w  r\        RVP                  RR7      P                  W^R7      pVP                  V4       VR8X  d   ^M^pS Uu. uF  qP                  NK  	  ppVR8X  d   R	# R	# u upi )z2Test pick events on normal, host or parasite axes.r<   )pickerr   r   )r   r   c                 s*   < SP                  V 4       R # )N)Zappend)eventreceived_eventss   &r3   on_pickZ/test_picking_callbacks_overlap.<locals>.on_pick  s    u%rF   Z
pick_eventr   NrO   parasiter   Zbutton_press_eventT)Zroot)Zbuttonr   )      ?r   )r   r   )r   r   )r<   r<   )r)   Z	RectangleZgcfr,   Zmpl_connectr   r   r>   r   r   Z	transformr   Z
get_figureZpickZartist)Zbig_on_axesZsmall_on_axesr   r   r   r   Zrectangles_on_axesr   Z
click_axesZaxes_coordsZxr   ZmZexpected_n_eventsr   Zevent_rectsr   s   &&&             @r3   test_picking_callbacks_overlapr     s     --c3q
9CMM*c3#aHEO&GGI  w7%54z48D""ggiU##z5G'G#C(V<,,.Z$!!%(5&
 (
 *%%&\
!!++K8FQ')>)>D)>)I)P)PRS	AOOA%0a-<=_E<<_K=7 >s   F4zanchored_artists.pngc                  s   \         P                  ! RR7      w  r\        ^(^^ ^ RRRR7      p\        R^
4      pVP                  P                  V4       \        R^RR7      pVP                  P                  V4       VP                  V4       \        VP                  RR	7      p\        R R
R^RR7      pVP                  P                  V4       VP                  V4       \        VP                  RRRRR7      p\        R R
RR!R7      pVP                  P                  V4       VP                  V4       \        VP                  RRRRR^RRRR^/RRR7      pVP                  V4       R# )"r   rp   rw   g        F)ry   r%   r   r   )r   
upper leftr   r$   r   Zcyan)rh   ri   angler   z
lower leftTr<   )ry   r   r%   r   r   )rh   ri   r   r   z	0.2 unitsr   r   r   g?Zgreen)
ry   r%   r   r   Zfill_barr   Z	label_topZpropZsize_verticalr   Nr   r   )i   r   )r    r    i)
r)   r*   r   r   Zdrawing_arear   r   r   r   r   )r/   r0   Zadap1p2ZboxZelr   s           r3   test_anchored_artistsr     sC   ll6*GC
b"a2&+-C	"	B#	!	$B#MM#
!",,L
AC	s3b	GB#MM#
 "",,L$&)S:C	s4s	;B#MM#
",,\}!Sa$"'4vrl(,G=C MM#rF   c            
      s(   \         P                  ! ^4      P                  R4      p \         P                  ! ^4      P                  R4      p\        P                  ! ^^4      w  pw  r4VP                  V 4       VP                  V4       Rp\        V^o\        P                  ! V4      \        P                  ! V4      \        P                  ! V4      .\        P                  ! V4      \        P                  ! ^4      \        P                  ! V4      .R7      pVP                  VP                  ^ 4      4       VP                  VP                  ^4      4       VP                  P                  4        VP!                  4       pVP!                  4       pR# i   r<   )Z
horizontalZverticalN)r   ro   )ro   r   )r]   r   r   r)   r*   r_   r   SizeAxesXFixedAxesYScaledset_axes_locatornew_locatorr,   r-   r   	Zarr1Zarr2r/   ax1ax2r%   r1   r   r   	            r3   test_hbox_dividerr  1  s   99R=  (D99R=  (Dll1a(OC#JJtJJt
CSJJsOTZZ_djjoF**S/4;;q>4::c?CEG ,,Q/0,,Q/0JJOO				B				BrF   c            
      s(   \         P                  ! ^4      P                  R4      p \         P                  ! ^4      P                  R4      p\        P                  ! ^^4      w  pw  r4VP                  V 4       VP                  V4       Rp\        V^o\        P                  ! V4      \        P                  ! ^4      \        P                  ! V4      .\        P                  ! V4      \        P                  ! V4      \        P                  ! V4      .R7      pVP                  VP                  ^ 4      4       VP                  VP                  ^4      4       VP                  P                  4        VP!                  4       pVP!                  4       pR# r   )r]   r   r   r)   r*   r_   r   r   r   r   r   r   r   r   r,   r-   r   r  r  r3   test_vbox_dividerr  H  s   99R=  (D99R=  (Dll1a(OC#JJtJJt
CSJJsOT[[^TZZ_E**S/4::c?DJJsODFG ,,Q/0,,Q/0JJOO				B				BrF   c                  s    \         P                  ! 4       p \        P                  P                  P
                  / 3p\        V ^oRVR7      pR# )rG   )rS   
axes_classNr[   )r)   r\   mpl_toolkitsZ
axes_grid1Zmpl_axesAxesr   )r/   r  Zgrr   r3   test_axes_class_tupler
  _  s9    
**,C))2277<J	#s:	FBrF   c                 s   \         P                  ! 4       p \        V ^oRRR7      p\        WP                  4       \        VP
                  \        P                  ! VP                  4      4       \        V\        P                  ! VP
                  4      R4       \        V ^oRRR7      p\        V\        P                  ! VP                  4      R4       R# )z:Test Grid axes_all, axes_row and axes_column relationship.row	directioncolumnNrI   r   )
r)   r\   r   r    Zaxes_allaxes_rowr]   Z	transposeZaxes_columnravel)r/   rb   rP   r3   test_grid_axes_listsr  e  s    
**,CS&E2Dt]]+t}}bll43C3C&DEtRXXdmm4e<S&H5DtRXXd&6&67BrF   r  c                s    \         P                  ! 4       p\        V^oRV R7      p\        P                  ! VP
                  4       Uu. uF  q3P                  4       NK  	  ppR# u upi )z%Test positioning of the axes in Grid.r  Nr   )r)   r\   r   r]   r  r  Zget_axes_locator)r  r/   rb   r0   ry   s   &    r3   test_grid_axes_positionr  q  sN     **,CS&I6D+-88DMM+B
C+BR +BC
CC
Cs   A#zrect, ngrids, error, messagezIncorrect rect formatzngrids must be positivec           	      s    \         P                  ! 4       p\        P                  ! W#R 7      ;_uu_ 4        \	        W@RVR7       RRR4       R#   + '       g   i     R# ; i)rk   )rT   Nr  )r)   r\   rL   r   r   )ZrectrT   errormessager/   s   &&&& r3   test_grid_errorsr    s9     **,C	u	,	,Sv. 
-	,	,	,s   AA	zanchor, error, messagezanchor must be strZCCz$'CC' is not a valid value for anchorc           
      s    \         P                  ! 4       p\        P                  ! WR 7      ;_uu_ 4        \	        V. RO\
        P                  ! ^4      .\
        P                  ! ^4      .V R7       RRR4       R#   + '       g   i     R# ; i)rk   )anchorNr   )r)   r\   rL   r   r   r   r   )r  r  r  r/   s   &&& r3   test_divider_errorsr    sT     **,C	u	,	,\DJJqM?TZZ]O	 
-	,	,	,s   =A<<B	)r5   c                 sb   V P                  ^^4      w  r#VP                  ^ ^.^ ^.4       VP                  RRR7       \        W2^^4       VP                  ^^4      w  r#VP                  ^ ^.^ ^.4       VP                  RRR7       \        W2^^4       VP                  P                  4        R# )rH   )xlimylimN)rH   rI   )r*   rN   setr   r,   r-   )Zfig_testZfig_refZinsetZfulls   &&  r3    test_mark_inset_unstales_viewlimr    s    ##Aq)KEIIq!fq!f	II6I'tAq!""1a(KEIIq!fq!f	II6I'tAq!NNrF   c                  s    \         P                  ! 4       p V P                  . RO4      pRp\        WR7       V P                  P                  4        VP                  4       pR# )r    r$   r%   Nr   )r)   r\   Zadd_axesr   r,   r-   r   )r/   r0   r%   Ztbbre   r3   test_auto_adjustabler    sD    
**,C	l	#B
C"2/JJOO



CrF   zrgb_axes.pngc                  s   \         P                  ! 4       p \        V RR R7      p\        P                  P                  R4      pVP	                  R4      pVP	                  R4      pVP	                  R4      pVP                  W4VRR7       R# )r$   r  i!N,r|   r   N)r$   r$   皙?r  )ro   ro   )r)   r\   r   r]   r^   Zdefault_rngZ
imshow_rgb)r/   r0   Zrngr   r   rJ   r   r3   test_rgb_axesr     sn     **,C	*	4B
))


)C

6A

6A

6AMM!M0rF   zimagegrid_cbar_mode.pngr   )rn   r7   r6   c                  s   \         P                  ! ^4      P                  R4      p \        P                  ! RR7      pRpR.^,          R.^,          ,           p. RO^,          p\        W#V4       F  w  rVp\        WRVVRRR7      pVw  rrV	P                  V RR7       V
P                  V P                  R	R7       VP                  \         P                  ! W P                  4      R
R7       VP                  \         P                  ! W P                  4      RR7       V FI  pVP                  P                  4        VP                  P                  VP                  ^ ,          4      pKK  	  K  	  R# )i   rp   r  r  z20%Zedge)rS   r  rV   r   rW   Znipy_spectral)ZcmapZhotZjetZhsvNr   )i   i	   )i   i   i   i   i   i   i   i   )r'   r(   r"   r&   r   )r]   r   r   r)   r\   r   r   r_   ZTZhypotZarctan2rj   Zclara   Zimages)Zarrr/   Z	positionsZ
directionsZcbar_locationsZpositionr  Zlocationrb   r  r  Zax3Zax4r0   cbs                  r3   test_imagegrid_cbar_mode_edger"    s     ))B-


'C
**W
%C8IhZ\)J79N),>*3%X%+#,'/#(#)+ "#

3_
-

355u
%

288C'e
4

2::c55)
6 BFFJJL1.B #*3rF   c                  s    \         P                  ! 4       p \        V ^oRR7      pV^ ,          pVP                  ^^..\        P
                  P                  4       R7      pVP                  P                  V4      pR# )rG   )rS   )rZ   Nr[   )	r)   r\   r   r_   r?   Zcolorsr   rj   ra   )r/   rb   r0   rd   r!  r   r3   test_imagegridr#    s[    
**,CS#62D	aB	QF8#**"4"4"6	7B		BrF   c                  sB   ^ RI Hp  ^ RIHp V P                  ! 4       p\        ^oVP                  VR7      pVP                  \        ^4      ^ \        ^4      4      pVP                  P                  4        VP                  4        VP                  P                  4        R# )r    N)r  r\   )matplotlib.pyplotpyplotZmpl_toolkits.axisartistZ
axisartistr\   r   r	  Zfill_betweenr   r,   r-   rB   )r)   ZAAr/   r0   Zcolr   r3   test_removalr&    sd    #(
**,C	cbggc	:B
//%(AuQx
0CJJOOJJLJJOOrF   zanchored_locator_base_call.pngc                  sd   \         P                  ! RR7      p V P                  ^^R7      w  rVP                  4       pVP	                  ^RRR7       VP	                  . . R7       \
        P                  ! R4      pRp\        V^RR7      pVP	                  . . R7       VP                  WERR	7       R
# )r   rp   )ZnrowsZncols)Zaspectr  r  )r   r   rr   r   rx   rs   )ru   rv   Nr   )ii   )iro   r   )	r)   r\   Z
subfiguresr*   r  r   r   r   r_   )r/   Zfig1Zfig2r0   rc   ru   r   r2   r3   test_anchored_locator_base_callr'    s    
**V
$Caq1JD	BFF!)(F3FF"RF >?AFbql;E	IIRI#	LL'L2rF   c                  s    \        \        P                  ! 4       ^oR\        P                  P
                  R7       \        \        P                  ! 4       ^o\        P                  P
                  R7       R# )rG   )r  Nr   )r   r)   r\   r?   r   r	  r    rF   r3   -test_grid_with_axes_class_not_overriding_axisr)    s8    sFsxx}}=CJJL##((--8rF   )ZclassicZ_classic_test_patch))r   r   )rO   rO   )rO   r   )r   rO   )r   r   )r  r  r[   ir   )fZ	itertoolsr   r   ZplatformZ
matplotlibr?   r$  r%  r)   Zmatplotlib.tickerZtickerZmtickerr   Zmatplotlib.backend_basesr   Zmatplotlib.colorsr   Zmatplotlib.patchesr   r   Zmatplotlib.transformsr   r   Zmatplotlib.testing.decoratorsr	   r
   r   Zmpl_toolkits.axes_grid1r   r   r   r   r   r   r   Z(mpl_toolkits.axes_grid1.anchored_artistsr   r   r   r   Z$mpl_toolkits.axes_grid1.axes_dividerr   r   r   r   r   Z mpl_toolkits.axes_grid1.axes_rgbr   Z%mpl_toolkits.axes_grid1.inset_locatorr   r   r   r   Z mpl_toolkits.axes_grid1.mpl_axesr  rL   Znumpyr]   Znumpy.testingr    r!   r4   rE   rQ   rf   rm   r   r   r   r   r   Zmachiner   r   r   r   r   r   r   r   r   ZmarkZparametrizer   r   r  r  r
  r  r  Z	TypeErrorr   r  r  r  r  r   r"  r#  r&  r'  r)  r(  rF   r3   <module>r*     s%    	    #  / % . 7D D . .  5C C '   GH8 01ug1:<.<.67# 	 &'ydK% L%P #$I4H( I(V(6V( '(d'JJK KJK\ $&@A:#++-9atE(E( 23#++-9at:< <  <=:<	$<	$+ <=W!. 8::  >?w!. 8:#:#? #$"'!. 8:4:4C  eW%564 7 /$ 7/$d )*GL M>>.@.G	C &78, 9, 7T956"j34!Z23: 
/
/ 1	9*+	:=>	/04 

 ( )
D >":<1<1 ,-"'s</</>6 34GD3 E3"9rF   