mirror of
https://github.com/nqrduck/nqrduck-measurement.git
synced 2024-12-22 15:47:51 +00:00
Updated view w. real and imaginary plots.
This commit is contained in:
parent
c3c1e38fd3
commit
bfdbe796fb
1 changed files with 9 additions and 1 deletions
|
@ -120,7 +120,15 @@ class MeasurementView(ModuleView):
|
|||
x = self.module.model.displayed_measurement.tdx
|
||||
y = self.module.model.displayed_measurement.tdy
|
||||
|
||||
self._ui_form.plotter.canvas.ax.plot(x, y)
|
||||
self._ui_form.plotter.canvas.ax.plot(x, y.real, label="Real", linestyle="-", alpha=0.35, color="red")
|
||||
self._ui_form.plotter.canvas.ax.plot(x, y.imag, label="Imaginary", linestyle="-", alpha=0.35, color="green")
|
||||
# Magnitude
|
||||
self._ui_form.plotter.canvas.ax.plot(x, np.abs(y), label="Magnitude", color="blue")
|
||||
|
||||
|
||||
# Add legend
|
||||
self._ui_form.plotter.canvas.ax.legend()
|
||||
|
||||
except AttributeError:
|
||||
logger.debug("No measurement data to display.")
|
||||
self._ui_form.plotter.canvas.draw()
|
||||
|
|
Loading…
Reference in a new issue