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() | ||||
|         array_tab = QtGui.QWidget() | ||||
|         events_tab = QtGui.QWidget() | ||||
|         self.wf_scroll_area = QtGui.QScrollArea() | ||||
|         self.wf_layout = QtGui.QVBoxLayout() | ||||
|         self.array_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(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_event_table() | ||||
|         self.tabs.setCurrentIndex(0) | ||||
| @ -987,11 +990,19 @@ class MainWindow(QMainWindow): | ||||
|         alter_comp = COMPNAME_MAP[comp] | ||||
|         wfst = self.get_data().getWFData().select(component=comp) | ||||
|         wfst += self.get_data().getWFData().select(component=alter_comp) | ||||
|         self.getPlotWidget().plotWFData(wfdata=wfst, title=title, mapping=False) | ||||
|         plotDict = self.getPlotWidget().getPlotDict() | ||||
|         height_need = len(self.data.getWFData())*12 | ||||
|         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() | ||||
|         labels = [plotDict[n][0] for n in pos] | ||||
|         self.getPlotWidget().setYTickLabels(pos, labels) | ||||
|         plotWidget.setYTickLabels(pos, labels) | ||||
|         plotWidget.figure.tight_layout() | ||||
| 
 | ||||
|     def plotZ(self): | ||||
|         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.main_box.addWidget(self.toolbar) | ||||
|         self.figure = fig | ||||
| 
 | ||||
|     def init_stations(self): | ||||
|         def get_station_names_lat_lon(parser): | ||||
| @ -184,6 +185,7 @@ class map_projection(QtGui.QWidget): | ||||
|         basemap.fillcontinents(color='grey', lake_color='aqua') | ||||
|         basemap.drawcoastlines() | ||||
|         self.basemap = basemap | ||||
|         self.figure.tight_layout() | ||||
| 
 | ||||
|          | ||||
|     def init_lat_lon_grid(self): | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user