How to avoid line crossing the markers

Hi everybody! I would like to replicate the plot below:

I tried with something like: plt.plot(x, y, color=‘red’,fillstyle=‘none’, marker=“*”,markersize=10), but the problem is that the line crosses the markers, and I would like to avoid this. Any idea on how to do that?

Thank you!

How about

plt.plot([5, 2, 4, 3], color="red", markerfacecolor="white", marker="*", markersize=10)


1 Like