diff --git a/mne/viz/_3d.py b/mne/viz/_3d.py index 9939f5e82ff..d3da119ecbd 100644 --- a/mne/viz/_3d.py +++ b/mne/viz/_3d.py @@ -2872,7 +2872,7 @@ def plot_dipole_locations(dipoles, trans=None, subject=None, subjects_dir=None, u, v, w = ori.T renderer.quiver3d(x, y, z, u, v, w, scale=3 * scale, color=color, mode='arrow') - + renderer.show() fig = renderer.scene() else: raise ValueError('Mode must be "cone", "arrow" or orthoview", ' diff --git a/mne/viz/backends/_pyvista.py b/mne/viz/backends/_pyvista.py index 8e7cfac9be2..421c2df13ab 100644 --- a/mne/viz/backends/_pyvista.py +++ b/mne/viz/backends/_pyvista.py @@ -661,7 +661,8 @@ def _actor(self, mapper=None): return actor def _process_events(self): - _process_events(self.plotter) + for plotter in self._all_plotters: + _process_events(plotter) def _update_picking_callback(self, on_mouse_move, diff --git a/mne/viz/backends/_qt.py b/mne/viz/backends/_qt.py index 7009225dc87..0aac0513123 100644 --- a/mne/viz/backends/_qt.py +++ b/mne/viz/backends/_qt.py @@ -506,7 +506,8 @@ def show(self): with _qt_disable_paint(self.plotter): with self._window_ensure_minimum_sizes(): self.plotter.app_window.show() - self.plotter.update() + self._update() + self._process_events() def _create_dock_widget(window, name, area): diff --git a/tutorials/sample-datasets/plot_phantom_4DBTi.py b/tutorials/sample-datasets/plot_phantom_4DBTi.py index f24a0574fce..5f7e2f87766 100644 --- a/tutorials/sample-datasets/plot_phantom_4DBTi.py +++ b/tutorials/sample-datasets/plot_phantom_4DBTi.py @@ -64,7 +64,7 @@ print("errors (mm) : %s" % errors) ############################################################################### -# Plot the dipoles in 3D +# Plot the dipoles in 3D: actual_amp = np.ones(len(dip)) # misc amp to create Dipole instance actual_gof = np.ones(len(dip)) # misc GOF to create Dipole instance dip = mne.Dipole(dip.times, pos, actual_amp, ori, actual_gof) diff --git a/tutorials/source-modeling/plot_source_alignment.py b/tutorials/source-modeling/plot_source_alignment.py index 64b595a1f81..35cfb978e5f 100644 --- a/tutorials/source-modeling/plot_source_alignment.py +++ b/tutorials/source-modeling/plot_source_alignment.py @@ -95,7 +95,7 @@ # Note that all three coordinate systems are **RAS** coordinate frames and # hence are also `right-handed`_ coordinate systems. Finally, note that the # ``coord_frame`` parameter sets which coordinate frame the camera -# should initially be aligned with. Let's take a look: +# should initially be aligned with. Let's have a look: fig = mne.viz.plot_alignment(raw.info, trans=trans, subject='sample', subjects_dir=subjects_dir, surfaces='head-dense',