diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-06-14 23:15:15 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-06-14 23:15:15 -0400 |
commit | 7b78946fa0f669ab4648b3174bce49b35cba2ec3 (patch) | |
tree | a88c5bab85a701c8cf2c1400e7118cbbfc5058e4 | |
parent | 02ae04f10451b91ab711c0bd1569ed80f82d98d3 (diff) | |
download | pyExpControl-7b78946fa0f669ab4648b3174bce49b35cba2ec3.tar.gz pyExpControl-7b78946fa0f669ab4648b3174bce49b35cba2ec3.zip |
added title to the plot
-rw-r--r-- | eitControl.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/eitControl.py b/eitControl.py index 40fa25f..7dfc594 100644 --- a/eitControl.py +++ b/eitControl.py @@ -213,6 +213,12 @@ class Experiment: self.channelGraph[name]=self.dataPlot.plot(x,y, pen=None, symbol='o', symbolPen=None, symbolBrush=color, symbolSize=5, name=name) else: self.channelGraph[name].setData(x,y) + # centralFreqFormatted = pg.siFormat(self.fCent, suffix='Hz', precision=4) + # showing trailing zeros is tricky + centralFreqFormatted = f"{self.fCent/1e9:.6}" + centralFreqFormatted = str.ljust(centralFreqFormatted, 8, '0') + " GHz" + self.dataPlot.setTitle(f"Signals around center frequency {centralFreqFormatted}") + stop = datetime.now() runTime = (stop-start).seconds + float((stop-start).microseconds)/1000000 print("Replot took %s seconds to plot %s points." % (runTime, len(self.data['adc1'])) ) |