U
    \	¸ax  ã                   @   sZ   d dl Zd dl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_textÚstyleZtolc               
   C   sV  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  }ddddg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|jd tj d¡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é   )Zticks)ÚpltZrcParamsÚnpZmeshgridZlinspaceÚsinÚcosÚfigureÚzipr   ÚimshowÚrealÚimagÚabsZarctan2ÚcaxZclaÚcolorbarZimagesÚmplZtickerZMaxNLocator)ÚXÚYZarrÚfigZ	positionsZ
directionsZcbar_locationsÚpositionr   ÚlocationÚgridZax1Zax2Zax3Zax4ÚaxÚcb© r1   úE/tmp/pip-unpacked-wheel-wjyw_3jo/mpl_toolkits/tests/test_axes_grid.pyÚtest_imagegrid_cbar_mode_edge   s<    
$4  ÿû

þr3   c                  C   s\   t  ¡ } t| ddd}|d }|jddggtj ¡ d}|j |¡}t	|j
tjjƒsXt‚d S )Néo   )é   r5   )r   r   r5   r   )Znorm)r   r    r   r"   r(   ÚcolorsZLogNormr&   r'   Ú
isinstanceÚlocatorZ_ColorbarLogLocatorÚAssertionError)r+   r.   r/   Zimr0   r1   r1   r2   Útest_imagegrid3   s    r:   )Znumpyr   Z
matplotlibr(   Zmatplotlib.testing.decoratorsr   Zmatplotlib.pyplotZpyplotr   Zmpl_toolkits.axes_grid1r   r3   r:   r1   r1   r1   r2   Ú<module>   s     ÿ
%