数据1
数据目标:曲线图
- F12,如图位置输入
JSON.stringify(dataSeries.dataPoints)
- copy,粘贴到data.txt
数据是一个列表,里面是多个字典
编写程序如下:
代码语言:javascript复制import json as js
datafile = 'data1.txt'
resultfile = 'result.txt'
result = open(resultfile,'w',encoding='utf-8')
with open(datafile,'r',encoding='utf-8') as file:
data = js.load(file)
for data_i in data:
for k,v in data_i.items():
if k == 'x':
strline = v[0:10] ' '
if k == 'y':
strline = strline str(v)
result.write(strline 'n')
result.close()
得到数据结果
数据2
数据目标:曲线图
- 查看图形源代码
- 找到数据所在行
- 复制到文本
- 编写程序
import json as js
datafile = 'data.txt'
resultfile = 'result.txt'
result = open(resultfile,'w',encoding='utf-8')
with open(datafile,'r',encoding='utf-8') as file:
data = js.load(file)
for data_i in data:
strline = ''
for v in data_i:
strline = strline str(v) ' '
result.write(strline 'n')
result.close()
- 得到结果