ó
W[c           @   s\   d  d l  m Z d  d l Z d  d l Z d  d l j Z d d g Z	 d d  Z
 d   Z d S(   i˙˙˙˙(   t   divisionNt   palplott   dogploti   c         C   sĹ   t  |   } t j d d d | | | f \ } } | j t j |  j d |  d t j j	 t
 |    d d d d | j t j |  d  | j d	 d g  | j g   | j g   d
 S(   ső   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

    i   t   figsizet   cmapt   interpolationt   nearestt   aspectt   autog      ŕ?g      ŕżN(   t   lent   pltt   subplotst   imshowt   npt   aranget   reshapet   mplt   colorst   ListedColormapt   listt
   set_xtickst
   set_ytickst   set_xticklabelst   set_yticklabels(   t   palt   sizet   nt   ft   ax(    (    s/   lib/python2.7/site-packages/seaborn/miscplot.pyR   
   s    (!c          C   sÄ   y d d l  m }  Wn! t k
 r7 d d l m }  n Xd d l m } d } | |  |  j    } t j |  } t j	 d d d d  \ } } | j
 d	 d	 d
 d
  | j |  | j   d S(   s   Who's a good boy?i˙˙˙˙(   t   urlopen(   t   BytesIOs?   https://github.com/mwaskom/seaborn-data/raw/master/png/img1.pngR   i   t   dpiid   i    i   N(   i   i   (   t   urllib.requestR   t   ImportErrort   urllib2t   ioR   t   readR
   t   imreadR   t   subplots_adjustR   t   set_axis_off(   R   R   t   urlt   datat   imgR   R   (    (    s/   lib/python2.7/site-packages/seaborn/miscplot.pyR       s    (   t
   __future__R    t   numpyR   t
   matplotlibR   t   matplotlib.pyplott   pyplotR
   t   __all__R   R   (    (    (    s/   lib/python2.7/site-packages/seaborn/miscplot.pyt   <module>   s   