Module ImportFrom alias Import alias ImportFrom alias Import alias identifier Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot CompareLtELtE Num NameLoad Num body Raise Call NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad AugAssignMult NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str ImportFrom alias Assign AttributeStore NameLoad attr Call NameLoad Expr Call NameLoad NameLoad Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str ImportFrom alias Expr Call NameLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad Num NameLoad body Expr Str Assign NameStore Call NameLoad keyword ListLoad Str Str Str Str Str Str keyword ListLoad Str Str Str Str Str Str keyword ListLoad Str Str Str Str Str Str keyword ListLoad Str Str Str Str Str Str keyword ListLoad Str Str Str Str Str Str keyword ListLoad Str Str Str Str Str Str If CompareIs NameLoad NameLoad body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str orelse If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call NameLoad NameLoad orelse If CompareIn NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad orelse If CompareIn NameLoad Call NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad NameLoad orelse If CompareIn SubscriptLoad NameLoad Slice Num Call NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad NameLoad orelse Raise Call NameLoad BinOpMod Str NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore ListComp Call NameLoad NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore Call NameLoad NameLoad TryExcept body Assign NameStore Call NameLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Str Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num Num Num Num body Expr Str Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Num Num BinOpAdd NameLoad Num Slice Num AugAssignAdd NameStore NameLoad AugAssignMod NameStore Num AugAssignSub NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListComp Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad comprehension NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num Num Num Num body Expr Str Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Num Num BinOpAdd NameLoad Num Slice Num AugAssignAdd NameStore NameLoad AugAssignMod NameStore Num AugAssignMult NameStore Num AugAssignMult NameStore Num AugAssignMult NameStore Num Assign NameStore ListComp Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad comprehension NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Assign NameStore Dict Str Str Str Str Str Str Str Str Num Num Num Num Num Num Num Num If Call AttributeLoad NameLoad attr Str body Assign NameStore ListLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Str Str Num Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad orelse Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad If CompareIn NameLoad NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Num Num SubscriptLoad NameLoad Index NameLoad Slice NameLoad orelse Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Num Num BinOpAdd NameLoad Num Slice Num Num Assign NameStore Call NameLoad Call NameLoad NameLoad SubscriptLoad Call NameLoad NameLoad ExtSlice Slice Slice Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad body Expr Str Assign NameStore Str Assign NameStore IfExp NameLoad ListLoad NameLoad NameLoad ListLoad NameLoad NameLoad Return Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num NameLoad body Expr Str Assign NameStore Call AttributeLoad Str attr Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad NameLoad If UnaryOpNot NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Num Num NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListComp SubscriptLoad NameLoad Index NameLoad comprehension NameStore NameLoad Return Call NameLoad NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Num Num Num Num Num Num NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad SubscriptLoad Call NameLoad NameLoad ExtSlice Slice Slice Num attr If NameLoad body Assign NameStore SubscriptLoad NameLoad Slice Num If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Num If NameLoad body Assign NameStore SubscriptLoad NameLoad Slice Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad orelse Return NameLoad decorator_list
N/A __future__ division N/A colorsys itertools cycle N/A numpy np N/A matplotlib mpl six string_types six.moves range N/A husl xkcd_rgb xkcd_rgb desaturate N/A N/A color prop N/A N/A N/A Decrease the saturation channel of a color by some percent.

    Parameters
    ----------
    color : matplotlib color
        hex, rgb-tuple, or html color name
    prop : float
        saturation channel of color will be multiplied by this value

    Returns
    -------
    new_color : rgb tuple
        desaturated color code in RGB tuple representation

     N/A N/A N/A 0 prop 1 N/A N/A N/A ValueError prop must be between 0 and 1 N/A rgb N/A N/A N/A mplcol colorConverter to_rgb color N/A N/A h l s N/A N/A colorsys rgb_to_hls rgb N/A s prop N/A new_color N/A N/A colorsys hls_to_rgb h l s N/A new_color N/A _ColorPalette N/A list N/A N/A Set the color palette in a with statement, otherwise be a list. __enter__ N/A N/A self N/A N/A N/A Open the context. rcmod set_palette N/A N/A self _orig_palette N/A color_palette N/A N/A set_palette self N/A len self N/A self N/A __exit__ N/A N/A self N/A args N/A N/A Close the context. rcmod set_palette N/A N/A set_palette N/A self _orig_palette N/A len N/A self _orig_palette N/A N/A color_palette N/A N/A name n_colors desat N/A None 6 None N/A N/A Return a list of colors defining a color palette.

    Availible seaborn palette names:
        deep, muted, bright, pastel, dark, colorblind

    Other options:
        hls, husl, any matplotlib palette

    Matplotlib paletes can be specified as reversed palettes by appending
    "_r" to the name or as dark palettes by appending "_d" to the name.

    This function can also be used in a ``with`` statement to temporarily
    set the color cycle for a plot or set of plots.

    Parameters
    ----------
    name: None, string, or sequence
        Name of palette or None to return current palette. If a
        sequence, input colors are used but possibly cycled and
        desaturated.
    n_colors : int
        Number of colors in the palette. If larger than the number of
        colors in the palette, they will cycle.
    desat : float
        Value to desaturate each color by.

    Returns
    -------
    palette : list of RGB tuples.
        Color palette.

    Examples
    --------
    >>> p = color_palette("muted")

    >>> p = color_palette("Blues_d", 10)

    >>> p = color_palette("Set1", desat=.7)

    >>> import matplotlib.pyplot as plt
    >>> with color_palette("husl", 8):
    ...     f, ax = plt.subplots()
    ...     ax.plot(x, y)                  # doctest: +SKIP

    See Also
    --------
    set_palette : set the default color cycle for all plots.
    axes_style : define parameters to set the style of plots
    plotting_context : define parameters to scale plot elements

     N/A seaborn_palettes N/A dict deep N/A #4C72B0 #55A868 #C44E52 #8172B2 #CCB974 #64B5CD muted N/A #4878CF #6ACC65 #D65F5F #B47CC7 #C4AD66 #77BEDB pastel N/A #92C6FF #97F0AA #FF9F9A #D0BBFF #FFFEA3 #B0E0E6 bright N/A #003FFF #03ED3A #E8000B #8A2BE2 #FFC400 #00D7FF dark N/A #001C7F #017517 #8C0900 #7600A1 #B8860B #006374 colorblind N/A #0072B2 #009E73 #D55E00 #CC79A7 #F0E442 #56B4E9 N/A N/A name None N/A N/A palette N/A N/A mpl rcParams N/A axes.color_cycle N/A N/A N/A N/A isinstance name string_types N/A N/A palette name N/A N/A N/A name hls N/A N/A palette N/A hls_palette n_colors N/A N/A N/A name husl N/A N/A palette N/A husl_palette n_colors N/A N/A N/A name seaborn_palettes N/A N/A palette N/A seaborn_palettes N/A name N/A N/A N/A name N/A dir N/A mpl cm N/A N/A palette N/A mpl_palette name n_colors N/A N/A N/A N/A name N/A -2 N/A dir N/A mpl cm N/A N/A palette N/A mpl_palette name n_colors N/A N/A N/A ValueError N/A %s is not a valid palette name name N/A N/A desat None N/A N/A palette N/A N/A desaturate c desat N/A c palette N/A pal_cycle N/A cycle palette N/A palette N/A N/A next pal_cycle N/A _ N/A range n_colors N/A N/A N/A palette N/A map N/A N/A N/A mpl colors colorConverter to_rgb palette N/A palette N/A _ColorPalette palette N/A N/A N/A ValueError N/A N/A N/A ValueError N/A Could not generate a palette for %s N/A str name N/A palette N/A hls_palette N/A N/A n_colors h l s N/A 6 0.01 0.6 0.65 N/A N/A Get a set of evenly spaced colors in HLS hue space.

    h, l, and s should be between 0 and 1

    Parameters
    ----------

    n_colors : int
        number of colors in the palette
    h : float
        first hue
    l : float
        lightness
    s : float
        saturation

    Returns
    -------
    palette : list of tuples
        color palette

     N/A hues N/A N/A N/A np linspace 0 1 N/A n_colors 1 N/A -1 N/A hues h N/A hues 1 N/A hues N/A N/A hues astype int N/A palette N/A N/A N/A colorsys hls_to_rgb h_i l s N/A h_i hues N/A palette N/A husl_palette N/A N/A n_colors h s l N/A 6 0.01 0.9 0.65 N/A N/A Get a set of evenly spaced colors in HUSL hue space.

    h, s, and l should be between 0 and 1

    Parameters
    ----------

    n_colors : int
        number of colors in the palette
    h : float
        first hue
    s : float
        saturation
    l : float
        lightness

    Returns
    -------
    palette : list of tuples
        color palette

     N/A hues N/A N/A N/A np linspace 0 1 N/A n_colors 1 N/A -1 N/A hues h N/A hues 1 N/A hues 359 N/A s 99 N/A l 99 N/A palette N/A N/A N/A husl husl_to_rgb h_i s l N/A h_i hues N/A palette N/A mpl_palette N/A N/A name n_colors N/A 6 N/A N/A Return discrete colors from a matplotlib palette.

    Note that this handles the qualitative colorbrewer palettes
    properly, although if you ask for more colors than a particular
    qualitative palette can provide you will fewer than you are
    expecting.

    Parameters
    ----------
    name : string
        name of the palette
    n_colors : int
        number of colors in the palette

    Returns
    -------
    palette : list of tuples
        palette colors in r, g, b format

     N/A brewer_qual_pals N/A Accent Dark2 Paired Pastel1 Pastel2 Set1 Set2 Set3 8 8 12 9 8 9 8 12 N/A N/A N/A name endswith _d N/A N/A pal N/A #333333 N/A N/A N/A pal extend N/A color_palette N/A N/A name replace _d _r 2 N/A cmap N/A blend_palette pal n_colors as_cmap True N/A N/A cmap N/A getattr N/A mpl cm name N/A N/A name brewer_qual_pals N/A N/A bins N/A N/A N/A np linspace 0 1 N/A brewer_qual_pals N/A name N/A n_colors N/A N/A bins N/A N/A N/A np linspace 0 1 N/A n_colors 2 N/A 1 -1 N/A palette N/A list N/A map tuple N/A N/A cmap bins N/A N/A N/A 3 N/A palette N/A dark_palette N/A N/A color n_colors reverse as_cmap N/A 6 False False N/A N/A Make a palette that blends from a deep gray to `color`.

    Parameters
    ----------
    color : matplotlib color
        hex, rgb-tuple, or html color name
    n_colors : int, optional
        number of colors in the palette
    reverse : bool, optional
        if True, reverse the direction of the blend
    as_cmap : bool, optional
        if True, return as a matplotlib colormap instead of list

    Returns
    -------
    palette : list or colormap

     N/A gray #222222 N/A colors N/A reverse N/A color gray N/A gray color N/A N/A blend_palette colors n_colors as_cmap N/A blend_palette N/A N/A colors n_colors as_cmap N/A 6 False N/A N/A Make a palette that blends between a list of colors.

    Parameters
    ----------
    colors : sequence of matplotlib colors
        hex, rgb-tuple, or html color name
    n_colors : int, optional
        number of colors in the palette
    as_cmap : bool, optional
        if True, return as a matplotlib colormap instead of list

    Returns
    -------
    palette : list or colormap

     N/A name N/A N/A - join N/A map str colors N/A pal N/A N/A N/A N/A mpl colors LinearSegmentedColormap from_list name colors N/A N/A as_cmap N/A N/A pal N/A pal N/A N/A np linspace 0 1 n_colors N/A pal N/A xkcd_palette N/A N/A colors N/A N/A N/A Make a palette with color names from the xkcd color survey.

    This is just a simple wrapper around the seaborn.xkcd_rbg dictionary.

    See xkcd for the full list of colors: http://xkcd.com/color/rgb/

     N/A palette N/A N/A xkcd_rgb N/A name N/A name colors N/A N/A color_palette palette N/A len palette N/A cubehelix_palette N/A N/A n_colors start rot gamma hue light dark reverse as_cmap N/A 6 0 0.4 1.0 0.8 0.85 0.15 False False N/A N/A Make a sequential palette from the cubehelix system.

    This produces a colormap with linearly-decreasing (or increasing)
    brightness. That means that information will be preserved if printed to
    black and white or viewed by someone who is colorblind.  "cubehelix" is
    also availible as a matplotlib-based palette, but this function gives the
    user more control over the look of the palette and has a different set of
    defaults.

    Parameters
    ----------
    n_colors : int
        Number of colors in the palette.
    start : float, 0 <= start <= 3
        The hue at the start of the helix.
    rot : float
        Rotations around the hue wheel over the range of the palette.
    gamma : float 0 <= gamma
        Gamma factor to emphasize darker (gamma < 1) or lighter (gamma > 1)
        colors.
    hue : float, 0 <= hue <= 1
        Saturation of the colors.
    dark : float 0 <= dark <= 1
        Intensity of the darkest color in the palette.
    light : float 0 <= light <= 1
        Intensity of the lightest color in the palette.
    reverse : bool
        If True, the palette will go from dark to light.
    as_cmap : bool
        If True, return a matplotlib colormap instead of a list of colors.

    Returns
    -------
    palette : list or colormap

    References
    ----------
    Green, D. A. (2011). "A colour scheme for the display of astronomical
    intensity images". Bulletin of the Astromical Society of India, Vol. 39,
    p. 289-295.

     N/A cdict N/A N/A N/A mpl _cm cubehelix gamma start rot hue N/A cmap N/A N/A N/A mpl colors LinearSegmentedColormap cubehelix cdict N/A x N/A N/A np linspace light dark n_colors N/A pal N/A N/A N/A N/A cmap x N/A N/A N/A 3 tolist N/A reverse N/A N/A pal N/A pal N/A -1 N/A as_cmap N/A N/A x_256 N/A N/A np linspace light dark 256 N/A reverse N/A N/A x_256 N/A x_256 N/A -1 N/A pal_256 N/A cmap x_256 N/A cmap N/A N/A N/A mpl colors ListedColormap pal_256 N/A cmap N/A N/A pal N/A