diff --git a/doc/changes/dev/13700.bugfix.rst b/doc/changes/dev/13700.bugfix.rst new file mode 100644 index 00000000000..9fd1d35aefb --- /dev/null +++ b/doc/changes/dev/13700.bugfix.rst @@ -0,0 +1 @@ +Fix axis label overlap and rendering issues in :func:`~mne.viz.plot_volume_source_estimates` by replacing ``canvas.draw()`` with ``canvas.draw_idle()`` to avoid blitting artifacts, by :newcontrib:`Famous Raj Bhat`. \ No newline at end of file diff --git a/doc/changes/names.inc b/doc/changes/names.inc index 09c5818b6af..c6b4b00c499 100644 --- a/doc/changes/names.inc +++ b/doc/changes/names.inc @@ -96,6 +96,7 @@ .. _Ezequiel Mikulan: https://github.com/ezemikulan .. _Ezequiel Mikulan: https://github.com/ezemikulan .. _Fahimeh Mamashli: https://github.com/fmamashli +.. _Famous Raj Bhat: https://github.com/Famous077 .. _Farzin Negahbani: https://github.com/Farzin-Negahbani .. _Federico Raimondo: https://github.com/fraimondo .. _Federico Zamberlan: https://github.com/fzamberlan diff --git a/mne/viz/_3d.py b/mne/viz/_3d.py index 080fb69d71f..5dd6f975037 100644 --- a/mne/viz/_3d.py +++ b/mne/viz/_3d.py @@ -2870,7 +2870,7 @@ def _press(event, params): elif event.key == "shift+right": idx = min(params["stc"].shape[1] - 1, idx + 10) _update_timeslice(idx, params) - params["fig"].canvas.draw() + params["fig"].canvas.draw_idle() def _update_timeslice(idx, params): @@ -2921,7 +2921,7 @@ def _onclick(event, params, verbose=None): else: params["ax_time"].lines[0].set_ydata([0.0]) _update_vertlabel(loc_idx, params) - params["fig"].canvas.draw() + params["fig"].canvas.draw_idle() def _cut_coords_to_idx(cut_coords, dist_to_verts):