Drawing process module using matplotlib
Import module
import matplotlib.pyplot as plt
1. Create a canvas
plt.figure()
2. Drawing
Prepare data, drawings, graphics and add embellishments
#准备数据
x=[1,2,3,4,5]
y=[10,4,6,2,8]
#进行绘图
#plot():绘制折线图
plt.plot(x,y)
3. Graphic Display
#图形展示
plt.show()
The results shown in FIG Run: