Display the value of each data, that is, the position of the x and y values
figure(name, figsize = (w, h), dpi = n)
Set picture size
01 Draw basic graphics
plt.plot([1,4],[2,8],[3,10])
plt.show()# 随机图形
a =[]for i inrange(10):
b =list(np.random.randint(i, i+5,2))
a.append(b)print(a)
plt.plot(a)
plt.show()
plt.plot([1,4],[2,8],[3,10])
plt.show()
Draw a line chart
a = np.arange(5)print(a)# [0 1 2 3 4]
s = np.square(a)print(s)# [ 0 1 4 9 16]
plt.plot(a,s)
plt.show()