<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # seaborn.cubehelix_palette > 譯者:[Modrisco](https://github.com/Modrisco) ```py seaborn.cubehelix_palette(n_colors=6, start=0, rot=0.4, gamma=1.0, hue=0.8, light=0.85, dark=0.15, reverse=False, as_cmap=False) ``` 用 cubehelix 系統制作順序調色板。 生成亮度呈線性減小(或增大)的 colormap。這意味著 colormap 在轉換為黑白模式時(用于打印)的信息將得到保留,且對色盲友好。“cubehelix” 也可以作為基于 matplotlib 的調色板使用,但此函數使用戶可以更好地控制調色板的外觀,并且具有一組不同的默認值。 除了使用這個函數,還可以在 seaborn 中使用字符串速記生成 cubehelix 調色板。 請參見下面的示例。 參數:`n_colors`:int > 調色板中的顏色數。 `start`:float, 0 &lt;= start &lt;= 3 > 第一個色調。 `rot`:float > 圍繞調色板范圍內的色相控制盤旋轉。 `gamma`:float 0 &lt;= gamma > Gamma 系數用以強調較深 (Gamma < 1) 或較淺 (Gamma > 1) 的顏色。 `hue`:float, 0 &lt;= hue &lt;= 1 > 顏色的飽和度。 `dark`:float 0 &lt;= dark &lt;= 1 > 調色板中最暗顏色的強度。 `light`:float 0 &lt;= light &lt;= 1 > 調色板中最淺顏色的強度。 `reverse`:bool > 如果為 True 值,則調色板將從暗到亮。 `as_cmap`:bool > 如果為 True 值,則返回 matplotlib colormap 而不是顏色列表。 返回值:`palette or cmap`:seaborn 調色板或者 matplotlib colormap > 類似列表的顏色對象的 RGB 元組,或者可以將連續值映射到顏色的 colormap 對象,具體取決于 `as_cmap` 參數的值。 另外 啟動交互式小部件以調整 cubehelix 調色板參數。創建具有暗低值的連續調色板。創建具有亮低值的連續調色板。 參考 Green, D. A. (2011). “一種用于顯示天文強度圖像的配色方案”. Bulletin of the Astromical Society of India, Vol. 39, p. 289-295. 例子 生成默認調色板: ```py >>> import seaborn as sns; sns.set() >>> sns.palplot(sns.cubehelix_palette()) ``` ![http://seaborn.pydata.org/_images/seaborn-cubehelix_palette-1.png](https://img.kancloud.cn/c4/9c/c49cb1098695a8056abd882557e0e3b5_540x90.jpg) 從相同的起始位置向后旋轉: ```py >>> sns.palplot(sns.cubehelix_palette(rot=-.4)) ``` ![http://seaborn.pydata.org/_images/seaborn-cubehelix_palette-2.png](https://img.kancloud.cn/66/42/6642e8c2eeabdefcadab2f5444d8aa73_540x90.jpg) 使用不同的起點和較短的旋轉: ```py >>> sns.palplot(sns.cubehelix_palette(start=2.8, rot=.1)) ``` ![http://seaborn.pydata.org/_images/seaborn-cubehelix_palette-3.png](https://img.kancloud.cn/35/d2/35d26342cceba0189ecde1535268da1a_540x90.jpg) 反轉亮度漸變方向: ```py >>> sns.palplot(sns.cubehelix_palette(reverse=True)) ``` ![http://seaborn.pydata.org/_images/seaborn-cubehelix_palette-4.png](https://img.kancloud.cn/1d/5f/1d5f31a760cd11f5f169fce48831d65f_540x90.jpg) 生成一個 colormap 對象: ```py >>> from numpy import arange >>> x = arange(25).reshape(5, 5) >>> cmap = sns.cubehelix_palette(as_cmap=True) >>> ax = sns.heatmap(x, cmap=cmap) ``` ![http://seaborn.pydata.org/_images/seaborn-cubehelix_palette-5.png](https://img.kancloud.cn/48/e4/48e4bf2d289e54dfc6574f69d835f9f8_576x432.jpg) 使用完整的亮度范圍: ```py >>> cmap = sns.cubehelix_palette(dark=0, light=1, as_cmap=True) >>> ax = sns.heatmap(x, cmap=cmap) ``` ![http://seaborn.pydata.org/_images/seaborn-cubehelix_palette-6.png](https://img.kancloud.cn/77/2d/772d9438a7fccbbf8ca9968a63969c46_576x432.jpg) 使用 [`color_palette()`](seaborn.color_palette.html#seaborn.color_palette "seaborn.color_palette") 函數接口: ```py >>> sns.palplot(sns.color_palette("ch:2,r=.2,l=.6")) ``` ![http://seaborn.pydata.org/_images/seaborn-cubehelix_palette-7.png](https://img.kancloud.cn/45/1f/451f59843ba906b42570702797c3e484_540x90.jpg)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看