
    G8cd                        d 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 ddlmZmZ ddlmZ dd	lmZmZ dd
lmZmZ g dZg dZeez   Z G d d      Z e       ddddd       Z d Z! e e!      Z"d Z#d Z$d Z%d Z&dddZ' e'e(      Z) e'e(d      Z* e e)d      Z+ e'e,      Z- e'e,d      Z. e'e/      Z0 e'e/d      Z1 e e0d      Z2d Z3d Z4 eded       Z5 e6       Z7d! Z8d" Z9d# Z:d$ Z;d% Z<d& Z=d' Z> e e>dd()      Z?d* Z@d+ ZAd, ZBd- ZC e eC      ZDd. ZEd/ ZFd0 ZGd1 ZHd2 ZId3 ZJ ed4g  ej                          ej                         d5d6d7d8d       ZMd9 ZN ed:g d;      ZO e eO      ZPd< ZQ e eQ      ZRd= ZSd> ZTd? ZUd@ ZVeUeVdAZWdB ZX e eX      ZY e e2      ZZi dC e e<dD      dEe2d4 e eN      dFe?dGe?dH e e      dI e e      dJePdKe?dLe2dMe2dNe?dOeRdPe2dQe+dReYdSeZZ[dCdEd4dFdGdKdNdMdLdT	Z\dU Z G dV dWej                        Z^dX Z_dY Z` G dZ d[ea      Zbd\ Zci de8d]e$d^e9d_e$d`e)dae-dbe)dce$dde-dee0dfeNdge>dhe)die;dje;dke0dle0i dme$dnedoedpedqedre2dse2dte2due$d:eOdvg dwdxe$dye0dze>d{e$d|e>d}e$i d~e>de0de`de$de$deIde.de$de$de$de$de$de$de>de)de;de>i de0de0deNde0de>de0deNde>de0deNde>de0deNde>de0deNde>i de)de>de>de0deNde0de+de)de)deFdeEde0de+de+de+de+de+i de>de$de)dg dde-de-de$de$deGdeGdeGdeGdeGdeGdg ddg dâdeHi deAde)de@de-dddgde$de$deNde$de1dg dҢde0dg dբdg dעde%de>de>i de0de$de$de$de$deCdg dբdeEde;de1de0de$dg ddg ddeCde0deEi de>d e e-d      de$de$de-de$de-de$de_dddgdeWd   deWd   deWd   d e$de$de)de)i de#de)de)de)de)d	e)d
e)de)dddgde$de$d ebg d      de-de-deCdeBde=i de0de$de$de1de0de0de0de0d e0d!e0d"e0d#e:d$e:d%e$d&e$d'e$d(e$i d)e0d*e0d+e0d,e0d-e0d.e0d/e>d0e:d1e$d2e$d3e$d4e$d5e$d6eCd7g d8d9g d:d;e$i d<e$d=e$d>e$d?e0d@e0dAe0dBe0dCe0dDe0dEe>dFe:dGe$dHe$dIe$dJe$dKe$dLeCi dMg d8dNg dOdPe>dQeNdRe0dSe0dTeCdUeEdVeCdWeEdX e e0d      dYe0dZe>d[e>d\e$d]e$d^e-i d_e$d`eWd   daeWd   dbeWd   dceWd   ddeWde   dfeWde   dge$dheWde   dieWde   dje0dke0dle&dme;dne;dodpdqgdre)i dseSdte0due3dve$dwe$dx ebddydzd{gd|D  cg c]  }  edd}      D ]  }|  | 
  c}}       d~e$deJde-de4de-de$de$de4dg dde$de)i de$dd6dgde*de$de$deWd   de$deTde"de-de+de+de+de+de+de+de+i de+de+de+de+de+de+de+de+dg dde0de)de)de-dg dde3de+de3e+e$dZeddiZfeej                         D ci c]  \  }}| ec||       c}}Zeyc c}} w c c}}w (  ak  
The rcsetup module contains the validation code for customization using
Matplotlib's rc settings.

Each rc setting is assigned a function used to validate any attempted changes
to that setting.  The 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.

The default values of the rc settings are set in the default matplotlibrc file.
Any additions or deletions to the parameter set listed here should also be
propagated to the :file:`matplotlibrc.template` in Matplotlib's root source
directory.
    N)	lru_cachereduce)Number)_apicbook)	ls_mapper)Colormapis_color_likeparse_fontconfig_pattern)	JoinStyleCapStyle)Cyclercycler)GTK3Agg	GTK3CairoGTK4Agg	GTK4CairoMacOSXnbAggQtAggQtCairoQt5AggQt5CairoTkAggTkCairoWebAggWXWXAggWXCairo)aggcairopdfpgfpssvgtemplatec                        e Zd ZddddZd Zy)ValidateInStringsN)_deprecated_sincec                |    || _         | _        || _        fd}|D ci c]  } ||      | c}| _        yc c}w )z#*valid* is a list of legal strings.c                 ,    r| j                         S | S N)lower)s
ignorecases    4/usr/lib/python3/dist-packages/matplotlib/rcsetup.pyfuncz(ValidateInStrings.__init__.<locals>.func;   s    wwy     N)keyr0   r*   valid)selfr4   r5   r0   r*   r2   ks      `   r1   __init__zValidateInStrings.__init__4   s?     $!2	
 +00Qd1gqj0
0s   9c                 ~     j                   rE fdt               j                         D        \  }t        j                   j                   |d        j
                  r t        |t              r|j                         }| j                  v r j                  |   S |d j                   dg  j                  j                          }t        |t              rZ|j                  d      r|j                  d      s"|j                  d      r'|j                  d      r|dd	  j                  v r|d
z  }t        |      )Nc              3   2   K   | ]  \  }}|u s|  y wr-    ).0r7   vr6   s      r1   	<genexpr>z-ValidateInStrings.__call__.<locals>.<genexpr>D   s     B41aT	QBs   function)nameobj_typez is not a valid value for z; supported values are "'   z'; remove quotes surrounding your string)r*   globalsitemsr   warn_deprecatedr0   
isinstancestrr.   r5   r4   values
startswithendswith
ValueError)r6   r/   r@   msgs   `   r1   __call__zValidateInStrings.__call__B   s   !!B79??#4BED  &&TJH??z!S1	A

?::a= 0
 ;,

))+,-/q#\\#&1::c?S)ajjoaGtzz)<<Cor3   F)__name__
__module____qualname__r8   rP   r;   r3   r1   r)   r)   3   s    1#'1r3   r)   F)ndocc                l     fd}	 dj                   j                        |_        |j                  j                  dd      d   dz   |j                  z   |_        |	||_        |S  j                  |_        |S # t        $ r, dj                  t               j                        |_        Y w xY w)Nc                 z   t        | t              rD	 | j                  d      D cg c](  }|j                         r |j                               * }}nat        j                  |       r>t        | t        t        f      s(| D cg c]  }t        |t              r|r |       }}nt        d|        +t        |      k7  rt        d dt        |       d|        |S c c}w # t        $ rA r;| D cg c])  }|j                         s |j                               + nc c}w }}n Y }w xY wc c}w )N,z0Expected str or other non-set iterable, but got z	Expected z values, but there are z values in )rI   rJ   splitstrip	Exceptionnpiterableset	frozensetrN   len)r/   r=   valallow_stringlistrU   scalar_validators      r1   fz_listify_validator.<locals>.fX   s?   a	<=GGCL %q'') (	2 % % [[^Jq3	2B$C
 12 31$Q, $A& 3C 3 B1#FH H=SX]A35c#hZ{1#NP P
1% # ABO1QWWY+AGGI6OOCO P	3s:   C+ -C&C+ !D8&C+ +D5:D)D)(
D54D5z{}listz{}List.rD   r   )formatrR   AttributeErrortyperT   rsplit__doc__)rd   rc   rU   rV   re   s   ```  r1   _listify_validatorrl   U   s    :F__%5%>%>?
 ^^**3215;ajjHANAIH -=,D,DAIH	  F__T*:%;%D%DE
Fs    A> >2B32B3c                     | S r-   r;   r/   s    r1   validate_anyro   ~   s    Hr3   c                 h    	 t        j                  |        | S # t        $ r t        | d      w xY w)Nz: should be a string that can be parsed by numpy.datetime64)r]   
datetime64rN   rn   s    r1   _validate_daterr      sD    P
a PeMNP 	PPs    1c                 t    t        | t              r| j                         } | dv ry| dv ryt        d| d      )zConvert b to ``bool`` or raise.)tyyesontrue1rD   TT)re   rU   noofffalse0r   FFzCannot convert z to boolrI   rJ   r.   rN   )bs    r1   validate_boolr      sC    !SGGI99	
=	=?1%x899r3   c                     	 t        |       S # t        $ r t        | t              r| dk(  rY yY nw xY wt        | d      )Nlinez0 cannot be interpreted as True, False, or "line")r   rN   rI   rJ   rn   s    r1   validate_axisbelowr      sS    Q aF{ u / / 0 0s   
 00c                 n    | dk(  r| S 	 t        |       S # t        $ r}t        | d| d      |d}~ww xY w)z<Confirm s is string 'figure' or convert s to float or raise.figurez. is not string "figure" and could not convert z	 to floatNfloatrN   r/   es     r1   validate_dpir      sU    H}EQx EA5 !../U)= >CD	EEs   
 	4/4)
allow_nonec                      fd}d j                    |_         r|xj                   dz  c_         |j                  j                  dd      d   dz   |j                   z   |_        |S )zp
    Return a validator that converts inputs to *cls* or raises (and possibly
    allows ``None`` as well).
    c                 *   r&| #t        | t              r| j                         dk(  ry t        u r't        | t              st        j                  dd       	  |       S # t
        t        f$ r!}t        d| dj                         |d }~ww xY w)Nnonez3.5zSupport for setting an rcParam that expects a str value to a non-str value is deprecated since %(since)s and support will be removed %(removal)s.)messagezCould not convert z to )rI   rJ   r.   r   rH   	TypeErrorrN   rR   )r/   r   r   clss     r1   	validatorz'_make_type_validator.<locals>.validator   s    jC0QWWY&5H#:jC0    ;<	Eq6M:& 	E$QEcll^<>CDE	Es   A" "B1BB	validate__or_Nonerf   rD   r   )rR   rT   rj   )r   r   r   s   `` r1   _make_type_validatorr      sk    E %S\\N3Ij(%%c1-a0369K9KK r3   Tzreturn a list of strings)rV   zreturn a list of floatsc                     t        | t        t        j                  f      rt        j                  |       S t        |       S r-   )rI   rJ   osPathLikefsdecodevalidate_stringrn   s    r1   _validate_pathliker      s0    !c2;;'( {{1~q!!r3   c                 .   ddd}	 t        |       }||j                         vr%t        dt        |j                               z        |S # t        $ r@ 	 || j	                            cY S # t
        $ r}t        dt        |      z        |d}~ww xY ww xY w)z`
    Confirm that this is a Postscript or PDF font type that we know how to
    convert to.
       *   )type3truetypez*Supported Postscript/PDF font types are %sN)validate_intrK   rN   listr.   KeyError)r/   	fonttypesfonttyper   s       r1   validate_fonttyper      s    
 !I? 9++--<Y%%'()* *   7	7QWWY'' 	7I#I/ 0567	77s/   A 	BA*'B*	B3BBBbackendr0   c                 V    | t         u s| j                  d      r| }|S t        |       }|S )Nz	module://)_auto_backend_sentinelrL   _validate_standard_backends)r/   r   s     r1   validate_backendr      s:    ((ALL,E  N )+  Nr3   c                 f     t        dg dd      |       } | dk(  rt        j                  d       | S )Ntoolbar)Nonetoolbar2toolmanagerTr   r   zyTreat the new Tool classes introduced in v1.5 as experimental for now; the API and rcParam may change in future versions.)r)   r   warn_externalrn   s    r1   _validate_toolbarr     sH    	I64	IIJ	LAMJ	K Hr3   c                 H    t        j                  | d      r| S t        |       S )Return a valid color arg.inheritr   
_str_equalvalidate_colorrn   s    r1   validate_color_or_inheritr     s"    9%!r3   c                 H    t        j                  | d      r| S t        |       S )Nautor   rn   s    r1   validate_color_or_autor     s"    6"!r3   c                     t        | t              r%t        j                  d|       rt	        d| d      t        |       S )Nz^C[0-9]$zCannot put cycle reference (z) in prop_cycler)rI   rJ   rematchrN   r   rn   s    r1   validate_color_for_prop_cycler     s:    !Sbhhz157u<LMNN!r3   c                    t        j                  | d      r| S t        j                  | d      st        j                  | d      ryt        j                  | d      st        j                  | d      ry| y t        | t              rt	        |       dk(  st	        |       dk(  r&d| z   }t        |      r|S | j                         d	k(  ry t        |       r| S t        | d
      )N	linecolormfcmarkerfacecolormecmarkeredgecolor      #r    does not look like a color arg)r   r   rI   rJ   ra   r
   r.   rN   )r/   stmps     r1   _validate_color_or_linecolorr   !  s    ;'			!U	#u'7'7;L'M 			!U	#u'7'7;L'M 	
	As	A!s1v{QwK779	q	
u;<
==r3   c                 L   t        | t              rB| j                         dk(  ryt        |       dk(  st        |       dk(  rd| z   }t	        |      r|S t	        |       r| S 	 t        j                  |       }t	        |      r|S t        | d      # t        t        f$ r Y w xY w)r   r   r   r   r   r   )	rI   rJ   r.   ra   r
   astliteral_evalSyntaxErrorrN   )r/   r   colors      r1   r   r   6  s    !S779q6Q;#a&A+7DT"Q  # L
u;<
== $ s   !B B#"B#zreturn a list of colorspecs)rc   rV   c                 H    t        j                  t        t        f|        | S )N)cmap)r   check_isinstancerJ   r	   rn   s    r1   _validate_cmapr   S  s    3/2Hr3   c                 `    | dv r| S 	 t        |       S # t        $ r}t        d      |d }~ww xY w)N)r   equalz not a valid aspect specificationr   r   s     r1   validate_aspectr   X  s?    DQx D;<!CDs   
 	-(-c                 (    | | dk(  ry t        |       S )Nr   )validate_fontsizern   s    r1   validate_fontsize_Noner   a  s    yAK ##r3   c                     g d}t        | t              r| j                         } | |v r| S 	 t        |       S # t        $ r&}t	        | ddj                  |      d      |d }~ww xY w)N)	zxx-smallzx-smallsmallmediumlargezx-largezxx-largesmallerlargerz0 is not a valid font size. Valid font sizes are z, rf   )rI   rJ   r.   r   rN   join)r/   	fontsizesr   s      r1   r   r   h  sp    =I!SGGII~GQx G&'9)=? @EF	GGs   
7 	A& !A!!A&c                 z    g d}| |v r| S 	 t        |       S # t        t        f$ r}t        |  d      |d }~ww xY w)N)
ultralightlightnormalregularbookr   romansemibolddemibolddemiboldheavyz
extra boldblackz is not a valid font weight.intrN   r   )r/   weightsr   s      r1   validate_fontweightr   y  sS    PG 	G|D1v	" DA3:;<!CD   
 :5:c                 z    g d}| |v r| S 	 t        |       S # t        t        f$ r}t        |  d      |d }~ww xY w)N)	zultra-condensedzextra-condensed	condensedzsemi-condensedr   zsemi-expandedexpandedzextra-expandedzultra-expandedz is not a valid font stretch.r   )r/   stretchvaluesr   s      r1   validate_fontstretchr     sS    M
 	ME1v	" EA3;<=1DEr   c                     t        |        | S r-   r   rn   s    r1   validate_font_propertiesr     s    QHr3   c                     g d}t        | t              r| j                         } | | dk(  ry | j                         |v r| S t        |  ddj	                  |       d      )N)cmstixstixsansr   zB is not a valid fallback font name. Valid fallback font names are rY   z(. Passing 'None' will turn fallback off.)rI   rJ   r.   rN   r   )r/   _fallback_fontss     r1   _validate_mathtext_fallbackr    sm    0O!SGGIyAK	
o	%c /23 4 	r3   c                     	  t        t        d      |       S # t        t        f$ r, 	 t	        |       cY S # t        $ r}t        d      |d }~ww xY ww xY w)N   rU   z1Not a valid whisker value [float, (float, float)])rl   validate_floatr   rN   r   r   s     r1   validate_whiskersr    sc    76!.A6q99z" 7	78O 	7 / 0567	77s(    A
6A	AAAAc                 t    t        | t              r| j                         } | dv ry  t        dddg      |       S )N)r   Nr|   Fps.usedistillerghostscriptxpdf)rI   rJ   r.   r)   rn   s    r1   validate_ps_distillerr    s>    !SGGI**L !2]F4KLQOOr3   	linestyler   r     c                    t        | t              r	 t        |       S d } ||       rZt        |       dk(  r || d         r| \  }}nd}| }t        |t              r't        |      dz  dk(  rt        d |D              r||fS t        d| d      # t        $ r Y nw xY w	 t	        j
                  |       } # t        t        f$ r Y w xY w)zf
    A validator for all possible line styles, the named ones *and*
    the on-off ink sequences.
    c                 h    t        j                  |       xr t        | t        t        t
        f       S r-   )r]   r^   rI   rJ   bytes	bytearray)xs    r1   _is_iterable_not_string_likez9_validate_linestyle.<locals>._is_iterable_not_string_like  s(     {{1~LjS%4K&L"LLr3   r  rD   r   c              3   <   K   | ]  }t        |t                y wr-   )rI   r   )r<   elems     r1   r>   z&_validate_linestyle.<locals>.<genexpr>  s     CT
40C   z
linestyle z$ is not a valid on-off ink sequence.)
rI   rJ   _validate_named_linestylerN   r   r   r   ra   r   all)lsr  offsetonoffs       r1   _validate_linestyler    s    
 "c	,R00M
 $B'r7a<8A?MFE FEvv&JNa'CUCCE?"
z"'KL
MM5  			!!"%BZ( 		s#   
B 	BB!B7 7C	C	zmarkers.fillstyle)fullleftrightbottomtopr   c           	      b   t        | t        t        t        t	        d      f      r| S t        | t
              r?t        |       dk(  r&t        d | D              st        d | D              r| S t        d      t        | t              rt        d | D              r| S t        d      t        d      )	a  
    Validate the markevery property of a Line2D object.

    Parameters
    ----------
    s : None, int, (int, int), slice, float, (float, float), or list[int]

    Returns
    -------
    None, int, (int, int), slice, float, (float, float), or list[int]
    Nr  c              3   <   K   | ]  }t        |t                y wr-   rI   r   r<   r   s     r1   r>   z%validate_markevery.<locals>.<genexpr>  s     7As+7r  c              3   <   K   | ]  }t        |t                y wr-   )rI   r   r(  s     r1   r>   z%validate_markevery.<locals>.<genexpr>  s     <QJq%0<r  z3'markevery' tuple must be pair of ints or of floatsc              3   <   K   | ]  }t        |t                y wr-   r'  r(  s     r1   r>   z%validate_markevery.<locals>.<genexpr>
  s     -az!S!-r  z3'markevery' list must have all elements of type intz!'markevery' is of an invalid type)
rI   slicer   r   ri   tuplera   r  r   r   rn   s    r1   validate_markeveryr-    s     !eUCd45!UFaK7Q77<!<<HEG G !T-1--HEG G
7
88r3   c                     t        | t              r(| j                         } | dk(  r| S | dk(  ry t        d      | t        d      | S )Ntightstandardz$bbox should be 'tight' or 'standard'r~   rn   s    r1   validate_bboxr1    sO    !SGGI<H
??@@	
?@@Hr3   c                     t        | t              r| j                         } | dk(  s| y 	 t         t	        t
        d      |             S # t        $ r t        d      w xY w)Nr   r   r  z.Expected a (scale, length, randomness) triplet)rI   rJ   r.   r,  rl   r  rN   rn   s    r1   validate_sketchr3  #  sc    !SGGIF{aiK<'!<Q?@@ KIJJKs   A
 
Ac                 P    t        |       } d| cxk  rdk  r| S  t        d|        )Nr   rD   zValue must be >=0 and <1; got r  RuntimeErrorrn   s    r1   !_validate_greaterequal0_lessthan1r7  .  s6    qAAzz  ;A3?@@r3   c                 P    t        |       } d| cxk  rdk  r| S  t        d|        )Nr   rD   zValue must be >=0 and <=1; got r5  rn   s    r1   "_validate_greaterequal0_lessequal1r9  6  s6    qAA{{  <QC@AAr3   )
0 <= x < 10 <= x <= 1c                     t        | t              st        d      t        j                  t        |        t        |       h dz
  }|rt        dt        |      z        | S )z
    Validate a hatch pattern.
    A hatch pattern string can have any sequence of the following
    characters: ``\ / | - + * . x o O``.
    zHatch pattern must be a string)hatch_pattern>
   *Oor  +-rf   /\|zUnknown hatch symbol(s): %s)rI   rJ   rN   r   r   r_   r   )r/   unknowns     r1   validate_hatchrG  D  sV     a9::#Q/!fJJG6gFGGHr3   r   )rc   	linewidth	facecolor	edgecolor	joinstylecapstyle	fillstyler   
markersizemarkeredgewidthr   	markeveryalphamarkerhatchdashes)	clwr  fcecr   r   mewmsc                  @   | r|rt        d      | s|st        d      t        |       dk(  r,t        | d   t              st        d      t	        | d         S t        |       dk(  r| d   | d   fg}n)t        |       dkD  rt        d      |j                         }g }|D ]\  \  }}t        j                  ||      }t        j                  |d      }|t        d	|z         ||      }|j                  ||f       ^ t        t        j                  d
 |D              S )a!  
    Create 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
        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'])

    zEcycler() can only accept positional OR keyword arguments -- not both.z2cycler() must have positional OR keyword argumentsrD   r   zDIf only one positional argument given, it must be a Cycler instance.r  z+No more than 2 positional arguments allowedNzUnknown artist property: %sc              3   :   K   | ]  \  }}t        ||        y wr-   )ccycler)r<   r7   r=   s      r1   r>   zcycler.<locals>.<genexpr>  s      E41aA Es   )r   ra   rI   r   validate_cyclerrG   _prop_aliasesget_prop_validatorsappendr   operatoradd)argskwargspairs	validatedpropvals	norm_propr   s           r1   r   r   x  s3   j  1 2 	2&LMM
4yA~$q'6* 4 5 5tAw''	Taq'47#$	TQEFFI ,
d!%%dD1	$((D9	9D@AA 	)T*+, (,, E9 EFFr3   c                       e Zd Zd Zy)_DunderCheckerc                     |j                   j                  d      r&|j                   j                  d      rt        d      | j	                  |       y )N__z)cycler strings with dunders are forbidden)attrrL   rM   rN   generic_visit)r6   nodes     r1   visit_Attributez_DunderChecker.visit_Attribute  s?    99%$))*<*<T*BHII4 r3   N)rR   rS   rT   rs  r;   r3   r1   rm  rm    s    !r3   rm  c                    t        | t              r@	 t               j                  t	        j
                  |              t        | t        i d      } t        | t              r| }nt        d|       |j                  t        t              t        t              z  z
  }|rt        d|z        t               }|j                  D ]e  }t        j                  ||      }||k7  r ||j                  v rt        d|d|d      ||v rt        d	|d
|d      |j!                  |g       g t#        |      t#        |j                        k(  sJ |j                  D ]*  }t        j                  ||      }|j%                  ||       , |j'                         j)                         D ]  \  }}t        |   |        |S # t        $ r}t        | d|       |d}~ww xY w)z?Return a Cycler object from a string repr or the object itself.)r   __builtins__z% is not a valid cycler construction: Nz+Object is not a string or Cycler instance: zUnknown artist properties: %szCannot specify both z and alias z in the same prop_cyclez(Another property was already aliased to z. Collision normalizing rf   )rI   rJ   rm  visitr   parseevalr   BaseExceptionrN   r   keysr_   ra  r_  r`  updatera   
change_keyby_keyrG   )	r/   r   cycler_instunknownscheckerri  rk  r4   rj  s	            r1   r^  r^    s   !S	&""399Q<0Q62>?A !VFqeLMM3'7#83};M#MNH88CDD eG   $!%%dD1	k.>.>!>3I= $x'>@ A AG )},DTHAO P P	{#$ w<3{//0000    0!%%dD1	tY/0 !'')//1 $	Td#$ O  	&u$I!M $%&	&s   ?F> >	GGGc                     g d}t        | t              r| |v r| S 	 t        |       S # t        t        f$ r Y nw xY w	 t        |       S # t        $ r Y nw xY wt	        dj                  |            )N)r   sturgesfddoanescottricesqrtz='hist.bins' must be one of {}, an int or a sequence of floats)rI   rJ   r   r   rN   validate_floatlistrg   )r/   
valid_strss     r1   validate_hist_binsr    s    LJ!Sa:o1vz" !!$$ 
 --3VJ-?A As   
' 99
A 	AAc                       e Zd ZdZy)_ignorecasezAA marker class indicating that a list-of-str is case-insensitive.N)rR   rS   rT   rk   r;   r3   r1   r  r    s    Kr3   r  c                 b    t        |t              rt        |t              }t        | ||      S |S )Nr   )rI   r   r  r)   )r4   convr0   s      r1   _convert_validator_specr  #  s,    $k2
 dzBBr3   backend_fallbackr   interactivetimezonezwebagg.portzwebagg.addresszwebagg.open_in_browserzwebagg.port_retrieszlines.linewidthzlines.linestylezlines.colorzlines.markerzlines.markerfacecolorzlines.markeredgecolorzlines.markeredgewidthzlines.markersizezlines.antialiasedzlines.dash_joinstylezlines.solid_joinstylezlines.dash_capstylezlines.solid_capstylezlines.dashed_patternzlines.dashdot_patternzlines.dotted_patternzlines.scale_dasheszpcolor.shading)r   flatnearestgouraudzpcolormesh.snapzpatch.linewidthzpatch.edgecolorzpatch.force_edgecolorzpatch.facecolorzpatch.antialiasedzhatch.colorzhatch.linewidthz	hist.binszboxplot.notchzboxplot.verticalzboxplot.whiskerszboxplot.bootstrapzboxplot.patchartistzboxplot.showmeanszboxplot.showcapszboxplot.showboxzboxplot.showflierszboxplot.meanlinezboxplot.flierprops.colorzboxplot.flierprops.markerz"boxplot.flierprops.markerfacecolorz"boxplot.flierprops.markeredgecolorz"boxplot.flierprops.markeredgewidthzboxplot.flierprops.markersizezboxplot.flierprops.linestylezboxplot.flierprops.linewidthzboxplot.boxprops.colorzboxplot.boxprops.linewidthzboxplot.boxprops.linestylezboxplot.whiskerprops.colorzboxplot.whiskerprops.linewidthzboxplot.whiskerprops.linestylezboxplot.capprops.colorzboxplot.capprops.linewidthzboxplot.capprops.linestylezboxplot.medianprops.colorzboxplot.medianprops.linewidthzboxplot.medianprops.linestylezboxplot.meanprops.colorzboxplot.meanprops.markerz!boxplot.meanprops.markerfacecolorz!boxplot.meanprops.markeredgecolorzboxplot.meanprops.markersizezboxplot.meanprops.linestylezboxplot.meanprops.linewidthzfont.familyz
font.stylezfont.variantzfont.stretchzfont.weightz	font.sizez
font.serifzfont.sans-serifzfont.cursivezfont.fantasyzfont.monospacez
text.colorztext.usetexztext.latex.preambleztext.hinting)defaultno_autohintforce_autohint
no_hintingr   nativeeitherr   ztext.hinting_factorztext.kerning_factorztext.antialiasedztext.parse_mathzmathtext.calzmathtext.rmzmathtext.ttzmathtext.itzmathtext.bfzmathtext.sfzmathtext.fontset)
dejavusansdejavuserifr   r   r  customzmathtext.default)rmcalitttsfbfr  bbfrakscrr   zmathtext.fallbackzimage.aspectzimage.interpolationz
image.cmapz	image.lutzimage.originupperr.   zimage.resamplezimage.composite_imagezcontour.negative_linestylezcontour.corner_maskzcontour.linewidthzcontour.algorithm)mpl2005mpl2014serialthreadedzerrorbar.capsizezxaxis.labellocation)r!  centerr"  zyaxis.labellocation)r#  r  r$  zaxes.axisbelowzaxes.facecolorzaxes.edgecolorzaxes.linewidthzaxes.spines.leftzaxes.spines.rightzaxes.spines.bottomzaxes.spines.topzaxes.titlesizezaxes.titlelocationzaxes.titleweightzaxes.titlecolorzaxes.titleyzaxes.titlepadz	axes.gridzaxes.grid.which)minorbothmajorzaxes.grid.axis)r  ru   r  zaxes.labelsizezaxes.labelpadzaxes.labelweightzaxes.labelcolorzaxes.formatter.limitsr  r  zaxes.formatter.use_localezaxes.formatter.use_mathtextzaxes.formatter.min_exponentzaxes.formatter.useoffsetzaxes.formatter.offset_thresholdzaxes.unicode_minuszaxes.prop_cyclezaxes.autolimit_modedataround_numberszaxes.xmarginr;  zaxes.ymarginzaxes.zmarginzpolaraxes.gridzaxes3d.gridzscatter.markerzscatter.edgecolorsz
date.epochzdate.autoformatter.yearzdate.autoformatter.monthzdate.autoformatter.dayzdate.autoformatter.hourzdate.autoformatter.minutezdate.autoformatter.secondzdate.autoformatter.microsecondzdate.converterr   concisezdate.interval_multipleszlegend.fancyboxz
legend.loc)bestzupper rightz
upper leftz
lower leftzlower rightr"  zcenter leftzcenter rightzlower centerzupper centerr  zlegend.numpointszlegend.scatterpointszlegend.fontsizezlegend.title_fontsizezlegend.labelcolorzlegend.markerscalezlegend.shadowzlegend.frameonzlegend.framealphazlegend.borderpadzlegend.labelspacingzlegend.handlelengthzlegend.handleheightzlegend.handletextpadzlegend.borderaxespadzlegend.columnspacingzlegend.facecolorzlegend.edgecolorz	xtick.topzxtick.bottomzxtick.labeltopzxtick.labelbottomzxtick.major.sizezxtick.minor.sizezxtick.major.widthzxtick.minor.widthzxtick.major.padzxtick.minor.padzxtick.colorzxtick.labelcolorzxtick.minor.visiblezxtick.minor.topzxtick.minor.bottomzxtick.major.topzxtick.major.bottomzxtick.labelsizezxtick.direction)outininoutzxtick.alignment)r  r"  r!  z
ytick.leftzytick.rightzytick.labelleftzytick.labelrightzytick.major.sizezytick.minor.sizezytick.major.widthzytick.minor.widthzytick.major.padzytick.minor.padzytick.colorzytick.labelcolorzytick.minor.visiblezytick.minor.leftzytick.minor.rightzytick.major.leftzytick.major.rightzytick.labelsizezytick.directionzytick.alignment)r  r$  r#  baselinecenter_baselinez
grid.colorzgrid.linestylezgrid.linewidthz
grid.alphazfigure.titlesizezfigure.titleweightzfigure.labelsizezfigure.labelweightzfigure.figsizez
figure.dpizfigure.facecolorzfigure.edgecolorzfigure.frameonzfigure.autolayoutzfigure.max_open_warningzfigure.raise_windowzfigure.subplot.leftzfigure.subplot.rightzfigure.subplot.bottomzfigure.subplot.topzfigure.subplot.wspacer:  zfigure.subplot.hspacezfigure.constrained_layout.usez figure.constrained_layout.hspacez figure.constrained_layout.wspacezfigure.constrained_layout.h_padzfigure.constrained_layout.w_padzsavefig.dpizsavefig.facecolorzsavefig.edgecolorzsavefig.orientation	landscapeportraitzsavefig.formatzsavefig.bboxzsavefig.pad_incheszsavefig.directoryzsavefig.transparentztk.window_focuszps.papersizeletterlegalledgerab   z	ps.useafmr
  zps.distiller.reszps.fonttypezpdf.compressionzpdf.inheritcolorzpdf.use14corefontszpdf.fonttypezpgf.texsystem)xelatexlualatexpdflatexzpgf.rcfontszpgf.preamblezsvg.image_inlinezsvg.fonttypepathzsvg.hashsaltzdocstring.hardcopyzpath.simplifyzpath.simplify_thresholdz	path.snapzpath.sketchzpath.effectszagg.path.chunksizezkeymap.fullscreenzkeymap.homezkeymap.backzkeymap.forwardz
keymap.panzkeymap.zoomzkeymap.savezkeymap.quitzkeymap.quit_allzkeymap.gridzkeymap.grid_minorzkeymap.yscalezkeymap.xscalezkeymap.helpzkeymap.copyzanimation.html)html5jshtmlr   zanimation.embed_limitzanimation.writerzanimation.codeczanimation.bitratezanimation.frame_format)
pngjpegtiffrawrgbappmsgibmppbmr&   zanimation.ffmpeg_pathzanimation.ffmpeg_argszanimation.convert_path)zanimation.convert_args_internal.classic_moder  rQ   )hrk   r   	functoolsr   r   numbersr   rc  r   r   numpyr]   
matplotlibr   r   matplotlib.cbookr   matplotlib.colorsr	   r
   matplotlib._fontconfig_patternr   matplotlib._enumsr   r   r   r   r]  interactive_bknon_interactive_bkall_backendsr)   rl   ro   validate_anylistrr   r   r   r   r   rJ   r   validate_string_or_Nonevalidate_stringlistr   r   validate_int_or_Noner   r  validate_float_or_Noner  r   r   r   objectr   r   r   r   r   r   r   r   validate_colorlistr   r   r   r   validate_fontsizelistr   r   r   r  r  r  rz  rK   r  r  validate_fillstylevalidate_fillstylelistr-  validate_markeverylistr1  r3  r7  r9  _range_validatorsrG  validate_hatchlistvalidate_dashlistra  r_  NodeVisitorrm  r^  r  r   r  r  range_validators_hardcoded_defaultsrG   )r  ir7   r  s   0000r1   <module>r     s;    '   	 	  " & 5 C 1 -
=  22 D %4% %P%l3 P	:0E -2 : 's+.stD (35 #C(+CDA %e,-eE '13 ". 0|.  >*>2 (T/LN 
D$G ++<= 
DE
7P .EninnE)))+EVEVESE"E "NJ 'KM  ,,>? 9D ,,>? KAB 45  (7 &'9: #$A59; 	' 	'(;<	
 	' 	' 	'	2 	&x0 	+ 	- 	( 	- 	- 	+ 	#  	%!" 	##$ 	#% *    
RGj!S__ !8vA L$ Lw)ww *w 	w
 w lw ow mw lw ^w 0w ^w  _!w" 3#w$ 3%w& ^'w( ^)w* ]+w, Y-w. Y/w0 X1w2 X3w4 /5w6 /7w8 /9w: ];w@ +AwF <GwH }IwN ^OwP ^QwR ]SwT ^UwV ]Ww\ ~]w^ ~_wd #ewj =kwl =mwn ,owp /qwr =swt =uwv =wwx =ywz ={w| =}w@ .AwB  /CwD )*@EwF ).GwH ).IwJ $.KwL #*=MwN #.OwR .SwT !.UwV !"5WwZ !n[w\ %n]w^ %&9_wb .cwd !.ewf !"5gwj  ^kwl $^mwn $%8owr swt uwv (wwx (ywz #{w| ")<}w~ "wD *EwF GwH IwJ +KwL *MwN ~OwP *QwR *SwT *UwV *WwX *Yw^ >_w` =awb ?cwd  Newh <iwj <kwl =mwn =owr 7swt 7uwv 7wwx 7ywz 7{w| 7}w~   6wB   @CwF :GwJ _KwL _MwN ^OwP \QwR gw/SwT ]UwZ ][w` !"5awb -cwd "8ewf "Ngwl mwt 6uwv 6ww| /}w~ ^w@ ^AwB ^CwF ]GwH ]IwJ ]KwL ]MwP +QwR 5SwT -UwV 0WwZ 0[w^ ._w` -awb 4cwd ,ewf +gwh .iwj -kwl .mwr /Bswv  wwx "=yw| "<}w~ w@ &|AwB -CwH IwN FO4OwP %m4QwR %m4SwT %m4UwX mYwZ m[w` /awb /cwf .gwh oiwj okwl omwn oowp  oqwr  oswt %ouwx 	2yw| }}wB }CwD +  EwR \SwV \WwX .YwZ 3[w^ 9_wb ^cwd ]ewh ]iwl 3mwr ^swv ^wwz ^{w~ ^wB ^CwF ^GwJ ^KwL 6MwN 6OwT =UwV =WwX =YwZ =[w\ >]w^ >_w` >awb >cwd >ewf >gwh >iwj 4kwl =mwn =owp =qwr =swt =uwv ,wwx 1ywz 6{w~ =w@	 =A	wB	 =C	wD	 =E	wF	 >G	wH	 >I	wJ	 >K	wL	 >M	wN	 >O	wP	 >Q	wR	 >S	wT	 4U	wV	 =W	wX	 =Y	wZ	 =[	w\	 =]	w^	 =_	w`	 ,a	wb	 1c	wd	  Be	wj	 k	wl	 ,m	wn	 o	wp	 q	wx	 +y	wz	 -{	w@
 +A
wB
 -C
wH
 1.AFI
wJ
 ~K
wL
 ~M
wN
 ~O
wP
 }Q
wR
 }S
wT
 |U
wV
 }W
wZ
 .}=[
w\
 .}=]
w^
 .}=_
w`
 .}=a
wb
 .|<c
wd
 .|<e
wh
 $]i
wn
 '(9,(Go
wp
 '(9,(Gq
wt
 &~u
wv
 &~w
w|
 L}
w~
 2
w@ 2AwB [*5CwD OEwF MGwH NIwL .MwN MOwR }SwX +vx( 'L26(K,.b	(K;< ,.$qc
 (K
 (K'L MYw^ -_wb /cwd ,ewf +gwh ,iwj -kwn -owp +qwt 8uwv ]wwx _yw~ w@ VV$AwB +CwH -IwL }MwN 0?OwP }QwR SwT /UwV |Ww\ ,]w^ ,_w` ,awb ,cwd ,ewf ,gwh ,iwj ,kwl ,mwn ,owp ,qwr ,swt ,uwv ,wwx ,yw~ 9wD nEwF oGwH oIwJ lKwN  ;OwT 0UwX 1Yw\ 0]w` 2 ,mwt e  *//131d )!T22 3e(Kd3s   ];"^