Skip to content

Fix bugs with dark mode panels - #14109

Open
larsoner wants to merge 1 commit into
mne-tools:mainfrom
larsoner:dark
Open

Fix bugs with dark mode panels#14109
larsoner wants to merge 1 commit into
mne-tools:mainfrom
larsoner:dark

Conversation

@larsoner

Copy link
Copy Markdown
Member

#14108 unsurfaced that we don't consistently or correctly honor dark mode in our subpanels. This PR fixes it:

from pathlib import Path
import matplotlib.pyplot as plt
import mne

mne.viz.set_browser_backend("matplotlib")
fname = Path(mne.__file__).parent / "io" / "tests" / "data" / "test_raw.fif"
raw = mne.io.read_raw_fif(fname, verbose="error").crop(0, 5).pick("mag").load_data()
raw.set_annotations(mne.Annotations([1.0], [0.5], ["bad_x"]))

fig = raw.plot(group_by="selection", theme="dark", show=False)
for key in "?ja":  # help, SSP projectors, annotations
    fig._fake_keypress(key)

In this PR gives

Screenshot 2026-07-27 at 4 42 51 PM

Don't think a test is needed for this one but could add if needed. Drafted changes with Opus 4.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant