B
    A—W[Ë  ã               @   sF   d dl mZ d dlZd dlZd dlmZ ddgZ	ddd„Z
dd„ ZdS )	é    )ÚdivisionNÚ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¡ | g ¡ | g ¡ 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cmapZinterpolationZaspectg      à?g      à¿N)ÚlenÚpltÚsubplotsÚimshowÚnpZarangeZreshapeÚmplZcolorsZListedColormapÚlistZ
set_xticksZ
set_yticksZset_xticklabelsZset_yticklabels)ZpalÚsizeÚnÚfÚax© r   ú/lib/python3.7/site-packages/seaborn/miscplot.pyr   
   s    

c              C   s”   yddl m}  W n  tk
r0   ddlm}  Y nX ddlm} 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/img1.png)é   r   éd   )r   Zdpir   N)Zurllib.requestr   ÚImportErrorZurllib2Úior   Úreadr	   Zimreadr
   Zsubplots_adjustr   Zset_axis_off)r   r   ZurlÚdataZimgr   r   r   r   r   r       s    

)r   )Z
__future__r   Znumpyr   Z
matplotlibr   Zmatplotlib.pyplotZpyplotr	   Ú__all__r   r   r   r   r   r   Ú<module>   s   
