函数

来源:互联网 发布:raft算法 term 编辑:程序博客网 时间:2024/06/05 06:43

tolist():将一堆的数据(数组或矩阵)转换为集合

>>> a = np.array([1, 2])>>> a.tolist()[1, 2]>>> a = np.array([[1, 2], [3, 4]])>>> list(a)[array([1, 2]), array([3, 4])]>>> a.tolist()[[1, 2], [3, 4]]

clf() :清除当前图像窗口。
调用格式:
clf
clf(‘reset’)
clf(fig)
clf(fig,’reset’)
figure_handle=clf(…)

axis()
二维坐标系下坐标范围
axis([XMIN XMAX YMIN YMAX])
三维坐标系下坐标范围
axis([XMIN XMAX YMIN YMAX ZMIN ZMAX])
三维坐标系下坐标范围和当前坐标系下颜色范围限定
axis([XMIN XMAX YMIN YMAX ZMIN ZMAX CMIN CMAX])

cur()
cur = (1.0,1.0) # cur保留的是绘制光标的位置,初始化(1,1)。
cur[0] 行坐标
cur[1] 列坐标

0 0