From dc2c451850b216ee4115a76bb332b87c6bd4d569 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Sat, 14 Dec 2024 16:02:20 -0500 Subject: [PATCH] Revert "[ENH] Add fig.mne container for colorbar (#13019)" This reverts commit 4f1f4bbbc1a9d0f828e28de9be4e69c05f86d9f5. --- doc/changes/devel/13019.newfeature.rst | 1 - mne/viz/circle.py | 2 -- mne/viz/tests/test_circle.py | 3 --- 3 files changed, 6 deletions(-) delete mode 100644 doc/changes/devel/13019.newfeature.rst diff --git a/doc/changes/devel/13019.newfeature.rst b/doc/changes/devel/13019.newfeature.rst deleted file mode 100644 index 6fe8ee492bf..00000000000 --- a/doc/changes/devel/13019.newfeature.rst +++ /dev/null @@ -1 +0,0 @@ -Add ``fig.mne`` container for :class:`Colorbar ` in :func:`plot_connectivity_circle ` to allow users to access it directly, by `Santeri Ruuskanen`_. \ No newline at end of file diff --git a/mne/viz/circle.py b/mne/viz/circle.py index 67a47c0d5fd..fdcbd5a26bb 100644 --- a/mne/viz/circle.py +++ b/mne/viz/circle.py @@ -6,7 +6,6 @@ from functools import partial from itertools import cycle -from types import SimpleNamespace import numpy as np @@ -372,7 +371,6 @@ def _plot_connectivity_circle( cb_yticks = plt.getp(cb.ax.axes, "yticklabels") cb.ax.tick_params(labelsize=fontsize_colorbar) plt.setp(cb_yticks, color=textcolor) - fig.mne = SimpleNamespace(colorbar=cb) # Add callback for interaction if interactive: diff --git a/mne/viz/tests/test_circle.py b/mne/viz/tests/test_circle.py index c5f3719746b..a26379f6ccc 100644 --- a/mne/viz/tests/test_circle.py +++ b/mne/viz/tests/test_circle.py @@ -17,10 +17,7 @@ def test_plot_channel_labels_circle(): fig, axes = plot_channel_labels_circle( dict(brain=["big", "great", "smart"]), colors=dict(big="r", great="y", smart="b"), - colorbar=True, ) - # check that colorbar handle is returned - assert isinstance(fig.mne.colorbar, matplotlib.colorbar.Colorbar) texts = [ child.get_text() for child in axes.get_children()