Adding markers to a plot in Matplotlib
We can add markers to a plot in Matplotlib by passing the
marker argument when calling the
x = [1,2,4]y = [3,3,3]plt.plot(x, y, marker="x")plt.show()
This produces the following:
We have used
"x" as the marker in this case, however, there are other available options which can be confirmed from the official documentation here.