style.pyc
1 o 2 d��c�! � @ sN d dl mZ d dlZd dlmZmZmZmZmZm Z d dl 3 Z 4 d dlZd dl mZ d dlZd dlZd dlmZ d dlmZ d dlm mZ d dlmZ erSd dlmZ eeee f Z d;d<dd�Z d=dd�Z!d>dd�Z"d?dd�Z#d@d!d"�Z$dAd$d%�Z%dBd'd(�Z&dCd*d+�Z'dBd,d-�Z(dDd.d/�Z)dEd0d1�Z*dEd2d3�Z+dFd6d7�Z,dGd9d:�Z-dS )H� )�annotationsN)� TYPE_CHECKING� 5 Collection�Iterator�Sequence�Union�cast)�find_stack_level)�is_list_like)�mpl_ge_3_6_0)�Colormap�default� 6 num_colors�int�colormap�Colormap | None� 7 color_type�str�color�3dict[str, Color] | Color | Collection[Color] | Nonec C s. t |t�r|S t|||| d�}tt|| d��S )a� 8 Get standard colors based on `colormap`, `color_type` or `color` inputs. 9 10 Parameters 11 ---------- 12 num_colors : int 13 Minimum number of colors to be returned. 14 Ignored if `color` is a dictionary. 15 colormap : :py:class:`matplotlib.colors.Colormap`, optional 16 Matplotlib colormap. 17 When provided, the resulting colors will be derived from the colormap. 18 color_type : {"default", "random"}, optional 19 Type of colors to derive. Used if provided `color` and `colormap` are None. 20 Ignored if either `color` or `colormap` are not None. 21 color : dict or str or sequence, optional 22 Color(s) to be used for deriving sequence of colors. 23 Can be either be a dictionary, or a single color (single color string, 24 or sequence of floats representing a single color), 25 or a sequence of colors. 26 27 Returns 28 ------- 29 dict or list 30 Standard colors. Can either be a mapping if `color` was a dictionary, 31 or a list of colors with a length of `num_colors` or more. 32 33 Warns 34 ----- 35 UserWarning 36 If both `colormap` and `color` are provided. 37 Parameter `color` will override. 38 �r r r r �r )� 39 isinstance�dict�_derive_colors�list� _cycle_colors)r r r r �colors� r ��C:\Users\Jacks.GUTTSPC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\plotting\_matplotlib\style.py�get_standard_colors"