diff --git a/doc/changes/latest.inc b/doc/changes/latest.inc index ee5a6c07ed0..8c3a7541bd0 100644 --- a/doc/changes/latest.inc +++ b/doc/changes/latest.inc @@ -232,6 +232,8 @@ Bug - Fix bug with :func:`mne.viz.plot_vector_source_estimates` using the PyVista backend with ``time_viewer=True`` when updating the arrow colormaps by `Eric Larson`_ +- Fix bug with :func:`mne.viz.plot_vector_source_estimates` where ``clim='auto'`` and ``clim=dict(..., kind='percent')`` did not take into account the magnitude of the activation, by `Eric Larson`_ + - The default plotting mode for :func:`mne.io.Raw.plot` and :ref:`mne browse_raw` has been changed to ``clipping=3.`` to facilitate data analysis with large deflections, by `Eric Larson`_ - PSD plots will now show non-data channels (e.g., ``misc``) if those channels are explicitly passed to ``picks``, by `Daniel McCloy`_. diff --git a/examples/inverse/plot_vector_mne_solution.py b/examples/inverse/plot_vector_mne_solution.py index 90d5d851151..92a11c94203 100644 --- a/examples/inverse/plot_vector_mne_solution.py +++ b/examples/inverse/plot_vector_mne_solution.py @@ -15,7 +15,7 @@ It can also be instructive to visualize the actual dipole/activation locations in 3D space in a glass brain, as opposed to activations imposed on an inflated surface (as typically done in :meth:`mne.SourceEstimate.plot`), as it allows -you to get a better sense of the true underlying source geometry. +you to get a better sense of the underlying source geometry. """ # Author: Marijn van Vliet # diff --git a/mne/viz/_3d.py b/mne/viz/_3d.py index e081777df63..ee0b704bbd8 100644 --- a/mne/viz/_3d.py +++ b/mne/viz/_3d.py @@ -1781,7 +1781,8 @@ def _plot_stc(stc, subject, surface, hemi, colormap, time_label, time_label, times = _handle_time(time_label, time_unit, stc.times) # convert control points to locations in colormap - mapdata = _process_clim(clim, colormap, transparent, stc.data, + use = stc.magnitude().data if vec else stc.data + mapdata = _process_clim(clim, colormap, transparent, use, allow_pos_lims=not vec) stc_surf, stc_vol, src_vol = _triage_stc( diff --git a/mne/viz/_brain/_brain.py b/mne/viz/_brain/_brain.py index 2d0400f601e..49afb196ac6 100644 --- a/mne/viz/_brain/_brain.py +++ b/mne/viz/_brain/_brain.py @@ -1381,7 +1381,9 @@ def _update_glyphs(self, hemi, vectors): glyph_mapper = hemi_data['glyph_mapper'] if add: glyph_actor = _create_actor(glyph_mapper) - glyph_actor.GetProperty().SetLineWidth(2.) + prop = glyph_actor.GetProperty() + prop.SetLineWidth(2.) + prop.SetOpacity(vector_alpha) self._renderer.plotter.add_actor(glyph_actor) hemi_data['glyph_actor'].append(glyph_actor) else: diff --git a/tutorials/source-modeling/plot_visualize_stc.py b/tutorials/source-modeling/plot_visualize_stc.py index 85e8cca8f21..6437273889a 100644 --- a/tutorials/source-modeling/plot_visualize_stc.py +++ b/tutorials/source-modeling/plot_visualize_stc.py @@ -1,10 +1,11 @@ """ .. _tut_viz_stcs: -Visualize source time courses -============================= +Visualize source time courses (stcs) +==================================== -This tutorial focuses on visualization of stcs. +This tutorial focuses on visualization of +:term:`stcs `. .. contents:: Table of Contents :local: