本文整理汇总了Python中Plotter.Plotter.export方法的典型用法代码示例。如果您正苦于以下问题:Python Plotter.export方法的具体用法?Python Plotter.export怎么用?Python Plotter.export使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plotter.Plotter
的用法示例。
在下文中一共展示了Plotter.export方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MeinDialog
# 需要导入模块: from Plotter import Plotter [as 别名]
# 或者: from Plotter.Plotter import export [as 别名]
class MeinDialog(QtGui.QDialog, Dlg):
def __init__(self):
QtGui.QDialog.__init__(self)
self.setupUi(self)
self.datreader = DataReader()
self.Plotter = Plotter()
self.directory = os.getcwd()
self.WorkingD_label.setText(self.directory)
self.ShowFile_PB.clicked.connect(self.show_file_start) # shows first lines in the textbrowser
self.ReadSets_PB.clicked.connect(self.read_set) # reads all files that start with lineEdit and creates a dict in the Sets_Dict[set][file][column]
self.PlotFile_PB.clicked.connect(self.plotfile)
self.MAV_slider.valueChanged.connect(self.mav_valuechanged)
self.MAV_slider.sliderReleased.connect(self.mav_released)
self.LP_slider.sliderReleased.connect(self.lp)
self.LP_slider.valueChanged.connect(self.lp_valuechanged)
self.HP_slider.sliderReleased.connect(self.hp)
self.HP_slider.valueChanged.connect(self.hp_valuechanged)
#self.CutZeros.clicked.connect(self.cut_zeros_filedict)
self.PlotColumn_PB.clicked.connect(self.plotcolumn)
self.Clear_PB.clicked.connect(self.clear)
self.Export_PB.clicked.connect(self.export)
self.FFT_PB.clicked.connect(self.fft)
self.ReadLabBook.clicked.connect(self.readlabbook)
self.MAVEdit.returnPressed.connect(self.mav_released)
self.MVAREdit.returnPressed.connect(self.mvar)
self.MMMINEdit.returnPressed.connect(self.mmmin)
self.Corr_PB.clicked.connect(self.correlate)
self.Select_PB.clicked.connect(self.open_filedialog)
self.Pyro_PB.clicked.connect(self.read_pyro)
self.Log_PB.clicked.connect(self.log_scale)
self.Sets_Dict = dict() # contains [set1][file1][column1] - the data
self.Files_Dict = dict() # contains [filename 1]: 'set-filename'
self.Columns_Dict = dict() # contains[set-filename-column]: same
def log_scale(self):
print 'log_scale'
f = self.Plotter.figure_list[int(self.CurrentFigureEdit.text())]
ax = f.axes[int(self.ax_scale_edit.text())]
if ax.get_yscale == 'linear':
ax.set_yscale('log')
print 'log'
else:
ax.set_yscale('linear')
plt.title('')
def read_pyro(self):
print 'read_pyro'
filelist = list()
filelist = [f for f in os.listdir(self.directory) if f.startswith(self.lineEdit.text())]
print filelist
filelist = [os.path.join(self.directory, f) for f in filelist]
cols_of_interest = [str(c).rstrip(' ').lstrip(' ') for c in self.ColsOfInterestEdit.text().split(',')]
print cols_of_interest
self.Sets_Dict[str(self.lineEdit.text())] = self.datreader.read_pyro(filelist, cols_of_interest)
#self.cut_zeros_filedict()
self.update_SetScroll()
self.update_Files_Dict()
self.update_FileScroll()
self.update_Columns_Dict()
self.update_ColumnScroll()
print self.Sets_Dict.keys()
def open_filedialog(self):
files = str(QtGui.QFileDialog.getOpenFileName(None, QtCore.QString('Select File'), QtCore.QString(os.getcwd()),QtCore.QString('*.txt')))
print files
self.lineEdit.setText(os.path.basename(files))
self.WorkingD_label.setText(os.path.dirname(files))
self.directory = os.path.dirname(files)
def correlate(self):
fnum = self.Plotter.plot_eval(self.Plotter.correlate, 0, int(self.CurrentFigureEdit.text()), self.InActiveFigure.isChecked(), self.SelectedRange.isChecked(), self.SubtractMean_PB.isChecked())
self.CurrentFigureEdit.setText(str(fnum))
def readlabbook(self):
#self.HistoryEdit.insertPlainText(self.HistoryEdit.text())
print 'read labbook'
lab_dict = self.datreader.get_labdict(str(self.lineEdit.text()))
filelist = lab_dict.keys()
print filelist
path = self.directory
filelist = [os.path.join(path, f) for f in filelist if f in os.listdir(path)]
print filelist
cols_of_interest = [str(c).rstrip(' ').lstrip(' ') for c in self.ColsOfInterestEdit.text().split(',')]
print cols_of_interest
self.Sets_Dict[str(self.lineEdit.text())] = self.datreader.read_files(filelist, cols_of_interest)
#self.cut_zeros_filedict()
lab_dict = self.datreader.get_labdict(str(self.lineEdit.text()))
for f in self.Sets_Dict[str(self.lineEdit.text())].keys():
for info in lab_dict[f].keys():
self.Sets_Dict[str(self.lineEdit.text())][f][info] = lab_dict[f][info]
self.update_SetScroll()
self.update_Files_Dict()
self.update_FileScroll()
self.update_Columns_Dict()
self.update_ColumnScroll()
print self.Sets_Dict.keys()
#.........这里部分代码省略.........