坐标文本格式类似
10 11
12 34
11 55
#脚本文件 import matplotlib.pyplot as plt import numpy as np x = [] y = [] with open('message.txt','r') as f: datas = f.readlines() for data in datas: arr = data.split(' ') x.append(int(arr[0])) y.append(int(arr[1])) plt.plot(x,y,'ks',ms=1) plt.show()
标签:arr,plt,int,坐标,import,文本,append,图片 From: https://www.cnblogs.com/willingyut/p/17664536.html