How to use Matplotlib markers
import numpy as np
import matplotlib.pyplot as plt
ypoints = np.array([3,4,10,12])
#for solid line
#plt.plot(ypoints, '-')
#for dashed line
#plt.plot(ypoints,'--')
#for dashed and dotted lines
#change the colour and size of the marker
#plt.plot(ypoints,marker = 'o',ms=20,mec='r')
#change the face colour to red
plt.plot(ypoints,marker = 'o',ms = 20, mfc = 'g')
plt.show()
Comments
Post a Comment