代码如下:
import matplotlib.pyplot as plt squares = [1, 4, 9, 16, 25] plt.plot(squares) plt.show()
运行结果:
D:\anaconda\python.exe "E:/Python编程从入门到精通配套资料/Self-taught Python/mpl_squares.py"
1
2
3
4
[1, 2, 3, 4, 5]
[2, 4, 6, 8, 10]
Traceback (most recent call last):
File "E:/Python编程从入门到精通配套资料/Self-taught Python/mpl_squares.py", line 1, in <module>
import