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?
<
A simple trick to change a particular point marker shape, size... is to first plot it with all the other data then plot one more plot only with that point(or set of points if you want to change the style of multiple points). Suppose we want to change the marker shape of second point:
x = [1,2,3,4,5]
y = [2,1,3,6,7]
plt.plot(x, y, "-o")
x0 = [2]
y0 = [1]
plt.plot(x0, y0, "s")
plt.show()
Result is: Plot with multiple markers