我试图读出一个包含来自管式炉的大量数据的CSV,并绘制数据以便我们可以更好地调整炉子 - 如何在定义的变量上使用matplotlib,这是正确的方法定义,以及我应该如何打印我的变量,以便我可以看到我正在使用
import numpy as np
import matplotlib.pyplot as plt
class CVD:
def __init__(self):
self.data = [genfromtxt('/Users/Derek/Desktop/DM041352.txt', delimiter=",", skip_header=4)]
self.time = self.data[:,0]
self.sp1 = self.data[:,1]
self.sp2 = self.data[:,2]
self.sp3 = self.data[:,3]
self.temp1 = self.data[:,4]
self.temp2 = self.data[:,5]
self.temp3 = self.data[:,6]
self.mf1 = self.data[:,7]
self.mf2 = self.data[:,8]
self.mf3 = self.data[:,9]
self.textsp = self.data[:,10]
self.text = self.data[:,11]
self.itemList=['Time','Set Point 1','Set Point 2','Set Point 3',
'Temp 1', 'Temp 2', 'Temp 3', 'Mass Flow A', 'Mass Flow B',
'Mass Flow C', 'T Ext SP', 'T Ext']
print(self.text)