seaborn.diverging_palette

    在两个 HUSL 颜色直接建立一个发散调色板。

    如果您在使用 IPython notebook,您还可以通过 函数交互式选择调色板。

    参数:h_neg, h_pos:float in [0, 359]

    图的正负范围的锚定色调

    s:[0, 100] 范围内的浮点数,可选

    :[0, 100] 范围内的浮点数,可选

    图的两个范围的锚定亮度

    center:{“light”, “dark”}, 可选

    调色板中心为亮或暗

    :bool, 可选

    返回值:palette or cmap:seaborn color palette or matplotlib colormap

    类似列表的颜色对象的 RGB 元组,或者可以将连续值映射到颜色的 colormap 对象,具体取决于 as_cmap 参数的值。

    另外

    例子

    生成一个蓝-白-红调色板:

    生成一个更亮的绿-白-紫调色板:

    http://seaborn.pydata.org/_images/seaborn-diverging_palette-2.png

    生成一个蓝-黑-红调色板:

    生成一个 colormap 对象: