U
    Åmœd  ã                   @   sF   d dl Zd dlZd dlmZ d dlmZ ddgZ	ddd„Z
dd„ ZdS )é    NÚpalplotÚdogploté   c                 C   sž   t | ƒ}tjdd|| |fd\}}|jt |¡ d|¡tj 	t
| ƒ¡ddd | t |¡d ¡ | ddg¡ | dd	„ t|ƒD ƒ¡ |j t ¡ ¡ d
S )zõPlot the values in a color palette as a horizontal array.

    Parameters
    ----------
    pal : sequence of matplotlib colors
        colors, i.e. as returned by seaborn.color_palette()
    size :
        scaling factor for size of plot

    r   )ÚfigsizeZnearestÚauto)ZcmapÚinterpolationZaspectg      à?g      à¿c                 S   s   g | ]}d ‘qS )Ú © )Ú.0Ú_r	   r	   úI/home/sam/Atlas/atlas_env/lib/python3.8/site-packages/seaborn/miscplot.pyÚ
<listcomp>   s     zpalplot.<locals>.<listcomp>N)ÚlenÚpltÚsubplotsÚimshowÚnpZarangeZreshapeÚmplÚcolorsZListedColormapÚlistZ
set_xticksZ
set_yticksZset_xticklabelsÚrangeZyaxisZset_major_locatorÚtickerZNullLocator)ZpalÚsizeÚnÚfÚaxr	   r	   r   r   	   s     þc            
      O   s¨   zddl m} W n  tk
r0   ddlm} Y nX ddlm} d}tj dd¡}||| 	|¡ƒ 
¡ ƒ}t |¡}tjddd	\}}	| ddd
d
¡ |	 |¡ |	 ¡  dS )zWho's a good boy?r   )Úurlopen)ÚBytesIOz@https://github.com/mwaskom/seaborn-data/raw/master/png/img{}.pngé   é   )é   r    éd   )r   Zdpir   N)Úurllib.requestr   ÚImportErrorÚurllib2Úior   r   ÚrandomÚrandintÚformatÚreadr   Zimreadr   Zsubplots_adjustr   Zset_axis_off)
r   Ú__r   r   ÚurlZpicÚdataZimgr   r   r	   r	   r   r   !   s    

)r   )Únumpyr   Z
matplotlibr   Zmatplotlib.pyplotZpyplotr   Zmatplotlib.tickerr   Ú__all__r   r   r	   r	   r	   r   Ú<module>   s   
