<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 中设置颜色图的范围

        Setting range of a colormap in Matplotlib(在 Matplotlib 中设置颜色图的范围)

          <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 中设置颜色图的范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  What happens when you compare 2 pandas Series(当你比较 2 个 pandas 系列时会发生什么)
                  Quickly find differences between two large text files(快速查找两个大文本文件之间的差异)
                  Python - Compare 2 files and output differences(Python - 比较 2 个文件和输出差异)
                  Why do comparisions between very large float values fail in python?(为什么在 python 中非常大的浮点值之间的比较会失败?)
                  Dictionary merge by updating but not overwriting if value exists(字典通过更新合并,但如果值存在则不覆盖)
                  Find entries of one text file in another file in python(在python中的另一个文件中查找一个文本文件的条目)

                  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'>

                            <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>
                              <tbody id='Sg6Kz'></tbody>
                          • <tfoot id='Sg6Kz'></tfoot>