matplotlib 画廊——官方的一些绘图例子
[https://matplotlib.org/stable/gallery/index.html]
一、Numpy 数组
导入numpy包
import numpy as np
1. .zeros命令创建0数组
arr1 = np.zeros(n) #n为创建的一维数组所包含的元素个数
arr2 = np.zeros([n1,n2]) #表示是n1行,n2 列的数组,按照每行为一个列表存储
arr2 = [[0.,0.,0.],[0.,0.,0.],[0.,0.,0.],[0.,0.,0.],[0.,0.,0.]]
dtype 语句定义数组类型
arr2 = np.zeros([5,3],dtype = int)
arr2 = [[0,0,0],[0,0,0],[0,0,0],[0