plot point python matplotlib code example
Example 1: python add a point to a plot
plt.plot(x, y, 'marker')
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0, 10, 100)
fig = plt.figure()
plt.plot(x, np.sin(x), '-')
plt.plot(5, 0, 'ro')
Example 2: how to plotting points on matplotlib
import matplotlib.pyplot as plt
import numpy as np
data = np.random.rand(1024,2)
plt.scatter(data[:,0],data[:,1])
plt.show()
// Don't be
// fooled by this simplicity— plt.scatter() is a rich command.