Ver Fonte

Changed FFT plot to not reset it's view every time new data is taken

kapture2 há 3 anos atrás
pai
commit
cb01189b6c
1 ficheiros alterados com 6 adições e 6 exclusões
  1. 6 6
      KCG/widgets/PlotWidget.py

+ 6 - 6
KCG/widgets/PlotWidget.py

@@ -425,9 +425,9 @@ class SubPlotWidget(pg.GraphicsLayoutWidget):
         for item in self.plotItemFit:
         for item in self.plotItemFit:
             item.clear()
             item.clear()
 
 
-        # self.plotItemPlotScatter2.clear()
-        self.plotItem.resetTransform()
-        self.plotItem.getAxis('bottom').setScale()
+        #self.plotItemPlotScatter2.clear()
+        #self.plotItem.resetTransform()
+        #self.plotItem.getAxis('bottom').setScale()
         
         
 
 
         self.img.clear()
         self.img.clear()
@@ -445,7 +445,8 @@ class SubPlotWidget(pg.GraphicsLayoutWidget):
  
  
 
 
         if self._type_changed:
         if self._type_changed:
-            self.plotItem.autoBtnClicked()
+            #self.plotItem.autoBtnClicked()
+            pass
         try:
         try:
             self.removeItem(self.plotItem2)
             self.removeItem(self.plotItem2)
         except Exception as e:
         except Exception as e:
@@ -705,7 +706,6 @@ class SubPlotWidget(pg.GraphicsLayoutWidget):
 
 
         if autorange:
         if autorange:
             self.plotItem.getViewBox().autoRange()
             self.plotItem.getViewBox().autoRange()
-            self.plotItem.getViewBox().autoRange()
 
 
         self.labelAxes()
         self.labelAxes()
         if self.plotType in [PlotType.Heatmap, PlotType.Compare]:
         if self.plotType in [PlotType.Heatmap, PlotType.Compare]:
@@ -1154,7 +1154,7 @@ class PlotWidget(kcgw.KCGWidgets):
             self.plot_widget.plot(self.data.combined(adc=self.adc, frm=f, to=t, calibrate=self.useCalib.isChecked(), workingChannels=config.working_channels), autorange=autorange)
             self.plot_widget.plot(self.data.combined(adc=self.adc, frm=f, to=t, calibrate=self.useCalib.isChecked(), workingChannels=config.working_channels), autorange=autorange)
         if type == PlotType.Peak:
         if type == PlotType.Peak:
             t = t+184
             t = t+184
-            self.plot_widget.plot(self.data.combined(adc=self.adc, frm=f, to=t, calibrate=self.useCalib.isChecked(), workingChannels=config.working_channels, turnbyturn=True, mean=self.makeMean.isChecked()), autorange=autorange, doFit=(6 if self.fittGauss.isChecked() else 0))
+            self.plot_widget.plot(self.data.combined(adc=self.adc, frm=f, to=t, calibrate=self.useCalib.isChecked(), workingChannels=config.working_channels, turnbyturn=False, mean=self.makeMean.isChecked()), autorange=autorange, doFit=(6 if self.fittGauss.isChecked() else 0))
                     #print(time.time(), 'do_plot stop'))
                     #print(time.time(), 'do_plot stop'))
     def change_identifier_text(self):
     def change_identifier_text(self):
         """
         """