
t,2Jc            @   s  d  Z  d d k Z d d k Z d d k l Z d d k l Z 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 d]d     YZ
 d   Z d   Z d   Z d   Z d   Z d   Z e
 d  e	 d! e Z d"   Z e
 d# d$ d% d& g d! e Z e
 d' d( d) d* g d! e Z d+   Z d, d^d-     YZ d. d_d/     YZ d0   Z d1   Z e
 d2 d3 d4 g  Z d5   Z d6   Z d7   Z e
 d8 d9 d: d; d< g  Z e
 d= d> d? d@ dA g  Z  e
 dB dC d d d g d! e Z! 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 d! e Z" d_   Z# e
 d` da db dc g d! e Z$ e
 dd de db df g d! e Z% e
 dg dh di g d! e Z& dj   Z' e
 dk dl dm dn do dp dq dr ds dt du dv g d! e Z( dw d`dx     YZ) h dy e g d  6e e g dz 6d& e g d# 6e* e g d{ 6d* e g d' 6d e g d| 6e* 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 6d e g d 6d e g d 6e e g d 6da e$ g d 6da e$ g d 6de e% g d 6df e% g d 6d e g d 6d e g d 6d 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 d d d d d d d d d d d d g e g d 6d d d d d d d d d d g
 e g d 6d d d d d g e g d 6d d d d d g e g d 6d d d d d d d d d g	 e g d 6d e g d 6e* e g d 6e* e g d 6d g 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 6d e g d 6d e g d 6d9 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 6e* e g d 6di e' g d 6e* e g d 6e e g d 6d e g d 6d e g d 6d e g d 6d e g d 6e* e g d 6d e g d 6d e g d 6d d g e d  g d6e e g d6e e g d6e* e g d6dm e( g d6e e g d6d e g d6d e g d6d 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
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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(d)g e d  g d*6d+e g d,6d-e g d.6d e g d/6e* e g d06d1e) d2d3d4e d5e g d66d7e) d2d3d4e d5e g d86d9e) d2d3d4e d5e g d:6d7e) d2d3d4e d5e g d;6d<e) d2d3d4e d5e* g d=6d<e) d2d3d4e d5e* g d>6d?e g d@6d e g dA6d e g dB6d4 e g dC6dC e! g dD6e* e g dE6e* e g dF6dF e" g dG6e* e g dH6e* e# g dI6dJe g dK6dLe g dM6d e g dN6e* e g dO6e* e g dP6dLe g dQ6e e g dR6e* e g dS6e e g dT6e* e g dU6dVe, g dW6e* e g dX6d2e g dY6Z- e. dZj o e- Z/ d[e/ d| d2<xq e/ D]e Z0 e/ e0 d3e/ e0 d2 e/ e0 d2j p4 d\e0 e/ e0 d3e/ e0 d2 e/ e0 d2f GHqnqnWn d S(a  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.
iN(   t   parse_fontconfig_pattern(   t   is_color_liket   GTKt   GTKAggt   GTKCairot   FltkAggt   MacOSXt   QtAggt   Qt4Aggt   TkAggt   WXt   WXAggt   CocoaAggt   aggt   cairot   emft   gdkt   pdft   pst   svgt   templatet   ValidateInStringsc           B   s   e  Z e d   Z d   Z RS(   c            s[   | |  _    |  _   f d   } t g  } | D] } | | |  | f q/ ~  |  _ d S(   s    valid is a list of legal stringsc            s     o |  i    S|  Sd  S(   N(   t   lower(   t   s(   t
   ignorecase(    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyt   func(   s     N(   t   keyR   t   dictt   valid(   t   selfR   R   R   R   t   _[1]t   k(    (   R   sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyt   __init__$   s    		c         C   s_   |  i  o | i   } n | |  i j o |  i | St d |  i | |  i i   f   d  S(   Ns1   Unrecognized %s string "%s": valid strings are %s(   R   R   R   t
   ValueErrorR   t   values(   R   R   (    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyt   __call__-   s    
  (   t   __name__t
   __module__t   FalseR    R#   (    (    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyR   #   s   	c         C   s,   t  i i |   o |  St d |    d S(   s$   If s is a path, return s, else Falses+   "%s" should be a path but it does not existN(   t   ost   patht   existst   RuntimeError(   R   (    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyt   validate_path_exists3   s     c      	   C   s   t  |   t j o |  i   }  n |  d d d d d d d t f j o t S|  d d	 d
 d d d d t f j o t St d |    d S(   s   Convert b to a boolean or raiset   tt   yt   yest   ont   truet   1i   t   ft   nt   not   offt   falset   0i    s!   Could not convert "%s" to booleanN(   t   typet   strR   t   TrueR&   R!   (   t   b(    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyt   validate_bool9   s    % % c      	   C   s   t  |   t j o |  i   }  n |  d j o d S|  d d d d d d d t f j o t S|  d	 d
 d d d d d t f j o t St d |    d S(   s   Convert b to a boolean or raiset   noneR,   R-   R.   R/   R0   R1   i   R2   R3   R4   R5   R6   R7   i    s!   Could not convert "%s" to booleanN(   R8   R9   R   t   NoneR:   R&   R!   (   R;   (    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyt   validate_bool_maybe_noneB   s     % % c         C   s8   y t  |   SWn# t j
 o t d |    n Xd S(   s   convert s to float or raises   Could not convert "%s" to floatN(   t   floatR!   (   R   (    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyt   validate_floatL   s     c         C   s8   y t  |   SWn# t j
 o t d |    n Xd S(   s   convert s to int or raises   Could not convert "%s" to intN(   t   intR!   (   R   (    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyt   validate_intR   s     c         C   s   h d d 6d d 6} y t  |   } WnQ t j
 oE |  i   | i   j o | |  i   St d | i     n3 X| | i   j o t d | i     n | Sd S(   sQ   confirm that this is a Postscript of PDF font type that we know how to convert toi   t   type3i*   t   truetypes*   Supported Postscript/PDF font types are %sN(   RC   R!   R   t   keysR"   (   R   t	   fonttypest   fonttype(    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyt   validate_fonttypeX   s    

t   backendR   c         C   s#   |  i  d  o |  St |   Sd  S(   Ns	   module://(   t
   startswitht   _validate_standard_backends(   R   (    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyt   validate_backendi   s     t   numerixt   Numerict   numarrayt   numpyt   toolbarR>   t   classict   toolbar2c         C   s   |  o t  i d  n d  S(   Ns,   figure.autolayout is not currently supported(   t   warningst   warn(   t   v(    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyt   validate_autolayoutu   s    t   validate_nseq_floatc           B   s   e  Z d    Z d   Z RS(   c         C   s   | |  _  d  S(   N(   R3   (   R   R3   (    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyR    z   s    c         C   s  t  |  t j o | i d  } t |  |  i j o t d |  i   n y) g  } | D] } | t |  q] ~ SWqt j
 o t d   qXns t  |  t t f j p t	  t |  |  i j o t d |  i   n g  } | D] } | t |  q ~ Sd S(   s!   return a seq of n floats or raiset   ,s1   You must supply exactly %d comma separated valuess'   Could not convert all entries to floatss!   You must supply exactly %d valuesN(
   R8   R9   t   splitt   lenR3   R!   R@   t   listt   tuplet   AssertionError(   R   R   t   ssR   t   valt   _[2](    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyR#   |   s    ) (   R$   R%   R    R#   (    (    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyRY   y   s   	t   validate_nseq_intc           B   s   e  Z d    Z d   Z RS(   c         C   s   | |  _  d  S(   N(   R3   (   R   R3   (    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyR       s    c         C   s  t  |  t j o | i d  } t |  |  i j o t d |  i   n y) g  } | D] } | t |  q] ~ SWqt j
 o t d   qXns t  |  t t f j p t	  t |  |  i j o t d |  i   n g  } | D] } | t |  q ~ Sd S(   s   return a seq of n ints or raiseRZ   s1   You must supply exactly %d comma separated valuess%   Could not convert all entries to intss!   You must supply exactly %d valuesN(
   R8   R9   R[   R\   R3   R!   RB   R]   R^   R_   (   R   R   R`   R   Ra   Rb   (    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyR#      s    ) (   R$   R%   R    R#   (    (    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyRc      s   	c   	      C   sh  |  i    d j o d St |   o |  Sd |  } t |  o | S|  } d } |  i d  d j o d i g  } |  D]8 } | i   p | d j p | d j o | | qy qy ~  } | i d  } t |  d j o
 d	 } q4y+ g  } | D] } | t |  q ~ } Wq4t j
 o d
 } q4Xn | o t |  o | St d |  | f   d S(   s   return a valid color argR=   R>   t   #t    RZ   i    t   .i   s   
Color tuples must be length 3s(   
Could not convert all entries to floatss#   %s does not look like a color arg%sN(	   R   R   t   findt   joint   isdigitR[   R\   R@   R!   (	   R   t   stmpt   colorargt   msgR   t   ct   valsRb   Ra   (    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyt   validate_color   s*    
U
+c         C   s   t  |   t j o/ g  } |  i d  D] } | | i   q' ~ St  |   t t g j p t  g  } |  D] } | t |  qm ~ Sd S(   s   return a listRZ   N(   R8   R9   R[   t   stripR]   R^   R_   (   R   R   RW   Rb   (    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyt   validate_stringlist   s    / t   orientationt	   landscapet   portraitc         C   sF   |  d j o |  Sy t  |   SWn t j
 o t d   n Xd  S(   Nt   autot   equals    not a valid aspect specification(   Ru   s   equal(   R@   R!   (   R   (    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyt   validate_aspect   s    c      
   C   si   t  |   t j o |  i   }  n |  d j o |  Sy t |   SWn t j
 o t d
   n Xd  S(   Ns   xx-smalls   x-smallt   smallt   mediumt   larges   x-larges   xx-larget   smallert   largers   not a valid font size(	   s   xx-smalls   x-smallRx   Ry   Rz   s   x-larges   xx-largeR{   R|   (   R8   R9   R   R@   R!   (   R   (    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyt   validate_fontsize   s    
c         C   s   t  |   |  S(   N(   R    (   R   (    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyt   validate_font_properties   s    
t   fontsett   cmt   stixt   stixsanst   customt   verboset   silentt   helpfult   debugs   debug-annoyingt   cairo_formatt   pngt   ps_papersizeRu   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   so   t  |   t j o |  i   }  n |  d j o d  S|  d t f j o t S|  d j o |  St d   d  S(   NR=   R6   t   ghostscriptt   xpdfsE   matplotlibrc ps.usedistiller must either be none, ghostscript or xpdf(   s   noneN(   R   s   xpdf(   R8   R9   R   R>   R&   R!   (   R   (    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyt   validate_ps_distiller   s    t	   joinstylet   mitert   roundt   bevelt   capstylet   buttt
   projectingt   negative_linestylet   solidt   dashedc         C   sT   y t  |   } | SWn9 t j
 o- t d  |   } t i d  d | f SXd  S(   Ni   sD   Deprecated negative_linestyle specification; use 'solid' or 'dashed'i    (   t   validate_negative_linestyleR!   RY   RU   RV   (   R   t   rest   dashes(    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyt"   validate_negative_linestyle_legacy  s    t
   legend_loct   bests   upper rights
   upper lefts
   lower lefts   lower rightt   rights   center lefts   center rights   lower centers   upper centert   centert   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(   R   R   R   t	   closedmint	   closedmax(    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyR      s    			c         C   s  y t  |  } Wn t d |   n X|  i o- | |  i j  o t d |  i | f   n9 |  i o- | |  i j o t d |  i | f   n |  i o- | |  i j o t d |  i | f   n9 |  i o- | |  i j o t d |  i | 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"(   R@   R*   R   R   R   R   (   R   R   (    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyR#   $  s      (   R$   R%   t   __doc__R:   R    R#   (    (    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyR     s   t   Aggt   backend_fallbackt   maskedarrayt   datapatht   unitst   interactivet   UTCt   timezones   verbose.levels
   sys.stdouts   verbose.fileog      ?s   lines.linewidtht   -s   lines.linestyleR;   s   lines.colors   lines.markerg      ?s   lines.markeredgewidthi   s   lines.markersizes   lines.antialiaseds   lines.dash_joinstyles   lines.solid_joinstyles   lines.dash_capstyles   lines.solid_capstyles   patch.linewidthR   s   patch.edgecolors   patch.facecolors   patch.antialiaseds
   sans-serifs   font.familyt   normals
   font.styles   font.variants   font.stretchs   font.weightg      (@s	   font.sizes   Bitstream Vera Serifs   DejaVu Serifs   New Century Schoolbooks   Century Schoolbook Lt   Utopias   ITC Bookmant   Bookmans   Nimbus Roman No9 Ls   Times New Romant   Timest   Palatinot   Chartert   serifs
   font.serifs   Bitstream Vera Sanss   DejaVu Sanss   Lucida Grandet   Verdanat   Genevat   Lucidt   Arialt	   Helveticas   Avant Gardes   font.sans-serifs   Apple Chanceryt   Textiles   Zapf Chanceryt   Sandt   cursives   font.cursives   Comic Sans MSt   Chicagot   Charcoalt   ImpactWesternt   fantasys   font.fantasys   Bitstream Vera Sans Monos   DejaVu Sans Monos   Andale Monos   Nimbus Mono Ls   Courier Newt   Couriert   Fixedt   Terminalt	   monospaces   font.monospaces
   text.colors   text.usetexs   text.latex.unicodeRe   s   text.latex.preambles   text.dvipnghacks   text.fontstyles   text.fontangles   text.fontvariants   text.fontweightRy   s   text.fontsizes   mathtext.cals   mathtext.rms   mathtext.tts   serif:italics   mathtext.its
   serif:bolds   mathtext.bfs   sans\-serifs   mathtext.sfs   mathtext.fontsets   mathtext.fallback_to_cmRv   s   image.aspectt   bilinears   image.interpolationt   jets
   image.cmapi   s	   image.lutt   uppers   image.origins   image.resamples   contour.negative_linestyles   axes.axisbelows	   axes.holdt   ws   axes.facecolors   axes.edgecolors   axes.linewidthRz   s   axes.titlesizes	   axes.grids   axes.labelsizes   axes.labelcolorii   i   s   axes.formatter.limitss   axes.unicode_minuss   polaraxes.grids   legend.fancyboxs
   legend.locs   legend.isaxess   legend.numpointss   legend.fontsizes   legend.markerscales   legend.shadowg?s   legend.borderpads   legend.labelspacingg       @s   legend.handlelengthg?s   legend.handletextpads   legend.borderaxespads   legend.columnspacingi   s   xtick.major.sizes   xtick.minor.sizes   xtick.major.pads   xtick.minor.pads   xtick.colors   xtick.labelsizet   ins   xtick.directions   ytick.major.sizes   ytick.minor.sizes   ytick.major.pads   ytick.minor.pads   ytick.colors   ytick.labelsizes   ytick.directions
   grid.colort   :s   grid.linestyles   grid.linewidthg       @g      @s   figure.figsizeiP   s
   figure.dpis   0.75s   figure.facecolors   figure.edgecolors   figure.autolayoutg      ?i    i   R   R   s   figure.subplot.leftg?s   figure.subplot.rightg?s   figure.subplot.bottoms   figure.subplot.topg?s   figure.subplot.wspaces   figure.subplot.hspaceid   s   savefig.dpis   savefig.facecolors   savefig.edgecolors   savefig.orientations   cairo.formats   tk.window_focuss   tk.pythoninspects   ps.papersizes	   ps.useafms   ps.usedistillerip  s   ps.distiller.resi   s   ps.fonttypes   pdf.compressions   pdf.inheritcolors   pdf.use14corefontss   pdf.fonttypes   svg.image_inlines   svg.image_noscales   svg.embed_char_pathss   docstring.hardcopys   .matplotlib_pluginss   plugins.directorys   path.simplifys   agg.path.chunksizet   __main__t   /s   %s: %s != %s(    (    (    (    (1   R   R'   RU   t   matplotlib.fontconfig_patternR    t   matplotlib.colorsR   t   interactive_bkt   non_interactive_bkt   all_backendsR   R+   R<   R?   RA   RC   RI   R:   RL   RM   t   validate_numerixt   validate_toolbarRX   RY   Rc   Ro   Rq   t   validate_orientationRw   R}   R~   t   validate_fontsett   validate_verboset   validate_cairo_formatt   validate_ps_papersizeR   t   validate_joinstylet   validate_capstyleR   R   t   validate_legend_locR   R&   R>   R9   t   defaultParamsR$   t   rcR   (    (    (    sB   P:\graphics\Tools\Python26\lib\site-packages\matplotlib\rcsetup.pyt   <module>   s  
				
													!'							

		
"""""" +