added scrollbar vor main wf plot for huge datasets, some changes in basemap figure size
This commit is contained in:
parent
efe47d7a20
commit
50ee351995
19
QtPyLoT.py
19
QtPyLoT.py
@ -185,6 +185,7 @@ class MainWindow(QMainWindow):
|
|||||||
wf_tab = QtGui.QWidget()
|
wf_tab = QtGui.QWidget()
|
||||||
array_tab = QtGui.QWidget()
|
array_tab = QtGui.QWidget()
|
||||||
events_tab = QtGui.QWidget()
|
events_tab = QtGui.QWidget()
|
||||||
|
self.wf_scroll_area = QtGui.QScrollArea()
|
||||||
self.wf_layout = QtGui.QVBoxLayout()
|
self.wf_layout = QtGui.QVBoxLayout()
|
||||||
self.array_layout = QtGui.QVBoxLayout()
|
self.array_layout = QtGui.QVBoxLayout()
|
||||||
self.events_layout = QtGui.QVBoxLayout()
|
self.events_layout = QtGui.QVBoxLayout()
|
||||||
@ -195,7 +196,9 @@ class MainWindow(QMainWindow):
|
|||||||
self.tabs.addTab(array_tab, 'Array Map')
|
self.tabs.addTab(array_tab, 'Array Map')
|
||||||
self.tabs.addTab(events_tab, 'Eventlist')
|
self.tabs.addTab(events_tab, 'Eventlist')
|
||||||
|
|
||||||
self.wf_layout.addWidget(self.dataPlot)
|
self.wf_layout.addWidget(self.wf_scroll_area)
|
||||||
|
self.wf_scroll_area.setWidget(self.dataPlot)
|
||||||
|
self.wf_scroll_area.setWidgetResizable(True)
|
||||||
self.init_array_tab()
|
self.init_array_tab()
|
||||||
self.init_event_table()
|
self.init_event_table()
|
||||||
self.tabs.setCurrentIndex(0)
|
self.tabs.setCurrentIndex(0)
|
||||||
@ -987,11 +990,19 @@ class MainWindow(QMainWindow):
|
|||||||
alter_comp = COMPNAME_MAP[comp]
|
alter_comp = COMPNAME_MAP[comp]
|
||||||
wfst = self.get_data().getWFData().select(component=comp)
|
wfst = self.get_data().getWFData().select(component=comp)
|
||||||
wfst += self.get_data().getWFData().select(component=alter_comp)
|
wfst += self.get_data().getWFData().select(component=alter_comp)
|
||||||
self.getPlotWidget().plotWFData(wfdata=wfst, title=title, mapping=False)
|
height_need = len(self.data.getWFData())*12
|
||||||
plotDict = self.getPlotWidget().getPlotDict()
|
plotWidget = self.getPlotWidget()
|
||||||
|
if plotWidget.frameSize().height() < height_need:
|
||||||
|
plotWidget.setFixedHeight(height_need)
|
||||||
|
else:
|
||||||
|
plotWidget.setFixedHeight(plotWidget.frameSize().height())
|
||||||
|
plotWidget.figure.tight_layout()
|
||||||
|
plotWidget.plotWFData(wfdata=wfst, title=title, mapping=False)
|
||||||
|
plotDict = plotWidget.getPlotDict()
|
||||||
pos = plotDict.keys()
|
pos = plotDict.keys()
|
||||||
labels = [plotDict[n][0] for n in pos]
|
labels = [plotDict[n][0] for n in pos]
|
||||||
self.getPlotWidget().setYTickLabels(pos, labels)
|
plotWidget.setYTickLabels(pos, labels)
|
||||||
|
plotWidget.figure.tight_layout()
|
||||||
|
|
||||||
def plotZ(self):
|
def plotZ(self):
|
||||||
self.setComponent('Z')
|
self.setComponent('Z')
|
||||||
|
@ -1 +1 @@
|
|||||||
413a-dirty
|
efe47-dirty
|
||||||
|
@ -95,6 +95,7 @@ class map_projection(QtGui.QWidget):
|
|||||||
|
|
||||||
self.toolbar = NavigationToolbar(self.canvas, self)
|
self.toolbar = NavigationToolbar(self.canvas, self)
|
||||||
self.main_box.addWidget(self.toolbar)
|
self.main_box.addWidget(self.toolbar)
|
||||||
|
self.figure = fig
|
||||||
|
|
||||||
def init_stations(self):
|
def init_stations(self):
|
||||||
def get_station_names_lat_lon(parser):
|
def get_station_names_lat_lon(parser):
|
||||||
@ -184,6 +185,7 @@ class map_projection(QtGui.QWidget):
|
|||||||
basemap.fillcontinents(color='grey', lake_color='aqua')
|
basemap.fillcontinents(color='grey', lake_color='aqua')
|
||||||
basemap.drawcoastlines()
|
basemap.drawcoastlines()
|
||||||
self.basemap = basemap
|
self.basemap = basemap
|
||||||
|
self.figure.tight_layout()
|
||||||
|
|
||||||
|
|
||||||
def init_lat_lon_grid(self):
|
def init_lat_lon_grid(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user