Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mne/source_estimate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2399,6 +2399,7 @@ def plot(
initial_time=None,
initial_pos=None,
verbose=None,
plot_abs=False,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like cruft from an earlier implementation?

Suggested change
plot_abs=False,

):
data = self.magnitude() if self._data_ndim == 3 else self
return plot_volume_source_estimates(
Expand Down
6 changes: 4 additions & 2 deletions mne/viz/_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -2828,7 +2828,7 @@ def _click_to_cut_coords(event, params):
# We don't care about directionality, just which is which dim
codes = codes.replace("L", "R").replace("P", "A").replace("I", "S")
idx = codes.index(dict(x="R", y="A", z="S")[ax])
img_data = np.abs(_get_img_fdata(params["img_idx"]))
img_data = _get_img_fdata(params["img_idx"])
ijk = _cut_coords_to_ijk(cut_coords, params["img_idx"])
if idx == 0:
ijk[0] = np.argmax(img_data[:, ijk[1], ijk[2]])
Expand Down Expand Up @@ -2952,6 +2952,8 @@ def _plot_and_correct(*, params, cut_coords):
symmetric_cbar=True,
title="",
)
if mode == "glass_brain":
plot_kwargs["plot_abs"] = False
params["axes"].clear()
if params.get("fig_anat") is not None and plot_kwargs["colorbar"]:
params["fig_anat"]._cbar.ax.clear()
Expand Down Expand Up @@ -3184,7 +3186,7 @@ def plot_volume_source_estimates(
lx = ax_time.axvline(stc.times[time_idx], color="g")
params.update(fig=fig, ax_time=ax_time, lx=lx, axes=axes)

allow_pos_lims = mode != "glass_brain"
allow_pos_lims = True
mapdata = _process_clim(clim, colormap, transparent, stc.data, allow_pos_lims)
_separate_map(mapdata)
diverging = "pos_lims" in mapdata["clim"]
Expand Down
2 changes: 1 addition & 1 deletion tutorials/inverse/50_beamformer_lcmv.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
# On MNI glass brain (orthoview; 2D)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

stc.plot(mode="glass_brain", clim=dict(kind="value", lims=lims), **kwargs)
stc.plot(mode="glass_brain", clim=dict(kind="value", pos_lims=lims), **kwargs)

# %%
# Volumetric rendering (3D) with vectors
Expand Down
Loading