参考莫烦教学视频:https://morvanzhou.github.io/tutorials/data-manipulation/plt/2-2-figure/
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(-3, 3, 50)
y1=2*x + 1
y2 = x**2
plt.figure()#matplotlib 的 figure 就是一个 单独的 figure 小窗口
plt.plot(x, y1)#在figure1里显示x-y1#
plt.figure(num=2, figsize=(8, 5)) #指定figure窗口序号和大小
plt.plot(x, y2)#在figure2里显示x-y2#
# plot the second curve in this figure with certain parameters
plt.figure()#在figure3里显示x-y1和x-y2两条线
plt.plot(x, y1, color='red', linewidth=1.0, linestyle='--')
plt.plot(x, y2)
plt.show()