Set markers for individual points on a line in Matplotlib

前端 未结 4 922
慢半拍i
慢半拍i 2020-11-27 08:49

I have used Matplotlib to plot lines on a figure. Now I would now like to set the style, specifically the marker, for individual points on the line. How do I do this?

<
4条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-27 09:47

    For future reference - the Line2D artist returned by plot() also has a set_markevery() method which allows you to only set markers on certain points - see https://matplotlib.org/api/_as_gen/matplotlib.lines.Line2D.html#matplotlib.lines.Line2D.set_markevery

提交回复
热议问题