plt.plot(x,y,format_string,**kwargs)
When drawing multiple curves, the x of each curve cannot be omitted, and x can be omitted when drawing only one curve.
Example 1: Draw four curves:
import matplotlib.pyplot as plt
import numpy as np
a = np.arange(10)
plt.plot(a,a*1.5,a,a*2.5,a,a*3.5,a,a*4.5)
plt.show()
Results:
1. Color characters
2. Style characters
3. Marking characters
Example 2: Add style
import matplotlib.pyplot as plt
import numpy as np
a = np.arange(10)
plt.plot(a,a*1.5,'go-',a,a*2.5,'rx',a,a*3.5,'*',a,a*4.5,'b-.')
plt.show()
result: