Ë
    u™ãjr!  ã                  ó¼  — d dl mZ d dlZd dlmZmZmZ d dlZd dlZ	d dl
Zd dlZd dlmZ d dlmZ erd dlmZmZmZ d dl
mZ d dlmZ e	 	 d	 	 	 	 	 	 	 	 	 dd
„«       Ze	 	 dd	dœ	 	 	 	 	 	 	 	 	 dd„«       Ze	 	 dd	dœ	 	 	 	 	 	 	 	 	 dd„«       Z	 	 dddœ	 	 	 	 	 	 	 	 	 dd„Z	 	 	 	 	 	 	 	 	 	 dd„Zdd„Z	 	 	 	 	 	 d d„Zd!d„Z	 	 	 	 d"d„Zd#d„Zd$d„Z d#d„Z!d%d„Z"d&d„Z#y)'é    )ÚannotationsN)ÚTYPE_CHECKINGÚcastÚoverload)Úfind_stack_level)Úis_list_like)Ú
CollectionÚIteratorÚSequence)ÚColormap)ÚMatplotlibColor.c                ó   — y ©N© ©Ú
num_colorsÚcolormapÚ
color_typeÚcolors       úl/var/www/html/python-recuperauto-other/env/lib/python3.12/site-packages/pandas/plotting/_matplotlib/style.pyÚget_standard_colorsr      s   € ð ó    ©r   c                ó   — y r   r   r   s       r   r   r   )   s   € ð r   c                ó   — y r   r   r   s       r   r   r   3   s   € ð &)r   c               óp   — t        |t        «      r|S t        |||| ¬«      }t        t	        || ¬«      «      S )a§  
    Get standard colors based on `colormap`, `color_type` or `color` inputs.

    Parameters
    ----------
    num_colors : int
        Minimum number of colors to be returned.
        Ignored if `color` is a dictionary.
    colormap : :py:class:`matplotlib.colors.Colormap`, optional
        Matplotlib colormap.
        When provided, the resulting colors will be derived from the colormap.
    color_type : {"default", "random"}, optional
        Type of colors to derive. Used if provided `color` and `colormap` are None.
        Ignored if either `color` or `colormap` are not None.
    color : dict or str or sequence, optional
        Color(s) to be used for deriving sequence of colors.
        Can be either be a dictionary, or a single color (single color string,
        or sequence of floats representing a single color),
        or a sequence of colors.

    Returns
    -------
    dict or list
        Standard colors. Can either be a mapping if `color` was a dictionary,
        or a list of colors with a length of `num_colors` or more.

    Warns
    -----
    UserWarning
        If both `colormap` and `color` are provided.
        Parameter `color` will override.
    ©r   r   r   r   ©r   )Ú
isinstanceÚdictÚ_derive_colorsÚlistÚ_cycle_colors)r   r   r   r   Úcolorss        r   r   r   =   s>   € ôN �%œÔØˆäØØØØô	€Fô ”˜f°Ô<Ó=Ð=r   c                óš   — | €|�t        ||¬«      S | �,|�t        j                  dt        «       ¬«       t	        | «      S t        ||¬«      S )ah  
    Derive colors from either `colormap`, `color_type` or `color` inputs.

    Get a list of colors either from `colormap`, or from `color`,
    or from `color_type` (if both `colormap` and `color` are None).

    Parameters
    ----------
    color : str or sequence, optional
        Color(s) to be used for deriving sequence of colors.
        Can be either be a single color (single color string, or sequence of floats
        representing a single color), or a sequence of colors.
    colormap : :py:class:`matplotlib.colors.Colormap`, optional
        Matplotlib colormap.
        When provided, the resulting colors will be derived from the colormap.
    color_type : {"default", "random"}, optional
        Type of colors to derive. Used if provided ``color`` and ``colormap`` are None.
        Ignored if either ``color`` or ``colormap`` are not None.
    num_colors : int
        Number of colors to be extracted.

    Returns
    -------
    list
        List of colors extracted.

    Warns
    -----
    UserWarning
        If both `colormap` and `color` are provided.
        Parameter `color` will override.
    r   zC'color' and 'colormap' cannot be used simultaneously. Using 'color')Ú
stacklevel)Ú_get_colors_from_colormapÚwarningsÚwarnr   Ú_get_colors_from_colorÚ_get_colors_from_color_typer   s       r   r!   r!   q   sW   € ðN €}˜Ð-Ü(¨¸jÔIÐIØ	Ð	ØÐÜ�M‰MØUÜ+Ó-õô & eÓ,Ð,ä*¨:À*ÔMÐMr   c              #  óœ   K  — t        |t        | «      «      }t        j                  t        j                  | «      |«      E d{  –—†  y7 Œ­w)zÈCycle colors until achieving max of `num_colors` or length of `colors`.

    Extra colors will be ignored by matplotlib if there are more colors
    than needed and nothing needs to be done here.
    N)ÚmaxÚlenÚ	itertoolsÚisliceÚcycle)r$   r   Ú
max_colorss      r   r#   r#   ¥   s7   è ø€ ô �Z¤ V£Ó-€JÜ×Ñ¤	§¡°Ó 7¸ÓD×DÒDús   ‚AAÁA
ÁAc                óz   — t        | «      }t        j                  dd|¬«      D �cg c]
  } ||«      ‘Œ c}S c c}w )zGet colors from colormap.r   é   )Únum)Ú_get_cmap_instanceÚnpÚlinspace)r   r   Úcmapr5   s       r   r'   r'   ¯   s3   € ô
 ˜hÓ'€DÜ!#§¡¨Q°°zÔ!BÖC˜#‰D��IÒCÐCùÒCs   ¦8c                ór   — t        | t        «      r&| }t        j                  |    } | €t	        d|› d�«      ‚| S )z$Get instance of matplotlib colormap.z	Colormap z is not recognized)r   ÚstrÚmplÚ	colormapsÚ
ValueError)r   r9   s     r   r6   r6   ¸   s?   € ä�(œCÔ ØˆÜ—=‘= Ñ*ˆØÐÜ˜y¨¨Ð.@ÐAÓBÐBØ€Or   c                ó®   — t        | «      dk(  rt        d| › �«      ‚t        | «      rt        d| «      } | gS t        d| «      } t	        t        | «      «      S )z!Get colors from user input color.r   zInvalid color argument: ÚColorúCollection[Color])r.   r>   Ú_is_single_colorr   r"   Ú!_gen_list_of_colors_from_iterabler   s    r   r*   r*   Â   s[   € ô ˆ5ƒz�Q‚ÜÐ3°E°7Ð;Ó<Ð<ä˜ÔÜ�W˜eÓ$ˆØˆwˆäÐ$ eÓ,€EÜÔ1°%Ó8Ó9Ð9r   c                óT   — t        | t        «      rt        | «      ryt        | «      ryy)a0  Check if `color` is a single color, not a sequence of colors.

    Single color is of these kinds:
        - Named color "red", "C0", "firebrick"
        - Alias "g"
        - Sequence of floats, such as (0.1, 0.2, 0.3) or (0.1, 0.2, 0.3, 0.4).

    See Also
    --------
    _is_single_string_color
    TF)r   r;   Ú_is_single_string_colorÚ_is_floats_colorr   s    r   rB   rB   Ñ   s'   € ô �%œÔÔ"9¸%Ô"@àä˜ÔØàr   c              #  óT   K  — | D ]  }t        |«      r|–— Œt        d|› �«      ‚ y­w)zS
    Yield colors from string of several letters or from collection of colors.
    zInvalid color N)rB   r>   )r   Úxs     r   rC   rC   ç   s6   è ø€ ð ò 3ˆÜ˜AÔØ‹Gä˜~¨a¨SÐ1Ó2Ð2ñ	3ùs   ‚&(c                ó’   — t        t        | «      xr2 t        | «      dk(  xs t        | «      dk(  xr t        d„ | D «       «      «      S )zACheck if color comprises a sequence of floats representing color.é   é   c              3  óH   K  — | ]  }t        |t        t        f«      –— Œ y ­wr   )r   ÚintÚfloat)Ú.0rH   s     r   ú	<genexpr>z#_is_floats_color.<locals>.<genexpr>÷   s   è ø€ Ò;°”
˜1œs¤E˜l×+Ñ;ùs   ‚ ")Úboolr   r.   Úallr   s    r   rF   rF   ò   sG   € äÜ�UÓò 	<Ü�‹Z˜1‰_Ò/¤ E£
¨a¡ò	<äÑ;°UÔ;Ó;óð r   c           	     óL  — | dk(  rMt         j                  d   }t        j                  |t	        |t        |«      «      «      D �cg c]  }|d   ‘Œ	 c}S | dk(  r>t        j                  j                  |«      j                  |df«      j                  «       S t        d«      ‚c c}w )z&Get colors from user input color type.Údefaultzaxes.prop_cycler   ÚrandomrJ   z/color_type must be either 'default' or 'random')r<   ÚrcParamsr/   r0   Úminr.   r7   rU   Údefault_rngÚtolistr>   )r   r   Ú
prop_cycleÚcs       r   r+   r+   û   sš   € à�YÒÜ—\‘\Ð"3Ñ4ˆ
ô ×%Ñ% j´#°jÄ#ÀjÃ/Ó2RÓSö
àð ˆg‹Jò
ð 	
ð 
�xÒ	Ü�y‰y×$Ñ$ ZÓ0×7Ñ7¸ÀQ¸ÓH×OÑOÓQÐQäÐJÓKÐKùò
s   ÁB!c                ó‚   — t         j                  j                  «       }	 |j                  | «       y# t        $ r Y yw xY w)aƒ  Check if `color` is a single string color.

    Examples of single string colors:
        - 'r'
        - 'g'
        - 'red'
        - 'green'
        - 'C3'
        - 'firebrick'

    Parameters
    ----------
    color : Color
        Color string or sequence of floats.

    Returns
    -------
    bool
        True if `color` looks like a valid color.
        False otherwise.
    TF)Ú
matplotlibr$   ÚColorConverterÚto_rgbar>   )r   Úconvs     r   rE   rE   	  sD   € ô, ×Ñ×+Ñ+Ó-€Dðð 	�‰�UÔð øô ò Ùðús    2 ²	>½>)..)
r   rM   r   úColormap | Noner   r;   r   údict[str, Color]Úreturnrb   )
r   rM   r   ra   r   r;   r   zColor | Sequence[Color] | Nonerc   úlist[Color])
r   rM   r   ra   r   r;   r   z1dict[str, Color] | Color | Sequence[Color] | Nonerc   zdict[str, Color] | list[Color])NrT   )
r   z Color | Collection[Color] | Noner   zstr | Colormap | Noner   r;   r   rM   rc   rd   )r$   rd   r   rM   rc   úIterator[Color])r   ústr | Colormapr   rM   rc   rd   )r   rf   rc   r   )r   úColor | Collection[Color]rc   rd   )r   rg   rc   rQ   )r   rA   rc   re   )r   r;   r   rM   rc   rd   )r   r@   rc   rQ   )$Ú
__future__r   r/   Útypingr   r   r   r(   r]   r<   Úmatplotlib.colorsÚnumpyr7   Úpandas.util._exceptionsr   Úpandas.core.dtypes.commonr   Úcollections.abcr	   r
   r   r   Úpandas._typingr   r@   r   r!   r#   r'   r6   r*   rB   rC   rF   r+   rE   r   r   r   ú<module>rp      s  ðÝ "ã ÷ñ ó
 ã Û Û å 4å 2á÷ñ õ +å7ð 
ð !$ØðØðàðð ðð
 ðð òó 
ðð 
ð !$Øðð
 -0ñØðàðð ðð
 *ðð òó 
ðð 
ð !$Øð)ð
 @Cñ)Øð)àð)ð ð)ð
 =ð)ð $ò)ó 
ð)ð !%Øð1>ð
 @Dñ1>Øð1>àð1>ð ð1>ð
 =ð1>ð $ó1>ðh1Nà+ð1Nð $ð1Nð ð	1Nð
 ð1Nð ó1NóhEðDØðDàðDð óDóð:Ø$ð:àó:óó,3óóLôr   