<tfoot id='Xgr9u'></tfoot>

    <i id='Xgr9u'><tr id='Xgr9u'><dt id='Xgr9u'><q id='Xgr9u'><span id='Xgr9u'><b id='Xgr9u'><form id='Xgr9u'><ins id='Xgr9u'></ins><ul id='Xgr9u'></ul><sub id='Xgr9u'></sub></form><legend id='Xgr9u'></legend><bdo id='Xgr9u'><pre id='Xgr9u'><center id='Xgr9u'></center></pre></bdo></b><th id='Xgr9u'></th></span></q></dt></tr></i><div id='Xgr9u'><tfoot id='Xgr9u'></tfoot><dl id='Xgr9u'><fieldset id='Xgr9u'></fieldset></dl></div>

      <bdo id='Xgr9u'></bdo><ul id='Xgr9u'></ul>

    1. <small id='Xgr9u'></small><noframes id='Xgr9u'>

        <legend id='Xgr9u'><style id='Xgr9u'><dir id='Xgr9u'><q id='Xgr9u'></q></dir></style></legend>

        在 Matplotlib 中设置颜色图的范围

        时间:2023-11-08

          <tbody id='bFl1s'></tbody>
        <legend id='bFl1s'><style id='bFl1s'><dir id='bFl1s'><q id='bFl1s'></q></dir></style></legend>
        <i id='bFl1s'><tr id='bFl1s'><dt id='bFl1s'><q id='bFl1s'><span id='bFl1s'><b id='bFl1s'><form id='bFl1s'><ins id='bFl1s'></ins><ul id='bFl1s'></ul><sub id='bFl1s'></sub></form><legend id='bFl1s'></legend><bdo id='bFl1s'><pre id='bFl1s'><center id='bFl1s'></center></pre></bdo></b><th id='bFl1s'></th></span></q></dt></tr></i><div id='bFl1s'><tfoot id='bFl1s'></tfoot><dl id='bFl1s'><fieldset id='bFl1s'></fieldset></dl></div>
        • <small id='bFl1s'></small><noframes id='bFl1s'>

          <tfoot id='bFl1s'></tfoot>
                  <bdo id='bFl1s'></bdo><ul id='bFl1s'></ul>
                • 本文介绍了在 Matplotlib 中设置颜色图的范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 matplotlib 绘制一个简单的图形:

                  I'm using matplotlib to plot a simple graph:

                  cm=plt.get_cmap('Blues')
                  
                  nx.draw_circular(G,
                          node_color='White',
                          edge_color=range(G.number_of_edges()),
                          edge_cmap=cm,
                          node_size=900,
                          width=4
                          )
                  

                  我想在颜色图蓝色"上设置一个范围,以删除绘图中不可见的白色.

                  I want to set a range on the colormap 'Blues' in such a way to delete the white color which is not visible in the draw.

                  请帮忙!

                  抱歉英语不好.

                  推荐答案

                  范围(或 规范化) 并不是颜色图的真正功能,但通常在使用颜色图进行绘图的函数中实现为功能.例如,imshow 使用 vminvmax,因此您可以尝试将这些作为关键字与 draw_circular 一起使用(我找不到文档),或者可能是 norm.

                  The range (or normilization) is not really a feature of the colormap, but is often implemented as a feature in the functions that plot using colormaps. For example, imshow uses vmin and vmax, so you might try using these as keywords with draw_circular (I can't find the documentation), or maybe norm.

                  除此之外,您还可以根据自己的需要制作具有精确颜色排列的颜色图.有很多关于如何制作自定义颜色图的示例,以及一些可用的不同方法.这里(a, b, c、d) 是一些可能的例子对你有用.

                  Other than this, you can make your own colormap with exact color arrangement that you want. There are plenty of examples on how to make custom colormaps, and a few different approaches available. Here (a, b, c, d) are a few examples that might be useful to you.

                  这篇关于在 Matplotlib 中设置颜色图的范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:使用 Python 和 comtypes 使用数组设置 Excel 范围? 下一篇:如何在 Python 中使用 Pandas 创建一系列数字

                  相关文章

                  1. <legend id='Sg6Kz'><style id='Sg6Kz'><dir id='Sg6Kz'><q id='Sg6Kz'></q></dir></style></legend>
                      <bdo id='Sg6Kz'></bdo><ul id='Sg6Kz'></ul>

                      <small id='Sg6Kz'></small><noframes id='Sg6Kz'>

                    1. <i id='Sg6Kz'><tr id='Sg6Kz'><dt id='Sg6Kz'><q id='Sg6Kz'><span id='Sg6Kz'><b id='Sg6Kz'><form id='Sg6Kz'><ins id='Sg6Kz'></ins><ul id='Sg6Kz'></ul><sub id='Sg6Kz'></sub></form><legend id='Sg6Kz'></legend><bdo id='Sg6Kz'><pre id='Sg6Kz'><center id='Sg6Kz'></center></pre></bdo></b><th id='Sg6Kz'></th></span></q></dt></tr></i><div id='Sg6Kz'><tfoot id='Sg6Kz'></tfoot><dl id='Sg6Kz'><fieldset id='Sg6Kz'></fieldset></dl></div>
                    2. <tfoot id='Sg6Kz'></tfoot>