small scatter plot markers in matplotlib are always black

后端 未结 4 459
后悔当初
后悔当初 2021-02-02 05:47

I\'m trying to use matplotlib to make a scatter plot with very small gray points. Because of the point density, the points need to be small. The problem is that the scatter()

4条回答
  •  情歌与酒
    2021-02-02 06:21

    scatter([1,2,3], [2,4,5], s=1, facecolor='0.5', lw = 0)
    

    This sets the markersize to 1 (s=1), the facecolor to gray (facecolor='0.5'), and the linewidth to 0 (lw=0).

提交回复
热议问题