Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add these tiny dots at the end of line plots in matplotlib?

I am trying to add these tiny bubbles at the end of line plots. How to do that in matplotlib?

enter image description here

like image 501
sbhhdp Avatar asked Aug 30 '25 17:08

sbhhdp


1 Answers

You could try with plt.plot.markevery:

import numpy as np
import matplotlib.pyplot as plt
delta = 0.11
x = np.linspace(0, 10 - 2 * delta, 200) + delta
y = np.sin(x) + 1.0 + delta


plt.plot(x,y,'o',ls='-', ms=8,markevery=[-1])

Output:

enter image description here

like image 80
MrNobody33 Avatar answered Sep 02 '25 07:09

MrNobody33