Browse Source

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

kapture2 3 years ago
parent
commit
cb01189b6c
1 changed files with 6 additions and 6 deletions
  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:
             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()
@@ -445,7 +445,8 @@ class SubPlotWidget(pg.GraphicsLayoutWidget):
  
 
         if self._type_changed:
-            self.plotItem.autoBtnClicked()
+            #self.plotItem.autoBtnClicked()
+            pass
         try:
             self.removeItem(self.plotItem2)
         except Exception as e:
@@ -705,7 +706,6 @@ class SubPlotWidget(pg.GraphicsLayoutWidget):
 
         if autorange:
             self.plotItem.getViewBox().autoRange()
-            self.plotItem.getViewBox().autoRange()
 
         self.labelAxes()
         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)
         if type == PlotType.Peak:
             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'))
     def change_identifier_text(self):
         """