Merge branch 'add-save'
This commit is contained in:
commit
538c2e2dff
@ -2,6 +2,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
import numpy as np
|
||||
from PySide.QtGui import QMessageBox
|
||||
from obspy.core import (read, Stream)
|
||||
from obspy import readEvents
|
||||
@ -93,7 +94,8 @@ class Data(object):
|
||||
not implemented: {1}'''.format(evtformat, e))
|
||||
|
||||
def plotData(self, widget):
|
||||
pass #axes = widget.axes
|
||||
time_ax = np.arange(0, len(self.wfdata[0].data)/self.wfdata[0].stats.sampling_rate, self.wfdata[0].stats.delta)
|
||||
widget.axes.plot(time_ax, self.wfdata[0].data)
|
||||
|
||||
def getID(self):
|
||||
try:
|
||||
|
@ -11,7 +11,7 @@ matplotlib.use('Qt4Agg')
|
||||
matplotlib.rcParams['backend.qt4'] = 'PySide'
|
||||
|
||||
from matplotlib.figure import Figure
|
||||
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg
|
||||
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
|
||||
from PySide.QtGui import (QAction,
|
||||
QApplication,
|
||||
QComboBox,
|
||||
@ -41,14 +41,14 @@ from pylot.core.read import FilterOptions
|
||||
from pylot.core.util.defaults import OUTPUTFORMATS
|
||||
|
||||
|
||||
class MPLWidget(FigureCanvasQTAgg):
|
||||
class MPLWidget(FigureCanvas):
|
||||
|
||||
def __init__(self, parent=None, xlabel='x', ylabel='y', title='Title'):
|
||||
super(MPLWidget, self).__init__(Figure())
|
||||
|
||||
self.setParent(parent)
|
||||
self.figure = Figure()
|
||||
self.canvas = FigureCanvasQTAgg(self.figure)
|
||||
self.canvas = FigureCanvas(self.figure)
|
||||
self.axes = self.figure.add_subplot(111)
|
||||
|
||||
self.axes.set_xlabel(xlabel)
|
||||
|
Loading…
Reference in New Issue
Block a user