1.报错提示: 2.报错原因:模块pylab没有属性subplot 3.解决方法:import pylab as pl 注释掉,改成 import matplotlib.pyplot as pl import matplotlib.pyplot as pl