I am trying to add these tiny bubbles at the end of line plots. How to do that in matplotlib?
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:
Another way to do this (on top of the solution present by @MrNobody33) is to superimpose line graphs and scatter plots. That way, if you have specific values you want to showcase, you can add them to the scatter plots.
Code Example
import matplotlib.pyplot as plt
# Show the Lines
plt.plot([0, 10], [0, 10], color='b')
plt.plot([2, 7], [0, 3], color='r')
# Show the endpoints using Scatter plots
plt.scatter([10], [10], color='b')
plt.scatter([7], [3], color='r')
# show the graph
plt.show()