
    BhA>                         S r SSKrSSKrSSKJr  SSKJr  / SQr/ SQr/ SQr	  SS	 jr
S
 rS rS rSS jrSS jrSS jrSS jr " S S\5      r " S S\5      r " S S\5      rSS jrg)zGControl plot style and scaling using the matplotlib rcParams interface.    N)cycler   )palettes)		set_themesetreset_defaults
reset_orig
axes_style	set_styleplotting_contextset_contextset_palette)axes.facecoloraxes.edgecolor	axes.gridaxes.axisbelowaxes.labelcolorfigure.facecolor
grid.colorgrid.linestyle
text.colorxtick.colorytick.colorxtick.directionytick.directionlines.solid_capstylepatch.edgecolorpatch.force_edgecolor
image.cmapfont.familyfont.sans-serifxtick.bottom	xtick.top
ytick.leftytick.rightaxes.spines.leftaxes.spines.bottomaxes.spines.rightaxes.spines.top)	font.sizeaxes.labelsizeaxes.titlesizextick.labelsizeytick.labelsizelegend.fontsizelegend.title_fontsizeaxes.linewidthgrid.linewidthlines.linewidthlines.markersizepatch.linewidthxtick.major.widthytick.major.widthxtick.minor.widthytick.minor.widthxtick.major.sizeytick.major.sizextick.minor.sizeytick.minor.sizec                     [        X5        [        USU0S9  [        X%S9  Ub   [        R                  R                  U5        gg)ac  
Set aspects of the visual theme for all matplotlib and seaborn plots.

This function changes the global defaults for all plots using the
matplotlib rcParams system. The themeing is decomposed into several distinct
sets of parameter values.

The options are illustrated in the :doc:`aesthetics <../tutorial/aesthetics>`
and :doc:`color palette <../tutorial/color_palettes>` tutorials.

Parameters
----------
context : string or dict
    Scaling parameters, see :func:`plotting_context`.
style : string or dict
    Axes style parameters, see :func:`axes_style`.
palette : string or sequence
    Color palette, see :func:`color_palette`.
font : string
    Font family, see matplotlib font manager.
font_scale : float, optional
    Separate scaling factor to independently scale the size of the
    font elements.
color_codes : bool
    If ``True`` and ``palette`` is a seaborn palette, remap the shorthand
    color codes (e.g. "b", "g", "r", etc.) to the colors from this palette.
rc : dict or None
    Dictionary of rc parameter mappings to override the above.

Examples
--------

.. include:: ../docstrings/set_theme.rst

r    )rc)color_codesN)r   r   r   mplrcParamsupdate)contextstylepalettefont
font_scaler@   r?   s          `C:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\seaborn/rcmod.pyr   r   R   s@    J $e-.1	~B     c                      [        U 0 UD6  g)zm
Alias for :func:`set_theme`, which is the preferred interface.

This function may be removed in the future.
N)r   )argskwargss     rI   r   r   ~   s     tvrJ   c                  ^    [         R                  R                  [         R                  5        g)z*Restore all RC params to default settings.N)rA   rB   rC   rcParamsDefault rJ   rI   r   r      s    LL++,rJ   c                  N    SSK Jn   [        R                  R	                  U 5        g)z@Restore all RC params to original settings (respects custom rc).r   _orig_rc_paramsN) rS   rA   rB   rC   rR   s    rI   r	   r	      s    !LL(rJ   c           
      
   U c)  [          Vs0 s H  o"[        R                  U   _M     nnGOF[        U [        5      (       a  U nGO-/ SQnX;  a  [        SSR                  U5       35      eSnSn0 SS_SU_S	S
_SS
_SU_SU_SS_SS_SU_SS/_S/ SQ_SS_SS_SS_SS_SS_S S_nS!U ;   a  UR                  S"S05        OUR                  S"S05        U R                  S#5      (       a  UR                  S$SSSSSSS%.5        O?U S&:X  a  UR                  SUUSSSSS%.5        OU S';   a  UR                  SUUSSSSS%.5        U S(:X  a  UR                  SSS).5        OUR                  SSS).5        UR                  5        VVs0 s H  u  p'U[         ;   d  M  X'_M     nnnUbA  UR                  5        VVs0 s H  u  p'U[         ;   d  M  X'_M     nnnUR                  U5        [        U5      nU$ s  snf s  snnf s  snnf )*a  
Get the parameters that control the general style of the plots.

The style parameters control properties like the color of the background and
whether a grid is enabled by default. This is accomplished using the
matplotlib rcParams system.

The options are illustrated in the
:doc:`aesthetics tutorial <../tutorial/aesthetics>`.

This function can also be used as a context manager to temporarily
alter the global defaults. See :func:`set_theme` or :func:`set_style`
to modify the global defaults for all plots.

Parameters
----------
style : None, dict, or one of {darkgrid, whitegrid, dark, white, ticks}
    A dictionary of parameters or the name of a preconfigured style.
rc : dict, optional
    Parameter mappings to override the values in the preset seaborn
    style dictionaries. This only updates parameters that are
    considered part of the style definition.

Examples
--------

.. include:: ../docstrings/axes_style.rst

)whitedark	whitegriddarkgridtickszstyle must be one of , z.15z.8r   rV   r   r   outr   r   r   r   Tr   -r   r    
sans-serifr!   )ArialzDejaVu SanszLiberation SanszBitstream Vera Sansr^   r   roundr   wr   r   rocketr#   Fr%   gridr   rW   z#EAEAF2)r   r   r   r&   r'   r(   r)   rX   )rV   rZ   rZ   )r"   r$   )_style_keysrA   rB   
isinstancedict
ValueErrorjoinrC   
startswithitems
_AxesStyle)	rE   r?   k
style_dictstyles	dark_gray
light_grayvstyle_objects	            rI   r
   r
      s   < }2=>+Qa(+
>
	E4	 	 
 E4TYYv5F4GHII 	


 y

 u
 u
 9
 9
 d
 c
 )
 L>
    E!
( #G)
* s+
, $T-
0 (1
4 5
6 57

@ U?T  U 
 F##"+")%$(&*%)#'  k!")",($(&*%)#'  ((")"+($(&*%)#'  G $" 
  %#  $.#3#3#5J#541k9I$!$#5JJ 
~!xxz>ztqQ+-=dadz>" j)Lw ?b K ?s   G4G9G99G?G?c                 X    [        X5      n[        R                  R                  U5        g)a  
Set the parameters that control the general style of the plots.

The style parameters control properties like the color of the background and
whether a grid is enabled by default. This is accomplished using the
matplotlib rcParams system.

The options are illustrated in the
:doc:`aesthetics tutorial <../tutorial/aesthetics>`.

See :func:`axes_style` to get the parameter values.

Parameters
----------
style : dict, or one of {darkgrid, whitegrid, dark, white, ticks}
    A dictionary of parameters or the name of a preconfigured style.
rc : dict, optional
    Parameter mappings to override the values in the preset seaborn
    style dictionaries. This only updates parameters that are
    considered part of the style definition.

Examples
--------

.. include:: ../docstrings/set_style.rst

N)r
   rA   rB   rC   )rE   r?   rr   s      rI   r   r   /  s     8 e(LLL%rJ   c                    U c(  [          Vs0 s H  o3[        R                  U   _M     nnO[        U [        5      (       a  U nO/ SQnX;  a  [        SSR                  U5       35      eSSSSSSSS.nSSS	S
SSSSSS
S
SSS.nUR                  U5        [	        SSS	SS9U    nUR                  5        VV	s0 s H
  u  p9X9U-  _M     nnn	UR                  5       n
U
 Vs0 s H
  o3XC   U-  _M     nnUR                  U5        UbA  UR                  5        VV	s0 s H  u  p9U[         ;   d  M  X9_M     nnn	UR                  U5        [        U5      nU$ s  snf s  sn	nf s  snf s  sn	nf )a  
Get the parameters that control the scaling of plot elements.

These parameters correspond to label size, line thickness, etc. For more
information, see the :doc:`aesthetics tutorial <../tutorial/aesthetics>`.

The base context is "notebook", and the other contexts are "paper", "talk",
and "poster", which are version of the notebook parameters scaled by different
values. Font elements can also be scaled independently of (but relative to)
the other values.

This function can also be used as a context manager to temporarily
alter the global defaults. See :func:`set_theme` or :func:`set_context`
to modify the global defaults for all plots.

Parameters
----------
context : None, dict, or one of {paper, notebook, talk, poster}
    A dictionary of parameters or the name of a preconfigured set.
font_scale : float, optional
    Separate scaling factor to independently scale the size of the
    font elements.
rc : dict, optional
    Parameter mappings to override the values in the preset seaborn
    context dictionaries. This only updates parameters that are
    considered part of the context definition.

Examples
--------

.. include:: ../docstrings/plotting_context.rst

)papernotebooktalkposterzcontext must be in r[         )r*   r+   r,   r-   r.   r/   r0   g      ?r   g      ?      )r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   g?   )_context_keysrA   rB   re   rf   rg   rh   rC   rj   keys_PlottingContext)rD   rH   r?   rl   context_dictcontextstexts_base_contextbase_contextscalingrq   	font_keys	font_dictcontext_objects                rI   r   r   O  s   D 4ABMq3<<?*MB	GT	"	" ;"2499X3F2GHII
   !!!%'

 #" ! !%!%!"!" ! ! ! !!
& 	./ R!#a@I3?3E3E3GH3G41w;3GH '++-	>GHi*44i	HI& 
~!xxz@ztqQ--?dadz@B &l3N} C^ I I
 As   E7EEE$-E$c                 Z    [        XU5      n[        R                  R                  U5        g)aW  
Set the parameters that control the scaling of plot elements.

These parameters correspond to label size, line thickness, etc.
Calling this function modifies the global matplotlib `rcParams`. For more
information, see the :doc:`aesthetics tutorial <../tutorial/aesthetics>`.

The base context is "notebook", and the other contexts are "paper", "talk",
and "poster", which are version of the notebook parameters scaled by different
values. Font elements can also be scaled independently of (but relative to)
the other values.

See :func:`plotting_context` to get the parameter values.

Parameters
----------
context : dict, or one of {paper, notebook, talk, poster}
    A dictionary of parameters or the name of a preconfigured set.
font_scale : float, optional
    Separate scaling factor to independently scale the size of the
    font elements.
rc : dict, optional
    Parameter mappings to override the values in the preset seaborn
    context dictionaries. This only updates parameters that are
    considered part of the context definition.

Examples
--------

.. include:: ../docstrings/set_context.rst

N)r   rA   rB   rC   )rD   rH   r?   r   s       rI   r   r     s#    B &g2>NLL'rJ   c                   &    \ rS rSrS rS rS rSrg)_RCAestheticsi  c                     [         R                  nU R                   Vs0 s H  o"X   _M	     snU l        U R	                  U 5        g s  snf N)rA   rB   _keys_orig_set)selfr?   rl   s      rI   	__enter___RCAesthetics.__enter__  s9    \\(,

3
1h
3
		$ 4s   Ac                 :    U R                  U R                  5        g r   )r   r   )r   exc_type	exc_valueexc_tbs       rI   __exit___RCAesthetics.__exit__  s    		$**rJ   c                 J   ^ ^ [         R                  " T5      UU 4S j5       nU$ )Nc                  N   > T   T" U 0 UD6sS S S 5        $ ! , (       d  f       g = fr   rP   )rL   rM   funcr   s     rI   wrapper'_RCAesthetics.__call__.<locals>.wrapper  s    T,V, s   
$)	functoolswraps)r   r   r   s   `` rI   __call___RCAesthetics.__call__  s%    			- 
	- rJ   )r   N)__name__
__module____qualname____firstlineno__r   r   r   __static_attributes__rP   rJ   rI   r   r     s    
rJ   r   c                   ,    \ rS rSrSr\r\" \5      r	Sr
g)rk   i  z1Light wrapper on a dict to set style temporarily.rP   N)r   r   r   r   __doc__rd   r   staticmethodr   r   r   rP   rJ   rI   rk   rk     s    ;E	"DrJ   rk   c                   ,    \ rS rSrSr\r\" \5      r	Sr
g)r   i  z3Light wrapper on a dict to set context temporarily.rP   N)r   r   r   r   r   r~   r   r   r   r   r   rP   rJ   rI   r   r     s    =E$DrJ   r   c                     [         R                  " XU5      n[        SU5      nU[        R                  S'   U(       a   [         R
                  " U 5        gg! [        [        4 a     gf = f)ay  Set the matplotlib color cycle using a seaborn palette.

Parameters
----------
palette : seaborn color palette | matplotlib colormap | hls | husl
    Palette definition. Should be something :func:`color_palette` can process.
n_colors : int
    Number of colors in the cycle. The default number of colors will depend
    on the format of ``palette``, see the :func:`color_palette`
    documentation for more information.
desat : float
    Proportion to desaturate each color by.
color_codes : bool
    If ``True`` and ``palette`` is a seaborn palette, remap the shorthand
    color codes (e.g. "b", "g", "r", etc.) to the colors from this palette.

See Also
--------
color_palette : build a color palette or set the color cycle temporarily
                in a ``with`` statement.
set_context : set parameters to scale plot elements
set_style : set the default parameters for figure style

colorzaxes.prop_cycleN)r   color_paletter   rA   rB   set_color_codesrg   	TypeError)rF   n_colorsdesatr@   colorscyls         rI   r   r     se    2 ##Gu=F
&
!C&)CLL"#	$$W-  I& 		s   A A*)A*)rv   rY   deepr^   r   TN)NN)Nr   N)NNF)r   r   
matplotlibrA   r   rT   r   __all__rd   r~   r   r   r   r	   r
   r   r   r   rf   r   rk   r   r   rP   rJ   rI   <module>r      s    M    
&P: =CDH) X-
)Zz&@aH"(JD "# #%} % rJ   