o
    i                  
   @   s  d Z ddlZddlmZmZ ddl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 ddlmZ dd	lmZmZ eeZg d
Zg dZee ZG dd dZe ddddddZ dd Z!e e!Z"dd Z#ej$ddddd Z%dd Z&e$ddd Z'd d! Z(d"d# Z)d$d% Z*dd&d'd(Z+e+e,Z-e+e,d)d&Z.e e-d*d+Z/e+e0Z1e+e0d)d&Z2e+e3Z4e+e3d)d&Z5e e4d,d+Z6d-d. Z7ed/ed)d0Z8e9 Z:d1d2 Z;ed3g d4d)dd5Z<e$ddd6d7Z=e$dd8d9 Z>e$dd:d; Z?d<d= Z@d>d? ZAd@dA ZBdBdC ZCe eCd)dDdEZDedFdGdHgddIZEdJdK ZFdLdM ZGdNdO ZHe eHZIdPdQ ZJdRdS ZKdTdU ZLdVdW ZMedXg dYddIZNedZd[O ddIZPed\g d]ddIZQd^d_ ZRe$dd`da ZSdbdc ZTeddg ded)dd5ZUdfdg ZVedhg eW eX didjdkdld)d0ZYdmdn ZZdodp Z[dqdr Z\dsdt Z]edug dvZ^e e\Z_e e]Z`e e^Zadwdx Zbe ebZcedyg dzd)dd5Zded{djd|gddIZee$dd}d~ Zfdd Zgedg dddIZhe$ddd Ziedg dddIZjedg dddIZkedg dddIZldd Zmdd Zndd Zodd ZpeoepdZqedg dddIZrdd Zse esZte e6Zui de eBd)dde6dhe eZdeDdeDde_de`deadeDde6de6deDdecde6de/detdeuZvdddhddddddd	Zwdd Zdd Zxdd Zye$ddd Zze$ddd Z{edg dddIZ|G dd de}Z~dd Zi d/e;de&d3e~g dde!de&de-de1de-de&de1de4deZdeCde-deAdeAde4i de4de&de\de\de]de]de6de6de6de&due^dg dբde4deCde&deCde&i deCde4deyde&de&deRde2de&de&de&de&de&de&deCde-deAdeCi de4de4deZde4deCde4deZdeCde4deZdeCde4deZdeCde4deZdeCi de-deCdeCd e4deZde4de/de-de-de-deJde4d	e/d
e/de/de/de/i deCde&de(de&degde1de1de&deKdeKdeKdeKdeKdeKdg dYdg ddeLi d eMd!eFd"e-d#e-d$e1d%d&d'gd(e&d)e&d*eZd+e&d,e5d-e4d.g dd/g d0d1e)d2eCd3eCi d4e4d5e&d6e&d7e&d8e&d9eHdg dd:eJd;eAd<e5d=e4d>e&d?g ddg dd@eHdAe4dBeJi dCeCdDe e1dEdFdGe&dHe&dIe1dJe&dKe1dLe&dMexdNdOdPgdQeqdR dSeqdR dTe&dUe&dVe-dWe-dXe#i dYe-dZe-d[e-d\e-d]e-d^e-d_e-d`e&dae~g dzdbe1dce1ddeHdeeGdfe4dge&dhe&die5i dje4dke4dle4dme4dne4doe4dpe4dqe@dre@dse&dte&due&dve&dwe4dxe4dye4dze4i d{e4d|e4d}eCd~e&de&de&de&de&deHde-dg dde&de&de&de&de4de4i de4de4de4de4deCde&de&de&de&de&deHde-dg d]deCdeZde4de4i deHdeJde e4dEdFde4deCdeCde&de&de1de&deqdR deqdR deqdR deqdR deqd deqd de&i deqd deqd de4de4de*deAdeAddGdHgde1deTdemde4de-de&de&de~ddddgdĐdń dD de&i deVde1de7de1de&de&de7dg dde&de(de&d{djd|gde.de&de&deqdR de&i dende"de1de/de/de/de/de/de/de/de/de/de/de/de/de/de/i de/de/dg dde4de-de-de1dg dde/de-de/de-de/de-de/de&de&Ze:ddg g ddgddd	Zdd e D ZdS (  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)	animationcbook)	ls_mapperparse_fontconfig_pattern)is_color_like)Cyclercycler)GTK3Agg	GTK3CairoMacOSXnbAggQt4AggQt4CairoQt5AggQt5CairoTkAggTkCairoWebAggWXWXAggWXCairo)aggcairopdfpgfpssvgtemplatec                   @   s$   e Zd ZdddddZdd ZdS )	ValidateInStringsFN_deprecated_sincec                   s6   || _ | _|| _fdd  fdd|D | _dS )z#*valid* is a list of legal strings.c                    s    r|   S | S N)lowers
ignorecase M/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/matplotlib/rcsetup.pyfunc:   s   z(ValidateInStrings.__init__.<locals>.funcc                    s   i | ]} ||qS r+   r+   ).0k)r-   r+   r,   
<dictcomp>?   s    z.ValidateInStrings.__init__.<locals>.<dictcomp>N)keyr*   r$   valid)selfr1   r2   r*   r$   r+   )r-   r*   r,   __init__3   s
   zValidateInStrings.__init__c                    s    j r fddt  D \}tj j |dd  jr | }| jv r* j| S |d j dg  j	  }t
|tr`|drI|dsS|dr`|dr`|d	d
  jv r`|d7 }t|)Nc                 3   s     | ]\}}| u r|V  qd S r%   r+   r.   r/   vr3   r+   r,   	<genexpr>C   s    z-ValidateInStrings.__call__.<locals>.<genexpr>function)nameobj_typez is not a valid value for z; supported values are "'   z'; remove quotes surrounding your string)r$   globalsitemsr   warn_deprecatedr*   r&   r2   r1   values
isinstancestr
startswithendswith
ValueError)r3   r(   r:   msgr+   r7   r,   __call__A   s0   


zValidateInStrings.__call__F)__name__
__module____qualname__r4   rJ   r+   r+   r+   r,   r"   2   s
    r"   F)ndocc                   s    fdd}z	d j|_W n ty#   d tj|_Y nw |jddd d |j |_|d ur<||_|S j|_|S )Nc                    s   t | tr*zfdd| dD }W n3 ty)    r&fdd| D }n Y nw t| r@t | ttfs@fdd| D }ntd|  d ur`t	|kr`td dt	| d	|  |S )
Nc                        g | ]}|  r |  qS r+   stripr.   r6   scalar_validatorr+   r,   
<listcomp>Z   s    z1_listify_validator.<locals>.f.<locals>.<listcomp>,c                    rQ   r+   rR   rT   rU   r+   r,   rW   `   s     c                    s"   g | ]}t |tr|r |qS r+   )rD   rE   rT   rU   r+   r,   rW   j   s
    z0Expected str or other non-set iterable, but got z	Expected z values, but there are z values in )
rD   rE   split	Exceptionnpiterableset	frozensetrH   len)r(   valallow_stringlistrO   rV   r+   r,   fW   s&   
	z_listify_validator.<locals>.fz{}listz{}List.r>   r   )formatrL   AttributeErrortyperN   rsplit__doc__)rV   rb   rO   rP   rc   r+   ra   r,   _listify_validatorT   s   rj   c                 C   s   | S r%   r+   r'   r+   r+   r,   validate_any}   s   rk   c                 C   s.   zt |  | W S  ty   t| dw )Nz: should be a string that can be parsed by numpy.datetime64)r[   
datetime64rH   r'   r+   r+   r,   _validate_date   s   
rm   3.2zos.path.exists)alternativec                 C   s(   | du rdS t j| r| S td|  )z$If s is a path, return s, else FalseNz+"%s" should be a path but it does not exist)ospathexistsRuntimeErrorr'   r+   r+   r,   validate_path_exists   s
   rt   c                 C   s6   t | tr	|  } | dv rdS | dv rdS td|  )zConvert b to ``bool`` or raise.tyyesontrue1r>   TTrc   rO   noofffalse0r   FFCould not convert "%s" to boolrD   rE   r&   rH   br+   r+   r,   validate_bool   s   
r   3.3c                 C   sJ   t | tr	|  } | du s| dkrdS | dv rdS | dv rdS td|  )z7Convert b to ``bool`` or raise, passing through *None*.Nnoneru   Tr|   Fr   r   r   r+   r+   r,   validate_bool_maybe_none   s   
r   c              
   C   s   | d u s| dkrt jddd dS zt| tr| W S t| r,t jddd d| W S t ty@ } ztd|  |d }~ww )	NNoner   zSupport for setting the 'text.latex.preamble' or 'pgf.preamble' rcParam to None is deprecated since %(since)s and will be removed %(removal)s; set it to an empty string instead.message zSupport for setting the 'text.latex.preamble' or 'pgf.preamble' rcParam to a list of strings is deprecated since %(since)s and will be removed %(removal)s; set it to a single string instead.
z Could not convert "%s" to string)	r   rB   rD   rE   r[   r\   join	TypeErrorrH   r(   er+   r+   r,   _validate_tex_preamble   s$   

r   c                 C   sl   zt | W S  ty/   t| tr-| dkrY dS |  dr-tjdd| dd Y dS Y nw td|  )Nliner   z&Support for setting axes.axisbelow to zh to mean 'line' is deprecated since %(since)s and will be removed %(removal)s; set it to 'line' instead.r   z2%s cannot be interpreted as True, False, or "line")r   rH   rD   rE   r&   rF   r   rB   r'   r+   r+   r,   validate_axisbelow   s$   


r   c              
   C   sF   | dkr| S zt | W S  ty" } zt| d| d|d}~w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floatrH   r   r+   r+   r,   validate_dpi   s   
r   )
allow_nonec                   sP    fdd}dj  |_  r| j d7  _ |jddd d |j  |_|S )zp
    Return a validator that converts inputs to *cls* or raises (and possibly
    allows ``None`` as well).
    c              
      sb    r| d u st | tr|  dkrd S z| W S  ty0 } ztd| dj |d }~ww )Nr   zCould not convert z to )rD   rE   r&   rH   rL   r   r   clsr+   r,   	validator   s   
z'_make_type_validator.<locals>.validator	validate__or_Nonerd   r>   r   )rL   rN   rh   )r   r   r   r+   r   r,   _make_type_validator   s   
r   Tzreturn a list of strings)rP   zreturn a list of floatsc                 C   s   ddd}zt | }W n& ty1   z	||   W  Y S  ty0 } z	tdt| |d}~ww w || vrBtdt|  |S )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_intrH   r&   KeyErrorlistrC   )r(   	fonttypesfonttyper   r+   r+   r,   validate_fonttype  s0   
r   backendr)   c                 C   s&   | t u s	| dr| }|S t| }|S )Nz	module://)_auto_backend_sentinelrF   _validate_standard_backends)r(   r   r+   r+   r,   validate_backend$  s   r   toolbar)r   toolbar2toolmanager)r*   r$   c                    s    fdd}|S )Nc              
      s   t | tr)dd | dD } dur(t| kr(td dt|  d|  ndurBt| krBtd dt|  d	|  z fd
d| D W S  tyc } z
tdj d|d}~ww )z,Convert *n* objects using ``cls``, or raise.c                 S   s   g | ]}|  qS r+   rR   )r.   xr+   r+   r,   rW   6  s    z;_make_nseq_validator.<locals>.validator.<locals>.<listcomp>rX   NzExpected exactly z! comma-separated values, but got z comma-separated values: z values, but got z	 values: c                    s$   g | ]} r
|d ur|n|qS r%   r+   )r.   r`   r   r+   r,   rW   A  s    z!Could not convert all entries to r(   )rD   rE   rY   r_   rH   rL   r   r   r   rO   r+   r,   r   3  s>   
z'_make_nseq_validator.<locals>.validatorr+   )r   rO   r   r   r+   r   r,   _make_nseq_validator0  s   r   c                 C   
   t t| S r%   )r   r   rO   r+   r+   r,   validate_nseq_floatJ     
r   c                 C   r   r%   )r   intr   r+   r+   r,   validate_nseq_intO  r   r   c                 C      t | dr| S t| S )Return a valid color arg.inheritr   
_str_equalvalidate_colorr'   r+   r+   r,   validate_color_or_inheritT  s   r   c                 C   r   )Nautor   r'   r+   r+   r,   validate_color_or_auto[  s   r   c                 C   s.   t | trtd| rtd| dt| S )Nz^C[0-9]$zCannot put cycle reference (z) in prop_cycler)rD   rE   rematchrH   r   r'   r+   r+   r,   validate_color_for_prop_cyclea  s   r   c              	   C   s   t | tr#|  dkrdS t| dkst| dkr#d|  }t|r#|S t| r)| S zt| }W n ttfy;   Y nw t|rB|S t| d)r   r         #z does not look like a color arg)	rD   rE   r&   r_   r
   astliteral_evalSyntaxErrorrH   )r(   stmpcolorr+   r+   r,   r   h  s"   
r   zreturn a list of colorspecs)rb   rP   orientation	landscapeportraitr#   c              
   C   s:   | dv r| S zt | W S  ty } ztd|d }~ww )N)r   equalz not a valid aspect specificationr   r   r+   r+   r,   validate_aspect  s   

r   c                 C   s   | d u s| dkr
d S t | S )Nr   )validate_fontsizer'   r+   r+   r,   validate_fontsize_None  s   r   c              
   C   sb   g d}t | tr|  } | |v r| S zt| W S  ty0 } ztd| d|f |d }~ww )N)	zxx-smallzx-smallsmallmediumlargezx-largezxx-largesmallerlargerz5%s is not a valid font size. Valid font sizes are %s.z, )rD   rE   r&   r   rH   r   )r(   	fontsizesr   r+   r+   r,   r     s   

r   c              
   C   sL   g d}| |v r
| S zt | W S  ttfy% } zt|  d|d }~ww )N)
ultralightlightnormalregularbookr   romansemibolddemibolddemiboldheavyz
extra boldblackz is not a valid font weight.)r   rH   r   )r(   weightsr   r+   r+   r,   validate_fontweight  s   
r   c                 C   s   t |  | S r%   r   r'   r+   r+   r,   validate_font_properties  s   r   c                 C   s<   t | tr	|  } | du s| dkrdS tjddd t| S )zB
    Temporary validate for fallback_to_cm, while deprecated

    Nr   r   zSupport for setting the 'mathtext.fallback_to_cm' rcParam is deprecated since %(since)s and will be removed %(removal)s; use 'mathtext.fallback : 'cm' instead.r   )rD   rE   r&   r   rB   r   r   r+   r+   r,   !_validate_mathtext_fallback_to_cm  s   
r   c                 C   sX   g d}t | tr|  } | d u s| dkrd S |  |v r| S t|  dd| d)N)cmstixstixsansr   zB is not a valid fallback font name. Valid fallback font names are rX   z(. Passing 'None' will turn fallback off.)rD   rE   r&   rH   r   )r(   _fallback_fontsr+   r+   r,   _validate_mathtext_fallback  s   
r   fontset)
dejavusansdejavuserifr   r   r   customdefaultz.rm cal it tt sf bf default bb frak scr regular	alignment)centertopbottombaselinecenter_baselinec                 C   sr   | dkrt jddd dS z	ttdd| W S  ttfy8   zt| W  Y S  ty7 } ztd|d }~ww w )Nrangern   zSupport for setting the boxplot.whiskers rcParam to 'range' is deprecated since %(since)s and will be removed %(removal)s; set it to 0, 100 instead.r      r   z:Not a valid whisker value ['range', float, (float, float)])r   rB   rj   validate_floatr   rH   r   r   r+   r+   r,   validate_whiskers  s"   r   c                 C   &   t | } | dkrtjddd d} | S Nr   rn   zSupport for setting the 'savefig.format' rcParam to 'auto' is deprecated since %(since)s and will be removed %(removal)s; set it to 'png' instead.r   pngvalidate_stringr   rB   valuer+   r+   r,   update_savefig_format  s   r  c                 C   r   r   r  r  r+   r+   r,   _update_savefig_format  s   r  ps_papersize)r   letterlegalledgera0a1a2a3a4a5a6a7a8a9a10b0b1b2b3b4b5b6b7b8b9b10c                 C   s0   t | tr	|  } | dv rd S tdddg| S )N)r   Nr   Fps.usedistillerghostscriptxpdf)rD   rE   r&   r"   r'   r+   r+   r,   validate_ps_distiller  s
   
r%  	linestyler   r    r   c              	   C   s"  t | tr'zt| W S  ty   Y nw zt| } W n ttfy&   Y nw dd }|| rpt| dkrpt | d tdt	frp|| d rpt| d d dkrpt
dd | d D rp| d du rntjd	d
d d| d f} | S || rt| d dkrt
dd | D rd| fS td| d)zf
    A validator for all possible line styles, the named ones *and*
    the on-off ink sequences.
    c                 S   s   t | ot| tttf S r%   )r[   r\   rD   rE   bytes	bytearray)r   r+   r+   r,   _is_iterable_not_string_like=  s   z9_validate_linestyle.<locals>._is_iterable_not_string_liker   r   Nr>   c                 s       | ]}t |tV  qd S r%   rD   r   r.   elemr+   r+   r,   r8   H      z&_validate_linestyle.<locals>.<genexpr>r   zPassing the dash offset as None is deprecated since %(since)s and support for it will be removed %(removal)s; pass it as zero instead.r   c                 s   r+  r%   r,  r-  r+   r+   r,   r8   S  r/  z
linestyle z$ is not a valid on-off ink sequence.)rD   rE   _validate_named_linestylerH   r   r   r   r_   rg   r   allr   rB   )lsr*  r+   r+   r,   _validate_linestyle.  sB   


r3  c                 C   sD   |   }| |kr |dv rtjddd |S |dv r tjddd |S )Nmiterroundbevelr   zCase-insensitive capstyles are deprecated since %(since)s and support for them will be removed %(removal)s; please pass them in lowercase.r   buttr6  
projectingzCase-insensitive joinstyles are deprecated since %(since)s and support for them will be removed %(removal)s; please pass them in lowercase.)r&   r   rB   )r(   s_lowr+   r+   r,   $_deprecate_case_insensitive_join_capX  s   
r<  c                 C      t | } tjg d| d | S )Nr4  )	joinstyler<  r   _check_in_listr'   r+   r+   r,   validate_joinstylei     rA  c                 C   r=  )Nr8  )capstyler?  r'   r+   r+   r,   validate_capstyleo  rB  rD  zmarkers.fillstyle)fullleftrightr   r   r   c                 C   s   t | ttttdfr| S t | tr0t| dkr,tdd | D s*tdd | D r,| S tdt | t	rDtdd | D r@| S tdtd	)
aB  
    Validate the markevery property of a Line2D object.

    Parameters
    ----------
    s : None, int, float, slice, length-2 tuple of ints,
        length-2 tuple of floats, list of ints

    Returns
    -------
    None, int, float, slice, length-2 tuple of ints,
        length-2 tuple of floats, list of ints

    Nr   c                 s   r+  r%   rD   r   r.   r   r+   r+   r,   r8     r/  z%validate_markevery.<locals>.<genexpr>c                 s   r+  r%   )rD   r   rI  r+   r+   r,   r8     r/  z3'markevery' tuple must be pair of ints or of floatsc                 s   r+  r%   rH  rI  r+   r+   r,   r8     r/  z3'markevery' list must have all elements of type intz!'markevery' is of an invalid type)
rD   slicer   r   rg   tupler_   r1  r   r   r'   r+   r+   r,   validate_markevery~  s&   

rL  
legend_loc)bestzupper rightz
upper leftz
lower leftzlower rightrG  zcenter leftzcenter rightzlower centerzupper centerr   zsvg.fonttyperq   c                 C   s   t | S r%   )_validate_hintingr'   r+   r+   r,   validate_hinting  s   rP  c                 C   s0   | dv rt jddd | S tdg ddd| S )	N)TFrn   zSupport for setting the text.hinting rcParam to True or False is deprecated since %(since)s and will be removed %(removal)s; set it to its synonyms 'auto' or 'none' instead.r   text.hinting)r   no_autohintforce_autohint
no_hintingr   nativeeitherr   Tr)   )r   rB   r"   r'   r+   r+   r,   rO    s   rO  zpgf.texsystem)xelatexlualatexpdflatexc                 C   s&   | t jjv r| S tdtt jj )Nz Supported animation writers are )r   writers_registeredrH   sortedr'   r+   r+   r,   validate_movie_writer  s
   
r]  zanimation.frame_format)r  jpegtiffrawrgbamajor)minorbothrb  zanimation.html)html5jshtmlr   c                 C   sF   t | tr|  } | dkr| S | dkrd S td| d ur!td| S )Ntightstandardz$bbox should be 'tight' or 'standard'r   r'   r+   r+   r,   validate_bbox  s   
ri  c                 C   sT   t | tr	|  } | dks| d u rd S ztttdd| W S  ty)   tdw )Nr   r   r   z.Expected a (scale, length, randomness) triplet)rD   rE   r&   rK  rj   r   rH   r'   r+   r+   r,   validate_sketch  s   
rj  c                 C   s.   t | } d|   krdk r| S  td|  )Nr   r>   zValue must be >=0 and <1; got r   rs   r'   r+   r+   r,   !_validate_greaterequal0_lessthan1  
   rl  c                 C   s.   t | } d|   krdkr| S  td|  )Nr   r>   zValue must be >=0 and <=1; got rk  r'   r+   r+   r,   "_validate_greaterequal0_lessequal1  rm  rn  )
0 <= x < 10 <= x <= 1zaxes.grid.axis)r   rw   rd  c                 C   sH   t | ts	tdtjt| d t| h d }|r"tdt| | 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>
   *rd   Oor   +-/\|zUnknown hatch symbol(s): %s)rD   rE   rH   r   _check_isinstancer]   r   )r(   unknownr+   r+   r,   validate_hatch  s   
r|  r   )rb   	linewidth	facecolor	edgecolorr>  rC  	fillstylemarkerfacecolor
markersizemarkeredgewidthmarkeredgecolor	markeveryalphamarkerhatchdashes)	clwr2  fcecmfcmecmewmsc                  O   s   | r|rt d| s|st dt| dkr't| d ts!t dt| d S t| dkr7| d | d fg}nt| dkrAt d| }g }|D ]%\}}t||}t|d}|du rct d	| ||}|	||f qIt
tjd
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 argumentsr>   r   zEIf only one positional argument given, it must  be a Cycler instance.r   z+No more than 2 positional arguments allowedNzUnknown artist property: %sc                 s   s    | ]
\}}t ||V  qd S r%   )ccyclerr5   r+   r+   r,   r8     s    zcycler.<locals>.<genexpr>)r   r_   rD   r   validate_cyclerrA   _prop_aliasesget_prop_validatorsappendr   operatoradd)argskwargspairs	validatedpropvals	norm_propr   r+   r+   r,   r   K  s,   5r   c           	   
   C   sh  t | tr1zd| ddv rtdt| ti d} W n ty0 } z	td| |f |d}~ww t | tr9| }ntd|  |jt	t
t	tB  }|rRtd	| t	 }|jD ]+}t||}||krq||jv rqtd
||||v r}td||||g qXt|t|jksJ |jD ]}t||}||| q|  D ]
\}}t
| | q|S )z?Return a Cycler object from a string repr or the object itself.z.__r'  r   zG'%s' seems to have dunder methods. Raising an exception for your safety)r   __builtins__z+'%s' is not a valid cycler construction: %sNz.object was not a string or Cycler instance: %szUnknown artist properties: %sz@Cannot specify both '{0}' and alias '{1}' in the same prop_cyclezKAnother property was already aliased to '{0}'. Collision normalizing '{1}'.)rD   rE   replacerH   evalr   BaseExceptionr   keysr]   r  r  r  re   updater_   
change_keyby_keyrA   )	r(   r   cycler_instunknownscheckerr  r  r1   r  r+   r+   r,   r    sP   



r  c              	   C   sl   g d}t | tr| |v r| S zt| W S  ttfy   Y nw zt| W S  ty.   Y nw td|)N)r   sturgesfddoanescottricesqrtz='hist.bins' must be one of {}, an int or a sequence of floats)rD   rE   r   r   rH   validate_floatlistre   )r(   
valid_strsr+   r+   r,   validate_hist_bins  s    

r  c                 C   s4   t jt| d ddlm} d|v r|d j  | S )N)rq   r   )moduleszmatplotlib.animation)r   rz  rE   sysr  rZ  	set_dirty)pr  r+   r+   r,   validate_animation_writer_path  s
   r  c              
   C   sN   | d ur#dd l }z||  W | S  |jy" } ztd|d }~ww td)Nr   z*'webagg.address' is not a valid IP address)socket	inet_atonerrorrH   )r(   r  r   r+   r+   r,   validate_webagg_address  s   r  zaxes.titlelocation)rF  r   rG  c                   @   s   e Zd ZdZdS )_ignorecasezAA marker class indicating that a list-of-str is case-insensitive.N)rL   rM   rN   ri   r+   r+   r+   r,   r    s    r  c                 C   s&   t |trt |t}t| ||dS |S )Nr)   )rD   r   r  r"   )r1   convr*   r+   r+   r,   _convert_validator_spec  s   

r  backend_fallback)r   r   r   datapath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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.preambletext.latex.previewrQ  ztext.hinting_factorztext.kerning_factorztext.antialiasedzmathtext.calzmathtext.rmzmathtext.ttzmathtext.itzmathtext.bfzmathtext.sfzmathtext.fontsetzmathtext.default)rmcalitttsfbfr   bbfrakscrr   mathtext.fallback_to_cmz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errorbar.capsizezxaxis.labellocationz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.titleweightzaxes.titlecolorzaxes.titleyzaxes.titlepadz	axes.gridzaxes.grid.whichz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.xmarginrp  zaxes.ymarginz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legend.fancyboxz
legend.loczlegend.numpointszlegend.scatterpointszlegend.fontsizezlegend.title_fontsizez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.minor.visiblezxtick.minor.topzxtick.minor.bottomzxtick.major.topzxtick.major.bottomzxtick.labelsizezxtick.directionzxtick.alignment)r   rG  rF  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.minor.visiblezytick.minor.leftzytick.minor.rightzytick.major.leftzytick.major.rightzytick.labelsizezytick.directionzytick.alignmentz
grid.colorzgrid.linestylezgrid.linewidthz
grid.alphazfigure.titlesizezfigure.titleweightz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.wspacero  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savefig.jpeg_qualityzsavefig.formatzsavefig.bboxzsavefig.pad_incheszsavefig.directoryzsavefig.transparentztk.window_focuszps.papersizer   r	  r
  r  c                 C   s&   g | ]}t d D ]}| | qqS )   )r   )r.   abir+   r+   r,   rW     s
    rW   r  z	ps.useafmr"  zps.distiller.reszps.fonttypezpdf.compressionzpdf.inheritcolorzpdf.use14corefontszpdf.fonttypezpgf.rcfontszpgf.preamblezsvg.image_inlinez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.xscalekeymap.all_axeszkeymap.helpzkeymap.copyzanimation.embed_limitzanimation.writerzanimation.codeczanimation.bitrateanimation.html_argszanimation.ffmpeg_pathzanimation.ffmpeg_argsanimation.avconv_pathanimation.avconv_argszanimation.convert_pathzanimation.convert_argszmpl_toolkits.legacy_colorbar_internal.classic_modeavconva_   )	r   r  r  r  r  r  r  r  r  c                 C   s   i | ]
\}}|t ||qS r+   )r  )r.   r/   r  r+   r+   r,   r0     s    r0   rK   )NF)ri   r   	functoolsr   r   loggingnumbersr   r  rp   r   numpyr[   
matplotlibr   r   matplotlib.cbookr   matplotlib.fontconfig_patternr	   matplotlib.colorsr
   r   r   r  	getLoggerrL   _loginteractive_bknon_interactive_bkall_backendsr"   rj   rk   validate_anylistrm   
deprecatedrt   r   r   r   r   r   r   rE   r  validate_string_or_Nonevalidate_stringlistr   r   validate_int_or_Noner   r   validate_float_or_Noner  r   r   objectr   r   validate_toolbarr   r   r   r   r   r   r   validate_colorlistvalidate_orientationr   r   r   validate_fontsizelistr   r   r   r   validate_fontsetrY   validate_mathtext_default_validate_alignmentr   r  r  validate_ps_papersizer%  r  rC   r0  r3  r<  rA  rD  validate_fillstylevalidate_joinstylelistvalidate_capstylelistvalidate_fillstylelistrL  validate_markeverylistvalidate_legend_locvalidate_svg_fonttyperP  rO  validate_pgf_texsystemr]  validate_movie_frame_fmtvalidate_axis_locatorvalidate_movie_html_fmtri  rj  rl  rn  _range_validatorsvalidate_grid_axisr|  validate_hatchlistvalidate_dashlistr  r  r  r  r  r  validate_axes_titlelocationr   r  r  _validators_hardcoded_defaultsrA   r+   r+   r+   r,   <module>   s\   
"(	






	
"*%






	
	
U>


	
!$'()*+./256789:;<=>@ABCDEFGIJKMNOQRSUVWYZ[\]^_bcdefghijklopqrstuvxyz{|}
~             	  
              
           !  #  $  %  &  (  )  *  +  -  /  0  
1  2  3  4  5  6  9  ;  <  >  ?  @  A  D  G  H  I  K  L  O  P  R  S  T  U  V  W  X  Y  \  ]  c  e  f  g  i  j  l  n  q  s  u  w  y  {  }  ~                             	    
                                                                                         !    "    #    $    %    &    '    (    
)    ,    -    .    /    3    4    7    8    9    :    ;    <    =    >    @    A    B    C    D    E    G    J    K    M    N    Q    R    S    
T    U    V    W    X    Z    [    ]    `
    c    e    f    g    h    i    k    l    n    o    p    s    t    u    x    z    {    |    }    ~                                             	      
                                                                                                !      #      %      '      )      +      -      3      7

