
    
3j
#                        S r SSKrSSKrSSKrSSKrSSKJr  SSKrSSK	r
SSK	JrJrJrJr  \R                  " \5      r/ SQr\R&                  R)                  \
R*                  " 5       S5      r\R&                  R)                  \
R.                  " 5       S5      /rSr1 Skr\R6                  " S	R)                  \" S
R:                  \" \\R@                  S95      5      5      S 5       r!\RD                  SS j5       r#S r$\RJ                  " S5      S 5       r&S r'\RJ                  " S5      S 5       r(S r)\RJ                  " S5      S 5       r*\'" \5      r+0 r,/ r-S r.\." 5         g)a  
Core functions and attributes for the matplotlib style library:

``use``
    Select style sheet to override the current matplotlib settings.
``context``
    Context manager to use a style sheet temporarily.
``available``
    List available style sheets. Underscore-prefixed names are considered private and
    not listed, though may still be accessed directly from ``library``.
``library``
    A dictionary of style names and matplotlib settings.
    N)Path)_api
_docstringrc_params_from_filercParamsDefault)usecontext	availablelibraryreload_librarystylelibmplstyle>   backendtoolbartimezoneinteractivebackend_fallback
date.epochwebagg.portwebagg.addresstk.window_focussavefig.directorydocstring.hardcopyfigure.raise_windowwebagg.port_retrieswebagg.open_in_browserfigure.max_open_warning
z- {})keyc                    [        U [        [        45      (       d  [        U S5      (       a  U /nOU nSSS.nU GHZ  n [        U [        5      (       a  UR	                  X 5      n U S:X  aI  [
        R                  " 5          [         Vs0 s H  nU[        ;  d  M  U[        U   _M     n nSSS5        OdU [        ;   a
  [        U    n OPSU ;   aJ  U R                  S5      u  pEn [        R                  R                  U5      U S[         3-  n[        USS9n [        U [        [        45      (       a   [        U SS9n 0 n
U  H0  nU[        ;   a  [
        R&                  " S
U< S35        M*  X   X'   M2     [(        R*                  R-                  U
5        GM]     gs  snf ! , (       d  f       N= f! [         ["        [$        4 a
  n SnANSnAff = f! ["         a  n	[#        U < S	35      U	eSn	A	ff = f)aW  
Use Matplotlib style settings from a style specification.

The style name of 'default' is reserved for reverting back to
the default style settings.

.. note::

   This updates the `.rcParams` with the settings from the style.
   `.rcParams` not defined in the style are kept.

Parameters
----------
style : str, dict, Path or list

    A style specification. Valid options are:

    str
        - One of the style names in `.style.available` (a builtin style or
          a style installed in the user library path).

        - A dotted name of the form "package.style_name"; in that case,
          "package" should be an importable Python package name, e.g. at
          ``/path/to/package/__init__.py``; the loaded style file is
          ``/path/to/package/style_name.mplstyle``.  (Style files in
          subpackages are likewise supported.)

        - The path or URL to a style file, which gets loaded by
          `.rc_params_from_file`.

    dict
        A mapping of key/value pairs for `matplotlib.rcParams`.

    Path
        The path to a style file, which gets loaded by
        `.rc_params_from_file`.

    list
        A list of style specifiers (str, Path or dict), which are applied
        from first to last in the list.

Notes
-----
The following `.rcParams` are not related to style and will be ignored if
found in a style specification:

%s
keysdefaultclassic)mpl20mpl15N.Fuse_default_templatez is not a valid package style, path of style file, URL of style file, or library style name (library styles are listed in `style.available`)zStyle includes a parameter, z9, that is not related to style.  Ignoring this parameter.)
isinstancestrr   hasattrgetr   'suppress_matplotlib_deprecation_warningr   _STYLE_BLACKLISTr   
rpartition	importlib	resourcesfiles_STYLE_EXTENSIONr   ModuleNotFoundErrorOSError	TypeErrorwarn_externalmplrcParamsupdate)stylestylesstyle_aliaskpkg_namepathexcerrfiltereds              S/home/wildlama/miniconda3/lib/python3.13/site-packages/matplotlib/style/__init__.pyr   r   +   s   h %#t%%)?)?%	:KeS!!OOE1E	! AAC<K ;Oq !)9 9 3Q 22OE ; DC '!$//4
$..44S9tfAFVEW<XXD/5QE ec4[))I+EN A$$""21% 8B CD $h  	H%S ; DC ,Wi@    Ii  > ?@ FIIIsN   ?	FFF(F"5F03
GF
F-	0G
G
G1G,,G1c              #      #    [         R                  " 5          U(       a  [         R                  " 5         [        U 5        Sv   SSS5        g! , (       d  f       g= f7f)a  
Context manager for using style settings temporarily.

Parameters
----------
style : str, dict, Path or list
    A style specification. Valid options are:

    str
        - One of the style names in `.style.available` (a builtin style or
          a style installed in the user library path).

        - A dotted name of the form "package.style_name"; in that case,
          "package" should be an importable Python package name, e.g. at
          ``/path/to/package/__init__.py``; the loaded style file is
          ``/path/to/package/style_name.mplstyle``.  (Style files in
          subpackages are likewise supported.)

        - The path or URL to a style file, which gets loaded by
          `.rc_params_from_file`.
    dict
        A mapping of key/value pairs for `matplotlib.rcParams`.

    Path
        The path to a style file, which gets loaded by
        `.rc_params_from_file`.

    list
        A list of style specifiers (str, Path or dict), which are applied
        from first to last in the list.

after_reset : bool
    If True, apply style after resetting settings to their defaults;
    otherwise, apply style on top of the current settings.
N)r8   
rc_context
rcdefaultsr   )r;   after_resets     rF   r	   r	      s4     J 
	NNE
	 
		s   A,A	A
AAc                     [        [        R                  R                  [        5       H  n[        U5      n[        X5        M     U $ )z0Update style library with user-defined rc files.)maposrB   
expanduserUSER_LIBRARY_PATHS_read_style_directory_update_nested_dict)r   stylelib_pathr<   s      rF   _update_user_libraryrS      s8    RWW//1CD&}5G, E N    z3.11c                     [        U 5      $ N)rS   )r   s    rF   update_user_libraryrW      s    ((rT   c                 D   [        5       n[        U 5      R                  S[         35       H_  n[        R
                  " SS9 n[        USS9XR                  '   SSS5        W H#  n[        R                  SX$R                  5        M%     Ma     U$ ! , (       d  f       N== f)z3Return dictionary of styles defined in *style_dir*.z*.T)recordFr'   Nz	In %s: %s)dictr   globr3   warningscatch_warningsr   stem_logwarningmessage)	style_dirr<   rB   warnsws        rF   rP   rP      s    VFY$$r*:);%<=$$D1U 3Du UF99 2ALLdII6  >
 M	 21s   B
B	c                     [        U 5      $ rV   )rP   )rb   s    rF   read_style_directoryrf      s     ++rT   c                 z    UR                  5        H&  u  p#U R                  U0 5      R                  U5        M(     U $ )a  
Update nested dict (only level of nesting) with new values.

Unlike `dict.update`, this assumes that the values of the parent dict are
dicts (or dict-like), so you shouldn't replace the nested dict if it
already exists. Instead you should update the sub-dict.
)items
setdefaultr:   )	main_dictnew_dictrA   rc_dicts       rF   rQ   rQ      s8     ")T2&--g6 *rT   c                     [        X5      $ rV   )rQ   )rj   rk   s     rF   update_nested_dictrn      s    y33rT   c                      [         R                  5         [         R                  [        [        R                  5       5      5        [        S [          5       5      [        SS& g)zReload the style library.c              3   T   #    U  H  oR                  S 5      (       a  M  Uv   M      g7f)r@   N)
startswith).0rA   s     rF   	<genexpr>!reload_library.<locals>.<genexpr>   s     O74//#:N$$7s   (	(N)r   clearr:   rS   _base_librarycopysortedr
    rT   rF   r   r      s:    MMONN'(:(:(<=>O7OOIaLrT   )F)/__doc__
contextlibimportlib.resourcesr0   loggingrM   pathlibr   r\   
matplotlibr8   r   r   r   r   	getLogger__name__r_   __all__rB   joinget_data_path_BASE_LIBRARY_PATHget_configdirrO   r3   r.   SubstitutionrL   formatrx   r*   lowerr   contextmanagerr	   rS   
deprecatedrW   rP   rf   rQ   rn   rv   r   r
   r   ry   rT   rF   <module>r      sv      	    M M"
F WW\\#"3"3"5zB ggll3#4#4#6
CD  (  IIc&--(8cii!HIJb&b&J ( (V ) ) , , 4 4 &&89
	P  rT   