1
0
forked from uestc/Notes
Notes/python/Matplotlib使用笔记.md
2024-10-17 15:36:48 +08:00

291 B

Matplotlib使用笔记

1、Matplotlib结合numpy绘制图形

import numpy as np 
from matplotlib import pyplot as plt 
x = np.arange(1,11) 
y =  2  * x +  5 
plt.title("Matplotlib demo") 
plt.xlabel("x axis caption") 
plt.ylabel("y axis caption") 
plt.plot(x,y) 
plt.show()