相关疑难解决方法(0)

如何用Python中的空心圆做散点图?

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

我试过facecolors=None,但没有用.

python geometry scatter matplotlib scatter-plot

143
推荐指数
5
解决办法
18万
查看次数

未填充方块的 Matplotlib 散点图

我想制作一个带有未填充方块的散点图。不是scattermarkerfacecolor识别的选项。我做了一个,但填充样式似乎被散点图忽略了。有没有办法在散点图中制作未填充的标记?MarkerStyle

import matplotlib.markers as markers
import matplotlib.pyplot as plt 
import numpy as np

def main():
    size = [595, 842] # in pixels
    dpi = 72. # dots per inch
    figsize = [i / dpi for i in size]
    fig = plt.figure(figsize=figsize)
    ax = fig.add_axes([0,0,1,1])

    x_max = 52
    y_max = 90
    ax.set_xlim([0, x_max+1])
    ax.set_ylim([0, y_max + 1]) 

    x = np.arange(1, x_max+1)
    y = [np.arange(1, y_max+1) for i in range(x_max)]

    marker = markers.MarkerStyle(marker='s', fillstyle='none')
    for temp in zip(*y): …
Run Code Online (Sandbox Code Playgroud)

python matplotlib

3
推荐指数
1
解决办法
6013
查看次数

标签 统计

matplotlib ×2

python ×2

geometry ×1

scatter ×1

scatter-plot ×1