
 m[c           @` s  d  Z  d d l m Z m Z m Z d d l Z d d l m Z m Z d d l	 m
 Z
 d d l Z d d l Z d d l Z d d l Z d d l m Z m Z d d l m Z m Z m Z d d l m Z d d	 l m Z d d
 l m Z m Z d d d d d d d d d d d d d g Z d d d d d d d d d d d d d d d d d g Z d d d d d  d! d" d# g Z e e Z d$ e  f d%     YZ! e" d&  Z# d'   Z$ e# e$  Z% d(   Z& d)   Z' d*   Z( d+   Z) d,   Z* e# e*  Z+ d-   Z, d.   Z- d/   Z. d0   Z/ d1   Z0 d2   Z1 d3   Z2 e! d4 e d5 e3 Z4 d6   Z5 d7   Z6 d8   Z7 d9   Z8 d: Z9 d; Z: d< e  f d=     YZ; d> e  f d?     YZ< d@   Z= dA   Z> dB   Z? dC   Z@ e# e@ dD e3 ZA dE eA _  dF   ZB e# eC  ZD dG eD _  e! dH dI dJ g  ZE dK   ZF dL   ZG e# eG  ZH dM   ZI e! dN dO dP dQ dR dS dT g  ZJ e! dU dV jK    ZL e! dW dX dY dZ d[ g  ZM e! d\ d] d^ d_ d` da g  ZN db   ZO dc   ZP e! dd de df dg dh di dj dk dl dm dn do dp dq dr ds dt du dv dw dx dy dz d{ d| d} d~ g d5 e3 ZQ d   ZR e! d d d d g d5 e3 ZS e# eS  ZT e! d d d d g d5 e3 ZU e# eU  ZV e! d d d d d_ d^ d g  ZW e# eW  ZX e! d d d g d5 e3 ZY e d d d d d    ZZ e d d d d d d    Z[ e! d d d d d d d d d d d d] g d5 e3 Z\ d   Z] d   Z^ e! d d d d g  Z_ e! d d d d d d d d g  Z` e! d d d d d d g  Za e! d d d d g  Zb e! d d d d g  Zc d   Zd d   Ze d e  f d     YZf e! d d d d g  Zg d   Zh e# eh  Zi e# e; d e3   Zj i e# e? dD e3 d 6e+ d 6eD d 6eA d 6eA d 6eT d 6eV d 6eX d 6eA d 6e+ d 6e+ d 6eA d 6e+ d 6eD d 6ei d 6ej d 6Zk i	 d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6Zl d   Z d   Zm d   Zn d   Zo d   Zp e! d eq e jr e   eq e js e   d d d d g d5 e3 Zt d   Zu i+d e5 g d4 6e3 e' g d 6d e6 g d 6d e7 g d 6d e0 g d 6d ep g d 6e3 e' g d 6d e0 g d 6e3 e' g d 6d e8 g d 6d e& g d 6e" e' g d 6d eB g d 6dX eM g d 6d eB g d 6d e* g d 6d eu g d 6d e@ g d 6d eB g d 6de* g d6de* g d6e3 e' g d6d eS g d6d eS g d6d eU g d6d eU g d	6d
dg e; d e3  g d6ddddg e; d e3  g d6ddg e; d e3  g d6e3 e' g d6d eW g d 6de* g d6de@ g d6e" e' g d6d e@ g d6e3 e' g d6de@ g d6de* g d6den g d6e" e' g d6e3 e' g d6d eO g d6d e1 g d 6e" e' g d!6e" e' g d"6e3 e' g d#6e3 e' g d$6e3 e' g d%6e" e' g d&6de@ g d'6d(eB g d)6d e> g d*6de@ g d+6de* g d,6d eu g d-6de* g d.6de@ g d/6de* g d06d eu g d16de@ g d26de* g d36d eu g d46de@ g d56de* g d66d eu g d76d8e@ g d96de* g d:6d eu g d;6d<e@ g d=6d>eB g d?6d<e@ g d@6d<e@ g dA6de* g dB6dCeu g dD6de* g dE6dFg eD g dG6dHeB g dI6dHeB g dJ6dHeB g dK6dHeB g dL6de* g dM6dNdOdPdQdRdSdTdUdVdWdXdYdZd[g eD g d\6d]d^d_d`dadbdcdddedfdFg eD g dg6dhdidjdkdldmdng eD g do6dpdqdrdsdtdudvg eD g dw6dxdydzd{d|d}d~dddg
 eD g d6de@ g d6e" e' g d6e" e' g d6d g eD g d6e" e' g d6d e( g d6de e^ g d6de0 g d6e3 e' g d6dneI g d6deI g d6deI g d6deI g d6deI g d6deI g d6dO eJ g d6deL g d6e3 e' g d6deF g d6deB g d6deB g d6de0 g d6deB g d6e3 e' g d6e3 e' g d6d eu g d6e3 e' g d6d e* g d6de. g d6d e) g d6de@ g d6de@ g d6de* g d6e3 e' g d6e3 e' g d6e3 e' g d6e3 e' g d6deG g d6dHeB g d6de* g d6e" e' g d6d eb g d6d eg g d 6deG g d6de* g d6dHeB g d6de@ g d6ddg e< d g d6e" e' g d6e" e' g d6d e0 g d6e3 e' g d6de0 g d6e3 e' g d6e d ddddddddddg
  em g d6de! dddg  g d6def d dde3 de3 g d6def d dde3 de3 g d6e3 e' g d6e3 e' g d6d(eB g d6deB g d6deB g d6deB g d6deB g d6deB g d6deB g d6deB g d6e3 e' g d6d e\ g d6de0 g d6de0 g d6deG g d6de* g d6e" e' g d6e3 e' g d6de, g d6de* g d6de* g d6de* g d 6de* g d6de* g d6de* g d6de* g d6de= g d6de= g d	6e" e' g d
6e3 e' g d6e" e' g d6e3 e' g d6de* g d6de* g d6de* g d6de* g d6de* g d6de* g d6de@ g d6e" e' g d6e3 e' g d6e3 e' g d6e3 e' g d6e3 e' g d6deG g d6deB g d6d] eN g d 6e3 e' g d!6e" e' g d"6e3 e' g d#6e" e' g d$6de* g d%6de* g d&6de* g d'6de* g d(6de* g d)6de* g d*6de@ g d+6e" e' g d,6e3 e' g d-6e3 e' g d.6e3 e' g d/6e3 e' g d06deG g d16deB g d26da eN g d36d4e@ g d56d eu g d66de* g d76de* g d86deG g d96dHeB g d:6dd;g e; d g d<6d=e* g d>6de@ g d?6de@ g d@6e3 e' g dA6e" e' g dB6dCe0 g dD6dEef d dde3 de3 g dF6dGef d dde3 de3 g dH6dIef d dde3 de3 g dJ6dKef d dde3 de3 g dL6dMef d dde3 de" g dN6dMef d dde3 de" g dO6e" e' g dP6dQef d dde3 de" g dR6dQef d dde3 de" g dS6dTe* g dU6dTe* g dV6dWe/ g dX6de@ g dY6de@ g dZ6e3 e' g d[6dJ eE g d\6d]e0 g d^6d eP g d_6d`ed g da6dbe* g dc6ddeB g de6e" e' g df6e" e' g dg6df eQ g dh6e" e' g di6e" eR g dj6dke0 g dl6dme2 g dn6de0 g do6e" e' g dp6e" e' g dq6dme2 g dr6e" e' g ds6d e_ g d 6e3 e' g dt6d g eD g du6e3 e' g dv6dwe] g dx6d e- g dy6e" e' g dz6d{eB g d|6e3 e' g d}6def dd g d6e3 e' g d6d ee g d6g  e$ g d6d e0 g d6deD g d6dddg eD g d6d d dg eD g d6d dg eD g d6dg eD g d6d(g eD g d6ddg eD g d6dddg eD g d6dddg eD g d6dg eD g d6dg eD g d6dg eD g d6ddg eD g d6dg eD g d6d eB g d6d ec g d 6dCe* g d6d e` g d 6deB g d6de0 g d6d ea g d 6g  eD g d6d eo g d6g  eD g d6d eo g d6g  eD g d6deo g d6g  eD g d6e" e' g d6Zw ex dk rew Zy dey d d <xs ey D]h Zz ey ez dey ez d  ey ez d k se{ dez ey ez dey ez d  ey ez d f  qqWn  d S(  s  
The rcsetup module contains the default values and the validation code for
customization using matplotlib's rc settings.

Each rc setting is assigned a default value and a function used to validate
any attempted changes to that setting. The default values and validation
functions are defined in the rcsetup module, and are used to construct the
rcParams global object which stores the settings and is referenced throughout
matplotlib.

These default values should be consistent with the default matplotlibrc file
that actually reflects the values given here. Any additions or deletions to the
parameter set listed here should also be visited to the
:file:`matplotlibrc.template` in matplotlib's root source directory.
i    (   t   absolute_importt   divisiont   print_functionN(   t   Iterablet   Mapping(   t   reduce(   t   cbookt   testing(   t   mplDeprecationt
   deprecatedt	   ls_mapper(   t   parse_fontconfig_pattern(   t   is_color_like(   t   Cyclert   cyclert   GTKt   GTKAggt   GTKCairot   MacOSXt   Qt4Aggt   Qt5Aggt   TkAggt   WXt   WXAggt	   GTK3Cairot   GTK3Aggt   WebAggt   nbAggt   Qt4Cairot   Qt5Cairot   TkCairot   WXCairot   aggt   cairot   gdkt   pdft   pgft   pst   svgt   templatet   ValidateInStringsc           B` s   e  Z e d   Z d   Z RS(   c         ` s>   | |  _   |  _  f d       f d   | D |  _ d S(   s    valid is a list of legal stringsc         ` s     r |  j    S|  Sd  S(   N(   t   lower(   t   s(   t
   ignorecase(    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   func;   s    
c         ` s   i  |  ] } |   |   q S(    (    (   t   .0t   k(   R,   (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pys
   <dictcomp>@   s   	 N(   t   keyR+   t   valid(   t   selfR/   R0   R+   (    (   R,   R+   s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   __init__6   s    		c         C` sd   |  j  r | j   } n  | |  j k r2 |  j | St d |  j | t t j |  j   f   d  S(   Ns1   Unrecognized %s string "%s": valid strings are %s(   R+   R)   R0   t
   ValueErrorR/   t   listt   sixt
   itervalues(   R1   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   __call__B   s    	(   t   __name__t
   __module__t   FalseR2   R7   (    (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyR(   5   s   c         ` sj      f d   } y d j   j  | _ Wn, t k
 rY d j  t   j  | _ n X j | _ | S(   Nc         ` s  t  |  t j  r y< g  |  j d  D]$ } | j   r%  | j    ^ q% SWqt k
 r   r g  |  D]$ } | j   rk  | j    ^ qk S  qXnj t  |  t  r t  |  t  r g  |  D]+ } t  | t j  s | r  |  ^ q St d j	 |     d  S(   Nt   ,s7   {!r} must be of type: string or non-dictionary iterable(
   t
   isinstanceR5   t   string_typest   splitt   stript	   ExceptionR   R   R3   t   format(   R*   t   v(   t   allow_stringlistt   scalar_validator(    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   fL   s    &/
)	s   {}lists   {}List(   RA   R8   t   AttributeErrort   typet   __doc__(   RD   RC   RE   (    (   RC   RD   s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   _listify_validatorK   s    c         C` s   |  S(   N(    (   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_anyn   s    c         C` s:   |  d k r d St j j |   r& |  St d |    d S(   s$   If s is a path, return s, else Falses+   "%s" should be a path but it does not existN(   t   Nonet   ost   patht   existst   RuntimeError(   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_path_existss   s
    c      	   C` s   t  |  t j  r! |  j   }  n  |  d d d d d d d t f k rI t S|  d d	 d
 d d d d t f k rq t St d |    d S(   s   Convert b to a boolean or raiset   tt   yt   yest   ont   truet   1i   RE   t   nt   not   offt   falset   0i    s!   Could not convert "%s" to booleanN(   R<   R5   R=   R)   t   TrueR:   R3   (   t   b(    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_bool}   s    $$c      	   C` s   t  |  t j  r! |  j   }  n  |  d k s9 |  d k r= d S|  d d d d d d d t f k re t S|  d	 d
 d d d d d t f k r t St d |    d S(   s   Convert b to a boolean or raiset   noneRQ   RR   RS   RT   RU   RV   i   RE   RW   RX   RY   RZ   R[   i    s!   Could not convert "%s" to booleanN(   R<   R5   R=   R)   RK   R\   R:   R3   (   R]   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_bool_maybe_none   s    $$c         C` s*   |  d  k r d  St j d t  t |   S(   Ns/   axes.hold is deprecated, will be removed in 3.0(   RK   t   warningst   warnR   R^   (   t   value(    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   deprecate_axes_hold   s
    	c         C` s6   y t  |   SWn! t k
 r1 t d |    n Xd S(   s   convert s to float or raises   Could not convert "%s" to floatN(   t   floatR3   (   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_float   s    c         C` sR   |  d k s |  d k r d Sy t |   SWn! t k
 rM t d |    n Xd S(   s!   convert s to float, None or raiseRK   s'   Could not convert "%s" to float or NoneN(   RK   Re   R3   (   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_float_or_None   s    c         C` sF   |  d k r d Sy t |   SWn! t k
 rA t d |    n Xd S(   s   convert s to string or raises    Could not convert "%s" to stringN(   RK   t   validate_stringR3   (   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_string_or_None   s    c         C` sj   y t  |   SWnE t k
 rU t |  t j  rV |  j   }  |  j d  rR d SqV n Xt d |    d  S(   Nt   lines2   %s cannot be interpreted as True, False, or "line"(   R^   R3   R<   R5   R=   R)   t
   startswith(   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_axisbelow   s    c         C` sL   |  d k r |  Sy t  |   SWn' t k
 rG t d |  |  f   n Xd S(   s;   confirm s is string 'figure' or convert s to float or raiset   figures>   "%s" is not string "figure" or could not convert "%s" to floatN(   Re   R3   (   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_dpi   s    c         C` s6   y t  |   SWn! t k
 r1 t d |    n Xd S(   s   convert s to int or raises   Could not convert "%s" to intN(   t   intR3   (   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_int   s    c         C` s[   |  d k r d }  n  |  d k r% d Sy t |   SWn! t k
 rV t d |    n Xd S(   s(   if not None, tries to validate as an intRK   s   Could not convert "%s" to intN(   RK   Ro   R3   (   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_int_or_None   s    	c         C` s   i d d 6d d 6} y t  |   } WnM t k
 rs y | |  j   SWq t k
 ro t d t |    q Xn< X| t j |  k r t d t t j |     n  | Sd S(   s_   
    confirm that this is a Postscript of PDF font type that we know how to
    convert to
    i   t   type3i*   t   truetypes*   Supported Postscript/PDF font types are %sN(   Rp   R3   R)   t   KeyErrorR4   R5   R6   (   R*   t	   fonttypest   fonttype(    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_fonttype   s    

t   backendR+   c         C` s!   |  j  d  r |  St |   Sd  S(   Ns	   module://(   Rk   t   _validate_standard_backends(   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_backend  s    c         C` s,   |  d  k r d  St d d d d g  |   S(   Ns   backend.qt4t   PyQt4t   PySidet   PyQt4v2(   RK   R(   (   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_qt4  s    c         C` s)   |  d  k r d  St d d d g  |   S(   Ns   backend.qt5t   PyQt5t   PySide2(   RK   R(   (   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_qt5  s    c         C` s(   t  d d d d g d t } | |   S(   Nt   toolbarRK   t   toolbar2t   toolmanagerR+   (   R(   R\   (   R*   t	   validator(    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_toolbar  s
    	sB   You must supply exactly {n} values, you provided {num} values: {s}sb   You must supply exactly {n} comma-separated values, you provided {num} comma-separated values: {s}t   validate_nseq_floatc           B` s    e  Z d e d   Z d   Z RS(   c         C` s   | |  _  | |  _ d  S(   N(   RW   t
   allow_none(   R1   RW   R   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyR2   +  s    	c         C` s   t  | t j  rC g  | j d  D] } | j   ^ q" } t } n t } |  j d k	 r t	 |  |  j k r t
 | j d |  j d t	 |  d |    n  y= g  | D]. } |  j s | d k	 r t |  n | ^ q SWn t
 k
 r t
 d   n Xd S(   s!   return a seq of n floats or raiseR;   RW   t   numR*   s'   Could not convert all entries to floatsN(   R<   R5   R=   R>   R?   t   _str_err_msgt   _seq_err_msgRW   RK   t   lenR3   RA   R   Re   (   R1   R*   t   xt   err_msgt   val(    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyR7   /  s    (	$0:N(   R8   R9   RK   R:   R2   R7   (    (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyR   *  s   t   validate_nseq_intc           B` s   e  Z d d   Z d   Z RS(   c         C` s   | |  _  d  S(   N(   RW   (   R1   RW   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyR2   D  s    c         C` s   t  | t j  rC g  | j d  D] } | j   ^ q" } t } n t } |  j d k	 r t	 |  |  j k r t
 | j d |  j d t	 |  d |    n  y! g  | D] } t |  ^ q SWn t
 k
 r t
 d   n Xd S(   s   return a seq of n ints or raiseR;   RW   R   R*   s%   Could not convert all entries to intsN(   R<   R5   R=   R>   R?   R   R   RW   RK   R   R3   RA   Ro   (   R1   R*   R   R   R   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyR7   G  s    (	$0!N(   R8   R9   RK   R2   R7   (    (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyR   C  s   c         C` s   |  d k r |  St  |   S(   s   return a valid color argt   inherit(   t   validate_color(   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_color_or_inheritX  s    c         C` s   |  d k r |  St  |   S(   Nt   auto(   R   (   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_color_or_auto_  s    c         C` s   t  |  t  rK t j d |   } | d  k	 r t d j d |     q nN t  |  t j  r t j d |   } | d  k	 r t d j d |     q n  t	 |   S(   Ns   ^C[0-9]$s3   Can not put cycle reference ({cn!r}) in prop_cyclert   cn(
   R<   t   bytest   ret   matchRK   R3   RA   R5   R=   R   (   R*   R   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_color_for_prop_cyclee  s    c         C` s  y |  j    d k r d SWn t k
 r- n Xt |  t j  r t |   d k sd t |   d k r d |  } t |  r | Sq n  t |   r |  S|  } d } |  j d  d k red j g  |  D]0 } | j	   s | d k s | d k r | ^ q  } | j
 d  } t |  d k r%d } qey# g  | D] } t |  ^ q/} Wqet k
 rad } qeXn  | r|t |  r|| St d |  | f   d S(   s   return a valid color argR_   i   i   t   #t    R;   i    t   .i   i   s&   
Color tuples must be of length 3 or 4s(   
Could not convert all entries to floatss#   %s does not look like a color arg%sN(   i   i   (   R)   RF   R<   R5   R=   R   R   t   findt   joint   isdigitR>   Re   R3   (   R*   t   stmpt   colorargt   msgt   ct   valsR   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyR   u  s4    $

F	#RC   s   return a list of colorspecsc         C` s*   t  |  t t j f  r |  St |   Sd  S(   N(   R<   t   strR5   t	   text_type(   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyRh     s    s   return a listt   orientationt	   landscapet   portraitc         C` sB   |  d k r |  Sy t  |   SWn t k
 r= t d   n Xd  S(   NR   t   equals    not a valid aspect specification(   R   R   (   Re   R3   (   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_aspect  s    c      	   C` s   d d d d d d d d d	 g	 } t  |  t j  rB |  j   }  n  |  | k rR |  Sy t |   SWn0 t k
 r t d
 |  d j |  f   n Xd  S(   Ns   xx-smalls   x-smallt   smallt   mediumt   larges   x-larges   xx-larget   smallert   largers5   %s is not a valid font size. Valid font sizes are %s.s   , (   R<   R5   R=   R)   Re   R3   R   (   R*   t	   fontsizes(    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_fontsize  s    c         C` s   t  |   |  S(   N(   R   (   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_font_properties  s    
t   fontsett
   dejavusanst   dejavuserift   cmt   stixt   stixsanst   customt   defaults6   rm cal it tt sf bf default bb frak circled scr regulart   verboset   silentt   helpfult   debugs   debug-annoyingt	   alignmentt   centert   topt   bottomt   baselinet   center_baselinec         C` s|   |  d k r d Sy t  d  |   } | SWnK t t f k
 rw y t |   } | SWqx t k
 rs t d   qx Xn Xd  S(   Nt   rangei   s:   Not a valid whisker value ['range', float, (float, float)](   R   t	   TypeErrorR3   Re   (   R*   RB   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_whiskers  s    c         C` s%   t  |   }  |  d k r! d }  n  |  S(   NR   t   png(   Rh   (   Rc   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   update_savefig_format  s    	t   ps_papersizeR   t   lettert   legalt   ledgert   a0t   a1t   a2t   a3t   a4t   a5t   a6t   a7t   a8t   a9t   a10t   b0t   b1t   b2t   b3t   b4t   b5t   b6t   b7t   b8t   b9t   b10c         C` sg   t  |  t j  r! |  j   }  n  |  d k r1 d  S|  d t f k rG t S|  d k rW |  St d   d  S(   NR_   RZ   t   ghostscriptt   xpdfsE   matplotlibrc ps.usedistiller must either be none, ghostscript or xpdf(   R_   N(   R   R   (   R<   R5   R=   R)   RK   R:   R3   (   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_ps_distiller  s    t	   joinstylet   mitert   roundt   bevelt   capstylet   buttt
   projectings   markers.fillstylet   fullt   leftt   rightR_   t   negative_linestylet   solidt   dasheds   2.1t   addendums*    See 'validate_negative_linestyle_legacy' s)   deprecation warning for more information.c         C` s
   t  |   S(   N(   t   _validate_negative_linestyle(   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_negative_linestyle  s    s.    The 'contour.negative_linestyle' rcParam now s2   follows the same validation as the other rcParams s   that are related to line style.c         C` sE   y t  |   } | SWn* t k
 r@ t d  |   } d | f SXd  S(   Ni   i    (   R   R3   R   (   R*   t   rest   dashes(    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt"   validate_negative_linestyle_legacy%  s    t
   legend_loct   bests   upper rights
   upper lefts
   lower lefts   lower rights   center lefts   center rights   lower centers   upper centerc         C` s@   |  d k r |  S|  d k r0 t  j d d  |  St d   d  S(   NR_   RM   t   svgfonts   2.2s1   'svgfont' support for svg.fonttype is deprecated.sG   Unrecognized svg.fonttype string '{}'; valid strings are 'none', 'path'(   R_   RM   (   R   t   warn_deprecatedR3   (   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_svg_fonttypeA  s    
c         C` sB   |  t  t f k r |  S|  j   d k r2 |  j   St d   d  S(   NR   t   nativet   eitherR_   s6   hinting should be 'auto', 'native', 'either' or 'none'(   R   R  R  R_   (   R\   R:   R)   R3   (   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_hintingL  s
    
s   pgf.texsystemt   xelatext   lualatext   pdflatexs   animation.writert   ffmpegt   ffmpeg_filet   avconvt   avconv_filet   imagemagickt   imagemagick_filet   htmls   animation.frame_formatR   t   jpegt   tifft   rawt   rgbat   majort   minort   boths   animation.htmlt   html5t   jshtmlc         C` sl   t  |  t j  rM |  j   }  |  d k r. |  S|  d k r> d  St d   n |  d  k	 rh t d   n  |  S(   Nt   tightt   standards$   bbox should be 'tight' or 'standard'(   R<   R5   R=   R)   RK   R3   (   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_bboxd  s    c         C` s   t  |  t j  r! |  j   }  n  |  d k s9 |  d  k r= d  St  |  t j  r t g  |  j d  D] } t | j    ^ qb  } n= t  |  t	 t f  r t g  |  D] } t |  ^ q  } n  t
 |  d k r t d   n  | S(   NR_   R;   i   s7   path.sketch must be a tuple (scale, length, randomness)(   R<   R5   R=   R)   RK   t   tupleR>   Re   R?   R4   R   R3   (   R*   RB   t   result(    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_sketchq  s    7(t   ValidateIntervalc           B` s&   e  Z d  Z e e d  Z d   Z RS(   s#   
    Value must be in interval
    c         C` s(   | |  _  | |  _ | |  _ | |  _ d  S(   N(   t   vmint   vmaxt   cmint   cmax(   R1   R  R  t	   closedmint	   closedmax(    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyR2     s    			c         C` s
  y t  |  } Wn! t k
 r3 t d |   n X|  j rh | |  j k  rh t d |  j | f   n5 |  j r | |  j k r t d |  j | f   n  |  j r | |  j k r t d |  j | f   n5 |  j r| |  j k rt d |  j | f   n  | S(   Ns!   Value must be a float; found "%s"s   Value must be >= %f; found "%f"s   Value must be > %f; found "%f"s   Value must be <= %f; found "%f"s   Value must be < %f; found "%f"(   Re   R3   RO   R   R  R!  R  (   R1   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyR7     s"    (   R8   R9   RH   R\   R2   R7   (    (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyR  ~  s   s   axes.grid.axisR   RR   c         C` sr   t  |  t j  s! t d   n  t |   d d d d d d d d	 d
 d h
 } | rn t d t |    n  |  S(   s   
    Validate a hatch pattern.
    A hatch pattern string can have any sequence of the following
    characters: ``\ / | - + * . x o O``.

    s   Hatch pattern must be a strings   \t   /t   |t   -t   +t   *R   R   t   ot   Os   Unknown hatch symbol(s): %s(   R<   R5   R=   R3   t   setR4   (   R*   t   unknown(    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_hatch  s    .R   t   colort	   linewidtht	   linestylet	   facecolort	   edgecolort	   fillstylet   markerfacecolort
   markersizet   markeredgewidtht   markeredgecolort   alphat   markert   hatchR   R   t   lwt   lst   fct   ect   mfct   mect   mewt   msc          O` so  |  r | r t  d   n |  r8 | r8 t  d   n  t |   d k rz t |  d t  sl t  d   n  t |  d  St |   d k r |  d |  d f g } n0 t |   d k r t  d   n t j |  } g  } xv | D]n \ } } t j | |  } t	 j | d
  } | d
 k r2t  d |   n  | |  } | j | | f  q Wt t j d	   | D  S(   s+  
    Creates a `~cycler.Cycler` object much like :func:`cycler.cycler`,
    but includes input validation.

    Call signatures::

      cycler(cycler)
      cycler(label=values[, label2=values2[, ...]])
      cycler(label, values)

    Form 1 copies a given `~cycler.Cycler` object.

    Form 2 creates a `~cycler.Cycler` which cycles over one or more
    properties simultaneously. If multiple properties are given, their
    value lists must have the same length.

    Form 3 creates a `~cycler.Cycler` for a single property. This form
    exists for compatibility with the original cycler. Its use is
    discouraged in favor of the kwarg form, i.e. ``cycler(label=values)``.

    Parameters
    ----------
    cycler : Cycler
        Copy constructor for Cycler.

    label : str
        The property key. Must be a valid `.Artist` property.
        For example, 'color' or 'linestyle'. Aliases are allowed,
        such as 'c' for 'color' and 'lw' for 'linewidth'.

    values : iterable
        Finite-length iterable of the property values. These values
        are validated and will raise a ValueError if invalid.

    Returns
    -------
    cycler : Cycler
        A new :class:`~cycler.Cycler` for the given properties.

    Examples
    --------
    Creating a cycler for a single property:

    >>> c = cycler(color=['red', 'green', 'blue'])

    Creating a cycler for simultaneously cycling over multiple properties
    (e.g. red circle, green plus, blue cross):

    >>> c = cycler(color=['red', 'green', 'blue'],
    ...            marker=['o', '+', 'x'])

    sE   cycler() can only accept positional OR keyword arguments -- not both.s2   cycler() must have positional OR keyword argumentsi   i    sE   If only one positional argument given, it must  be a Cycler instance.i   s+   No more than 2 positional arguments alloweds   Unknown artist property: %sc         s` s$   |  ] \ } } t  | |  Vq d  S(   N(   t   ccycler(   R-   R.   RB   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pys	   <genexpr>"  s    N(   R   R   R<   R   t   validate_cyclerR5   t	   iteritemst   _prop_aliasest   gett   _prop_validatorsRK   t   appendR   t   operatort   add(   t   argst   kwargst   pairst	   validatedt   propR   t	   norm_propR   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyR     s,    5c   	      C` s  t  |  t j  r yH d |  j d d  k r< t d   n  t |  i t d 6i  d 6 }  Wq t k
 r } t d |  | f   q Xn  t  |  t  r |  } n t d |    | j	 t
 t  t
 t  B} | r t d	 |   n  t
   } x | j	 D] } t j | |  } | | k rH| | j	 k rHt d
 j | |    n  | | k rot d j | |    n  | j | g  q Wt |  t | j	  k st  x3 | j	 D]( } t j | |  } | j | |  qWx. | j   j   D] \ } } t | |  qW| S(   s>   return a Cycler object from a string repr or the object itselfs   .__t    R   sG   '%s' seems to have dunder methods. Raising an exception for your safetyR   t   __builtins__s+   '%s' is not a valid cycler construction: %ss.   object was not a string or Cycler instance: %ss   Unknown artist properties: %ss@   Cannot specify both '{0}' and alias '{1}' in the same prop_cyclesK   Another property was already aliased to '{0}'. Collision normalizing '{1}'.(   R<   R5   R=   t   replaceR3   t   evalR   t   BaseExceptionR   t   keysR+  RH  RF  RG  RA   t   updateR   t   AssertionErrort
   change_keyt   by_keyt   items(	   R*   t   et   cycler_instt   unknownst   checkerRP  RQ  R/   R   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyRD  %  s@    !				!c         C` s   t  |  t j  r" |  d k r" |  Sy t |   SWn t t f k
 rI n Xy t |   SWn t k
 rk n Xt d d   d  S(   NR   s&   'hist.bins' must be 'auto', an int or s   a sequence of floats(   R<   R5   R=   Ro   R   R3   t   validate_floatlist(   R*   (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_hist_binsf  s    c         C` sU   t  |  t j  s! t d   n  d d l m } d | k rQ | d j j   n  |  S(   Ns   path must be a (unicode) stringi    (   t   moduless   matplotlib.animation(   R<   R5   R=   R3   t   sysRc  t   writerst	   set_dirty(   t   pRc  (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_animation_writer_pathv  s    c         C` sb   |  d  k	 rR d d  l } y | j |   Wn" | j k
 rM } t d   n X|  St d   d  S(   Ni    s*   'webagg.address' is not a valid IP address(   RK   t   sockett	   inet_atont   errorR3   (   R*   Ri  R]  (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   validate_webagg_address  s    RK   RR  R   c         C` s   t  |  t j  rR y t |   SWqR t t f k
 rN t d j |     qR Xn  t  |  t t	 f  r t d j |     n  yE t
 |   d d k r t d j |     n  d t   |   f SWn, t t f k
 r t d j |     n Xd S(   sf   
    A validator for all possible line styles, the named ones *and*
    the on-off ink sequences.
    s0   the linestyle string {!r} is not a valid string.sL   linestyle {!r} neither looks like an on-off ink sequence nor a valid string.i   i    s2   the linestyle sequence {!r} is not of even length.s2   linestyle {!r} is not a valid on-off ink sequence.N(   R<   R5   R=   t   _validate_named_linestylet   UnicodeDecodeErrorRt   R3   RA   R   t	   bytearrayR   RK   R   R   (   R<  (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   _validate_linestyle  s"    				t   Aggt   backend_fallbacks   backend.qt4s   backend.qt5i#  s   webagg.ports	   127.0.0.1s   webagg.addresss   webagg.open_in_browseri2   s   webagg.port_retriess   nbagg.transparentR   R   t   datapatht   interactivet   UTCt   timezones   verbose.levels
   sys.stdouts   verbose.fileog      ?s   lines.linewidthR&  s   lines.linestylet   C0s   lines.colors   lines.markerg      ?s   lines.markeredgewidthi   s   lines.markersizes   lines.antialiaseds   lines.dash_joinstyles   lines.solid_joinstyles   lines.dash_capstyles   lines.solid_capstyleg@g?s   lines.dashed_patterng@i   s   lines.dashdot_patterngffffff?s   lines.dotted_patterns   lines.scale_dashess   patch.linewidthR.   s   patch.edgecolors   patch.force_edgecolors   patch.facecolors   patch.antialiaseds   hatch.colors   hatch.linewidthi
   s	   hist.binss   boxplot.notchs   boxplot.verticals   boxplot.whiskerss   boxplot.bootstraps   boxplot.patchartists   boxplot.showmeanss   boxplot.showcapss   boxplot.showboxs   boxplot.showflierss   boxplot.meanlines   boxplot.flierprops.colorR)  s   boxplot.flierprops.markers"   boxplot.flierprops.markerfacecolors"   boxplot.flierprops.markeredgecolors   boxplot.flierprops.markersizes   boxplot.flierprops.linestyles   boxplot.flierprops.linewidths   boxplot.boxprops.colors   boxplot.boxprops.linewidths   boxplot.boxprops.linestyles   boxplot.whiskerprops.colors   boxplot.whiskerprops.linewidths   boxplot.whiskerprops.linestyles   boxplot.capprops.colors   boxplot.capprops.linewidths   boxplot.capprops.linestylet   C1s   boxplot.medianprops.colors   boxplot.medianprops.linewidths   boxplot.medianprops.linestylet   C2s   boxplot.meanprops.colort   ^s   boxplot.meanprops.markers!   boxplot.meanprops.markerfacecolors!   boxplot.meanprops.markeredgecolors   boxplot.meanprops.markersizes   --s   boxplot.meanprops.linestyles   boxplot.meanprops.linewidths
   sans-serifs   font.familyt   normals
   font.styles   font.variants   font.stretchs   font.weights	   font.sizes   DejaVu Serifs   Bitstream Vera Serifs   Computer Modern Romans   New Century Schoolbooks   Century Schoolbook Lt   Utopias   ITC Bookmant   Bookmans   Nimbus Roman No9 Ls   Times New Romant   Timest   Palatinot   Chartert   serifs
   font.serifs   DejaVu Sanss   Bitstream Vera Sanss   Computer Modern Sans Serifs   Lucida Grandet   Verdanat   Genevat   Lucidt   Arialt	   Helveticas   Avant Gardes   font.sans-serifs   Apple Chanceryt   Textiles   Zapf Chanceryt   Sands	   Script MTt   Felipat   cursives   font.cursives   Comic Sans MSt   Chicagot   Charcoalt   ImpactWesterns
   Humor Sanst   xkcdt   fantasys   font.fantasys   DejaVu Sans Monos   Bitstream Vera Sans Monos   Computer Modern Typewriters   Andale Monos   Nimbus Mono Ls   Courier Newt   Couriert   Fixedt   Terminalt	   monospaces   font.monospaces
   text.colors   text.usetexs   text.latex.unicodes   text.latex.preambles   text.latex.previews   text.dvipnghacks   text.hintingi   s   text.hinting_factors   text.antialiaseds   mathtext.calt   sanss   mathtext.rms   mathtext.tts   sans:italics   mathtext.its	   sans:bolds   mathtext.bfs   mathtext.sfs   mathtext.fontsett   its   mathtext.defaults   mathtext.fallback_to_cmR   s   image.aspectt   nearests   image.interpolationt   viridiss
   image.cmapi   s	   image.lutt   uppers   image.origins   image.resamples   image.composite_images   contour.negative_linestyles   contour.corner_masks   errorbar.capsizeRj   s   axes.axisbelows	   axes.holdt   ws   axes.facecolors   axes.edgecolorg?s   axes.linewidths   axes.spines.lefts   axes.spines.rights   axes.spines.bottoms   axes.spines.topR   s   axes.titlesizes   axes.titleweightg      @s   axes.titlepads	   axes.grids   axes.grid.whichR   s   axes.labelsizeg      @s   axes.labelpads   axes.labelweights   axes.labelcolorii   i   s   axes.formatter.limitss   axes.formatter.use_locales   axes.formatter.use_mathtexts   axes.formatter.min_exponents   axes.formatter.useoffseti   s   axes.formatter.offset_thresholds   axes.unicode_minuss   #1f77b4s   #ff7f0es   #2ca02cs   #d62728s   #9467bds   #8c564bs   #e377c2s   #7f7f7fs   #bcbd22s   #17becfs   axes.prop_cyclet   datat   autolimit_modet   round_numberss   axes.autolimit_modeg?R"  R#  s   axes.xmargins   axes.ymargins   polaraxes.grids   axes3d.grids   scatter.markers   %Ys   date.autoformatter.years   %Y-%ms   date.autoformatter.months   %Y-%m-%ds   date.autoformatter.days   %m-%d %Hs   date.autoformatter.hours   %d %H:%Ms   date.autoformatter.minutes   %H:%M:%Ss   date.autoformatter.seconds   %M:%S.%fs   date.autoformatter.microseconds   legend.fancyboxs
   legend.locs   legend.numpointss   legend.scatterpointss   legend.fontsizes   legend.markerscales   legend.shadows   legend.frameons   legend.framealphag?s   legend.borderpadg      ?s   legend.labelspacingg       @s   legend.handlelengthgffffff?s   legend.handleheights   legend.handletextpads   legend.borderaxespads   legend.columnspacingR   s   legend.facecolors   0.8s   legend.edgecolors	   xtick.tops   xtick.bottoms   xtick.labeltops   xtick.labelbottomg      @s   xtick.major.sizes   xtick.minor.sizes   xtick.major.widthg333333?s   xtick.minor.widths   xtick.major.padg333333@s   xtick.minor.pads   xtick.colors   xtick.minor.visibles   xtick.minor.tops   xtick.minor.bottoms   xtick.major.tops   xtick.major.bottoms   xtick.labelsizet   outs   xtick.directions   xtick.alignments
   ytick.lefts   ytick.rights   ytick.labellefts   ytick.labelrights   ytick.major.sizes   ytick.minor.sizes   ytick.major.widths   ytick.minor.widths   ytick.major.pads   ytick.minor.pads   ytick.colors   ytick.minor.visibles   ytick.minor.lefts   ytick.minor.rights   ytick.major.lefts   ytick.major.rights   ytick.labelsizes   ytick.directions   ytick.alignments   #b0b0b0s
   grid.colors   grid.linestyles   grid.linewidths
   grid.alphas   figure.titlesizes   figure.titleweightg333333@s   figure.figsizeid   s
   figure.dpis   figure.facecolors   figure.edgecolors   figure.frameons   figure.autolayouti   s   figure.max_open_warningg      ?s   figure.subplot.leftg?s   figure.subplot.rightg)\(?s   figure.subplot.bottomg)\(?s   figure.subplot.topg?s   figure.subplot.wspaces   figure.subplot.hspaces   figure.constrained_layout.useg{Gz?s    figure.constrained_layout.hspaces    figure.constrained_layout.wspacegr.U?s   figure.constrained_layout.h_pads   figure.constrained_layout.w_padRm   s   savefig.dpis   savefig.facecolors   savefig.edgecolors   savefig.frameons   savefig.orientationi_   s   savefig.jpeg_qualitys   savefig.formatR  s   savefig.bboxg?s   savefig.pad_inchest   ~s   savefig.directorys   savefig.transparents   tk.window_focuss   ps.papersizes	   ps.useafms   ps.usedistillerip  s   ps.distiller.resi   s   ps.fonttypes   pdf.compressions   pdf.inheritcolors   pdf.use14corefontss   pdf.fonttypes	   pgf.debugs   pgf.rcfontss   pgf.preambles   svg.image_inlineRM   s   svg.fonttypes   svg.hashsalts   docstring.hardcopys   .matplotlib_pluginss   plugins.directorys   path.simplifyg      "@g        s   path.simplify_thresholds	   path.snaps   path.sketchs   path.effectss   agg.path.chunksizeRE   s   ctrl+fs   keymap.fullscreent   ht   rt   homes   keymap.homet	   backspaces   keymap.backRB   s   keymap.forwardRg  s
   keymap.pans   keymap.zoomR*   s   ctrl+ss   keymap.saves   ctrl+ws   cmd+wt   qs   keymap.quitt   Ws   cmd+Wt   Qs   keymap.quit_allt   gs   keymap.gridt   Gs   keymap.grid_minort   ls   keymap.yscalet   Ls   keymap.xscalet   as   keymap.all_axess   examples.directorys   animation.embed_limitt   h264s   animation.codecis   animation.bitrates   animation.html_argss   animation.ffmpeg_paths   animation.ffmpeg_argss   animation.avconv_paths   animation.avconv_argst   converts   animation.convert_paths   animation.convert_argss   _internal.classic_modet   __main__R$  s   %s: %s != %sgqq?(   RE   s   ctrl+f(|   RH   t
   __future__R    R   R   R5   t   collectionsR   R   t	   functoolsR   RJ  RL   Ra   R   t
   matplotlibR   R   t   matplotlib.cbookR   R	   R
   t   matplotlib.fontconfig_patternR   t   matplotlib.colorsR   R   R   RC  t   interactive_bkt   non_interactive_bkt   all_backendst   objectR(   R:   RI   RJ   t   validate_anylistRP   R^   R`   Rd   Rf   Ra  Rg   Ri   Rl   Rn   Rp   Rq   Rw   R\   Ry   Rz   R~   R   R   R   R   R   R   R   R   R   R   t   validate_colorlistRh   R   t   validate_stringlistt   validate_orientationR   R   t   validate_fontsizelistR   t   validate_fontsetR>   t   validate_mathtext_defaultt   validate_verboset   _validate_alignmentR   R   t   validate_ps_papersizeR   t   validate_joinstylet   validate_joinstylelistt   validate_capstylet   validate_capstylelistt   validate_fillstylet   validate_fillstylelistR   R   R   t   validate_legend_locR   R  t   validate_pgf_texsystemt   validate_movie_writert   validate_movie_frame_fmtt   validate_axis_locatort   validate_movie_html_fmtR  R  R  t   validate_grid_axisR-  t   validate_hatchlistt   validate_dashlistRH  RF  RD  Rb  Rh  Rl  R4   t   iterkeysR6   Rm  Rp  RK   t   defaultParamsR8   t   rcR/   t   print(    (    (    s1   lib/python2.7/site-packages/matplotlib/rcsetup.pyt   <module>   s  	
#		
							
													&										!'							
						


	U	A			%		*	

	

	

*