o
    i	                     @   s   d dl mZ d dlZd dlZd dlZd dlmZ d dl	m
Z d dlmZ ejdddgedgdd	d
ddd Zdd ZdS )    )	ExitStackN)image_comparison)	ImageGridlegacy_colorbarFTzimagegrid_cbar_mode.pngmpl20g333333?)remove_textstyletolc              
   C   s  | 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 ]q\}}	}
t
||d|	|
ddd}|\}}}}|j|jdd |j|jdd |jt|dd |jt|j|jdd | rtt jnt ! |D ]}|j  |jj|jd t jdd}qW d    n1 sw   Y  qOd S )Nmpl_toolkits.legacy_colorbarr         y              ?   g       @)   	   )figsize)                        row   column)leftrighttopbottom   )r    r    z20%edge)nrows_ncols	directioncbar_location	cbar_size	cbar_modenipy_spectral)cmaphotjethsv   )ticks)mplrcParamsnpmeshgridlinspacesincospltfigurezipr   imshowrealimagabsarctan2pytestwarnsMatplotlibDeprecationWarningr   caxclacolorbarimagestickerMaxNLocator)r   XYarrfig	positions
directionscbar_locationspositionr#   locationgridax1ax2ax3ax4axcb rV   \/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/mpl_toolkits/tests/test_axes_grid.pytest_imagegrid_cbar_mode_edge   sF   
$4

rX   c                  C   sf   dt jd< t } t| ddd}|d }|jddggt j d	}|j	|}t
|jt j	js1J d S )
NFr
   o   )   rZ   )r"   r   rZ   r    )norm)r.   r/   r5   r6   r   r8   colorsLogNormr@   rB   
isinstancelocator_ColorbarLogLocator)rI   rO   rT   imrU   rV   rV   rW   test_imagegrid8   s   
rb   )
contextlibr   numpyr0   r=   
matplotlibr.   matplotlib.testing.decoratorsr   matplotlib.pyplotpyplotr5   mpl_toolkits.axes_grid1r   markparametrizerX   rb   rV   rV   rV   rW   <module>   s    &