<bdo id='j8Ud0'></bdo><ul id='j8Ud0'></ul>
    <tfoot id='j8Ud0'></tfoot>
  1. <small id='j8Ud0'></small><noframes id='j8Ud0'>

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

      如何在 Python 中用空圆圈绘制散点图?

      时间:2023-09-11

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

            • <bdo id='dckxP'></bdo><ul id='dckxP'></ul>

            • <legend id='dckxP'><style id='dckxP'><dir id='dckxP'><q id='dckxP'></q></dir></style></legend>
                <tbody id='dckxP'></tbody>

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

                本文介绍了如何在 Python 中用空圆圈绘制散点图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                在 Python 中,使用 Matplotlib,如何绘制带有 empty 圆圈的散点图?目标是在 scatter() 已经绘制的 一些 彩色圆盘周围绘制空圆圈,以便突出显示它们,理想情况下无需重新绘制彩色圆圈.

                我试过facecolors=None,没有用.

                解决方案

                来自 关于markeredgecolormarkerfacecolor的使用.

                In Python, with Matplotlib, how can a scatter plot with empty circles be plotted? The goal is to draw empty circles around some of the colored disks already plotted by scatter(), so as to highlight them, ideally without having to redraw the colored circles.

                I tried facecolors=None, to no avail.

                解决方案

                From the documentation for scatter:

                Optional kwargs control the Collection properties; in particular:
                
                    edgecolors:
                        The string ‘none’ to plot faces with no outlines
                    facecolors:
                        The string ‘none’ to plot unfilled outlines
                

                Try the following:

                import matplotlib.pyplot as plt 
                import numpy as np 
                
                x = np.random.randn(60) 
                y = np.random.randn(60)
                
                plt.scatter(x, y, s=80, facecolors='none', edgecolors='r')
                plt.show()
                

                Note: For other types of plots see this post on the use of markeredgecolor and markerfacecolor.

                这篇关于如何在 Python 中用空圆圈绘制散点图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:如何使用python计算地球表面多边形的面积? 下一篇:将一个 GeoPandas 数据框中的每个点链接到另一个数

                相关文章

                最新文章

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

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