From 3345d0533dba9d68d81a42e87f97cc58941880c7 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 18 Nov 2026 12:17:02 +0000 Subject: [PATCH] Module C notebooks: import pymodaq_gui to have the Qt plotter pymodaq_gui registers the 'qt' backend of DataWithAxes.plot when it is imported (register_plotter in pymodaq_gui/__init__.py): without it line.plot('qt') has no viewer. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01RKuN833EwRkwYgUKwN8sKq --- notebooks/01_data_objects.ipynb | 3 ++- notebooks/03_analysis.ipynb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/notebooks/01_data_objects.ipynb b/notebooks/01_data_objects.ipynb index 785e860..99b49f0 100644 --- a/notebooks/01_data_objects.ipynb +++ b/notebooks/01_data_objects.ipynb @@ -16,7 +16,8 @@ "import numpy as np\n", "from pymodaq_utils.math_utils import gauss1D\n", "from pymodaq_data import Q_\n", - "from pymodaq_data.data import Axis, DataRaw, DataToExport" + "from pymodaq_data.data import Axis, DataRaw, DataToExport\n", + "import pymodaq_gui # registers the Qt plotter: needed to plot a data object in the PyMoDAQ viewer" ], "execution_count": null, "outputs": [] diff --git a/notebooks/03_analysis.ipynb b/notebooks/03_analysis.ipynb index 295922d..5559b1d 100644 --- a/notebooks/03_analysis.ipynb +++ b/notebooks/03_analysis.ipynb @@ -298,7 +298,7 @@ "2. **All the lines at once.** Fit the whole averaged scan with three gaussians and one background. Compare the\n", " centre, the width and the background of the main line with the cropped fit of the part 3.\n", "3. **The fit as a data object.** Build a `DataCalculated` holding the data of `window` and the fitted curve as two\n", - " channels (same axis, labels 'data' and 'fit'), plot it with the PyMoDAQ viewer (`.plot('qt')`), then save it\n", + " channels (same axis, labels 'data' and 'fit'), plot it with the PyMoDAQ viewer (`import pymodaq_gui` first, then `%gui qt` and `.plot('qt')`), then save it\n", " with its errors in an HDF5 file and open it in H5Browser.\n", "4. **Navigation and signal on the series.** `series` has a navigation axis (time) and a signal axis (wavelength).\n", " Keep 525 to 532 nm on the signal axis with `vsig`: why does PyMoDAQ refuse (look at `series.distribution`)? Do it\n",