a
    fø1b4  ã                   @   sf   d dl Zd dlZd dlmZ d dlmZ d dl	m
Z d dlmZ edgddddd	d
„ ƒZdd„ ZdS )é    N)Úimage_comparison)Ú	ImageGridzimagegrid_cbar_mode.pngTZmpl20g333333Ó?)Zremove_textZstyleZtolc               
   C   sF  dt jd< t t ddd¡t ddd¡¡\} }t | ¡t |¡ dt d| ¡t |d ¡   }t jd	d
}d}dgd dgd  }g d¢d }t|||ƒD ]¢\}}}	t	||d||	ddd}
|
\}}}}|j
|jdd |j
|jdd |j
t |¡dd |j
t |j|j¡dd |
D ]"}|j ¡  |j |jd ¡}qqžd S )NFzpcolormesh.snapr   é   é   y              ð?é   g       @)é   é	   )Zfigsize)éñ   éò   éó   éô   éõ   éö   é÷   éø   Úrowé   Úcolumn)ÚleftÚrightÚtopZbottomé   )r   r   z20%Zedge)Únrows_ncolsÚ	directionZcbar_locationZ	cbar_sizeZ	cbar_modeZnipy_spectral)ZcmapZhotZjetZhsv)ÚpltZrcParamsÚnpZmeshgridZlinspaceZsinZcosÚfigureÚzipr   ÚimshowÚrealÚimagÚabsZarctan2ÚcaxZclaÚcolorbarZimages)ÚXÚYZarrÚfigZ	positionsZ
directionsZcbar_locationsZpositionr   ÚlocationÚgridZax1Zax2Zax3Zax4ÚaxÚcb© r+   ú@lib/python3.9/site-packages/mpl_toolkits/tests/test_axes_grid.pyÚtest_imagegrid_cbar_mode_edge   s2    
$4ÿû
r-   c                  C   sZ   t  ¡ } t| ddd}|d }|jddggtj ¡ d}|j |¡}t	|j
tjƒsVJ ‚d S )Néo   )é   r/   )r   r   r/   r   )Znorm)r   r   r   r   ÚmplZcolorsZLogNormr"   r#   Ú
isinstanceZlocatorÚmtickerZ
LogLocator)r&   r(   r)   Zimr*   r+   r+   r,   Útest_imagegrid2   s    r3   )Znumpyr   Z
matplotlibr0   Zmatplotlib.tickerZtickerr2   Zmatplotlib.testing.decoratorsr   Zmatplotlib.pyplotZpyplotr   Zmpl_toolkits.axes_grid1r   r-   r3   r+   r+   r+   r,   Ú<module>   s   ÿ
#