简体   繁体   English

如何绘制一个点而不用 matplotlib.pyplot.plot 填充它?

[英]how do I draw a dot without filling it with matplotlib.pyplot.plot?

Both plt.scatter and plt.plot can draw dots plt.scatter 和 plt.plot 都可以画点

this code draws a dot without filling it此代码绘制一个点而不填充它

plt.scatter(1, 1, s=80, facecolors='none', edgecolors='r')

在此处输入图像描述

while plt.plot doesn't seem to support facecolors propertyplt.plot似乎不支持facecolors属性

plt.plot(1,1,'ro')

在此处输入图像描述

how do I draw a dot without filling it with plt.plot?如何绘制一个点而不用 plt.plot 填充它?

For regular plots, you can use markerfacecolor :对于常规绘图,您可以使用markerfacecolor

plt.plot(1, 1, 'ro', markerfacecolor='none')

plt.plot with markerfacecolor='none'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM