1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
Ë
nñúh° ãóL—ddlmZddlmZmZddlZddlmZmZddl    Z    ddl
Z ddl Z
ddl ZddlmZddlmZddlmZddlmcmZerddl mZ            d                            dd    „Z                                        dd
„Zdd „Z                        dd „Zdd „Z                dd„Z dd„Z!dd„Z"dd„Z#d d„Z$d!d„Z%d!d„Z&d"d„Z'd#d„Z(y)$é)Ú annotations)Ú
CollectionÚIteratorN)Ú TYPE_CHECKINGÚcast)ÚMatplotlibColor)Úfind_stack_level)Ú is_list_like)ÚColormapcóp—t|t«r|St||||¬«}tt    ||¬««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.
    ©ÚcolorÚcolormapÚ
color_typeÚ
num_colors©r)Ú
isinstanceÚdictÚ_derive_colorsÚlistÚ _cycle_colors)rrrrÚcolorss     úTH:\Change_password\venv_build\Lib\site-packages\pandas/plotting/_matplotlib/style.pyÚget_standard_colorsrs>€ôL%œÔ؈ ä ØØØØô    €Fô ” ˜f°Ô<Ó =Ð=ócóš—|€| t||¬«S|,|tjdt«¬«t    |«St ||¬«S)aa
    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.
    rzC'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    rrrPsW€ðN €}˜Ð-Ü(¨¸jÔIÐIØ    Р   Ø Ð Ü M‰MØUÜ+Ó-õ ô& eÓ,Ð,ä*¨:À*ÔMÐMrc#óœK—t|t|««}tjtj|«|«Ed{–—†y7Œ­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)rrÚ
max_colorss   rrr„s7èø€ô Z¤ V£Ó-€JÜ×Ѥ    §¡°Ó 7¸ÓD×DÒDús‚AA ÁA
ÁA cóz—t|«}tjdd|¬«Dcgc]
}||«‘Œ c}Scc}w)zGet colors from colormap.ré)Únum)Ú_get_cmap_instanceÚnpÚlinspace)rrÚcmapr,s    rrrŽs3€ô
˜hÓ '€DÜ!#§¡¨Q°°zÔ!BÖ C˜#‰DIÒ CÐCùÒ Cs¦8cór—t|t«r&|}tj|}|€t    d|›d«‚|S)z$Get instance of matplotlib colormap.z    Colormap z is not recognized)rÚstrÚmplÚ    colormapsÚ
ValueError)rr0s  rr-r-—s?€ä(œCԠ؈ܗ=‘= Ñ*ˆØ Рܘy¨¨Ð.@ÐAÓBÐ BØ €Orcó̗t|«dk(rtd|›«‚t|«rtt|«}|gStt
t|«}t t|««S)z!Get colors from user input color.rzInvalid color argument: )r%r5Ú_is_single_colorrÚColorrrÚ!_gen_list_of_colors_from_iterable©rs rr!r!¡s_€ô ˆ5ƒzQ‚ÜÐ3°E°7Ð;Ó<Ð<ä˜ÔÜ”U˜EÓ"ˆØˆwˆä ”œEÑ" EÓ *€EÜ Ô1°%Ó8Ó 9Ð9rcóT—t|t«r t|«ryt|«ryy)a0Check 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)rr2Ú_is_single_string_colorÚ_is_floats_colorr:s rr7r7°s'€ô%œÔÔ"9¸%Ô"@àä˜ÔØà rc#óTK—|D]}t|«r|–—Œtd|›«‚y­w)zS
    Yield colors from string of several letters or from collection of colors.
    zInvalid color N)r7r5)rÚxs  rr9r9Æs6èø€ðò3ˆÜ ˜AÔ Ø‹Gä˜~¨a¨SÐ1Ó2Ð 2ñ    3ùs‚&(có’—tt|«xr2t|«dk(xst|«dk(xrtd„|D«««S)zACheck if color comprises a sequence of floats representing color.ééc3óHK—|]}t|ttf«–—Œy­w)N)rÚintÚfloat)Ú.0r?s  rú    <genexpr>z#_is_floats_color.<locals>.<genexpr>Ösèø€Ò;°”
˜1œs¤E˜l×+Ñ;ùs‚ ")Úboolr
r%Úallr:s rr=r=ÑsG€ä ܐUÓò    <Ü ‹Z˜1‰_Ò /¤ E£
¨a¡ò    <ä Ñ;°UÔ;Ó ;ó ðrcóX—|dk(r t|«S|dk(r t|«Std«‚)z&Get colors from user input color type.ÚdefaultÚrandomz/color_type must be either 'default' or 'random')Ú_get_default_colorsÚ_get_random_colorsr5)rrs  rr"r"Ús4€àYÒÜ" :Ó.Ð.Ø    xÒ    Ü! *Ó-Ð-äÐJÓKÐKrcó`—ddlm}|jdDcgc]}|d‘Œ    }}|d|Scc}w)z=Get `num_colors` of default colors from matplotlib rc params.rNzaxes.prop_cycler)Úmatplotlib.pyplotÚpyplotÚrcParams)rÚpltÚcrs    rrMrMäs9€å#à"%§,¡,Ð/@Ñ"AÖ B˜Qˆa‹jÐ B€FÐ BØ !JÐ ÐùòCs˜ +cóP—t|«Dcgc] }t|«‘Œc}Scc}w)z"Get `num_colors` of random colors.)ÚrangeÚ _random_color)rr,s  rrNrNìs €ä*/°
Ó*;Ö < 3ŒM˜#Õ Ò <Ð<ùÒ <sŽ#cój—tj|«}|jd«j«S)z4Get a random color represented as a list of length 3rA)ÚcomÚ random_stateÚrandÚtolist)ÚcolumnÚrss  rrWrWñs+€ô
×    Ñ    ˜&Ó    !€BØ 7‰71‹:× Ñ Ó Ðrcó‚—tjj«}    |j|«y#t$rYywxYw)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_rgbar5)rÚconvs  rr<r<øsD€ô, × Ñ × +Ñ +Ó -€Dðð      ‰ UÔðøô òÙðús  2²    >½>)NrKN)rrDrzColormap | Nonerr2rz3dict[str, Color] | Color | Collection[Color] | None)
rz Color | Collection[Color] | Nonerzstr | Colormap | Nonerr2rrDÚreturnú list[Color])rrerrDrdúIterator[Color])rústr | ColormaprrDrdre)rrgrdr )rúColor | Collection[Color]rdre)rrhrdrH)rzCollection[Color]rdrf)rr2rrDrdre)rrDrdre)r]rDrdz list[float])rr8rdrH))Ú
__future__rÚcollections.abcrrr&Útypingrrrr`r3Úmatplotlib.colorsÚnumpyr.Úpandas._typingrr8Úpandas.util._exceptionsr    Úpandas.core.dtypes.commonr
Úpandas.core.commonÚcoreÚcommonrYr rrrrr-r!r7r9r=r"rMrNrWr<©rrú<module>rusðÝ"÷ó÷óãÛÛå3Ý4å2ç Ð áÝ*ð
!%ØØAEð    0>Øð0>àð0>ðð0>ð ?ó    0>ðf1Nà +ð1Nð$ð1Nðð    1Nð
ð 1Nð ó 1NóhEðDØðDàðDðóDóð :Ø $ð :àó :óó,3óóLó ó=ó
ôr