ó
Ű¤[c           @   s}   d  Z  d d l m Z d d l m Z m Z m Z m Z m Z m	 Z	 d   Z
 d e f d     YZ d e f d     YZ d	 S(
   so   Configurable for configuring the IPython inline backend

This module does not import anything from matplotlib.
i˙˙˙˙(   t   SingletonConfigurable(   t   Dictt   Instancet   Sett   Boolt
   TraitErrort   Unicodec          C   s.   t  }  y d d l m } t }  Wn n X|  S(   s   Test if PIL/Pillow is availablei˙˙˙˙(   t   Image(   t   Falset   PILR   t   True(   t   outR   (    (    s5   lib/python2.7/site-packages/ipykernel/pylab/config.pyt   pil_available   s    
t   InlineBackendConfigc           B   s   e  Z RS(    (   t   __name__t
   __module__(    (    (    s5   lib/python2.7/site-packages/ipykernel/pylab/config.pyR   $   s   t   InlineBackendc           B   s  e  Z d  Z e i d d 6d d 6d d 6d d	 6d
 d 6d d 6d d j d e  Z e d h d d j d e  Z d   Z	 d   Z
 e d d  j d e  Z d   Z e i d d 6d d j d e  Z e	 Z e e d d j d e  Z e d d e Z RS(    s7   An object to store configuration of the inline backend.g      @g      @s   figure.figsizei   i    s   figure.facecolors   figure.edgecolori
   s	   font.sizeiH   s
   figure.dpig      Ŕ?s   figure.subplot.bottomt   helpsV   Subset of matplotlib rcParams that should be different for the
        inline backend.t   configt   pngsc   A set of figure formats to enable: 'png',
                          'retina', 'jpeg', 'svg', 'pdf'.c         C   s?   |  j  d  k	 r; d d l m } | |  j  |  j |  j  n  d  S(   Ni˙˙˙˙(   t   select_figure_formats(   t   shellt   Nonet   IPython.core.pylabtoolsR   t   figure_formatst   print_figure_kwargs(   t   selfR   (    (    s5   lib/python2.7/site-packages/ipykernel/pylab/config.pyt   _update_figure_formattersA   s    c         C   sA   d | k s d | k r3 t    s3 t d   q3 n  |  j   d  S(   Nt   jpgt   jpegs#   Requires PIL/Pillow for JPG figures(   R   R   R   (   R   t   namet   oldt   new(    (    s5   lib/python2.7/site-packages/ipykernel/pylab/config.pyt   _figure_formats_changedF   s    	sn   The figure format to enable (deprecated
                                         use `figure_formats` instead)c         C   s   | r | h |  _  n  d  S(   N(   R   (   R   R   R   R    (    (    s5   lib/python2.7/site-packages/ipykernel/pylab/config.pyt   _figure_format_changedO   s    t   tightt   bbox_inchess   Extra kwargs to be passed to fig.canvas.print_figure.

        Logical examples include: bbox_inches, quality (for jpeg figures), etc.
        sE  Close all figures at the end of each cell.

        When True, ensures that each cell starts with no active figures, but it
        also means that one must keep track of references in order to edit or
        redraw figures in subsequent cells. This mode is ideal for the notebook,
        where residual plots from other cells might be surprising.

        When False, one must call figure() to create new figures. This means
        that gcf() and getfigs() can reference figures created in other cells,
        and the active figure can continue to be edited with pylab/pyplot
        methods that reference the current active figure. This mode facilitates
        iterative editing of figures, and behaves most consistently with
        other matplotlib backends, but figure barriers between cells must
        be explicit.
        s1   IPython.core.interactiveshell.InteractiveShellABCt
   allow_none(   g      @g      @(   i   i   i   i    (   i   i   i   i    (   R   R   t   __doc__R   t   tagR
   t   rcR   R   R   R!   R   t   figure_formatR"   R   t   _print_figure_kwargs_changedR   t   close_figuresR   R   (    (    (    s5   lib/python2.7/site-packages/ipykernel/pylab/config.pyR   '   s0   
							N(   R&   t   traitlets.config.configurableR    t	   traitletsR   R   R   R   R   R   R   R   R   (    (    (    s5   lib/python2.7/site-packages/ipykernel/pylab/config.pyt   <module>   s
   .	