Problem with Annotating Raw objects interactively

Hello everyone,
I am using mne stable version (v1.2) and i am able to load the EEG raw data in edf format.
I want to add annotations to the raw data interactively.
fig = raw.plot(duration=10, n_channels=20, block=True, color=β€˜blue’)
fig.fake_keypress(β€˜a’)

The plot is shown without errors but I am getting the graphical interface of previous versions and it does not show the UI of the current version that I am using.

In the documentation of the stable version the functions are based on buttons, but I can’t find how to change the interface.

Any idea what could be happends?
Thank you.

Make sure mne-qt-browser is installed in your environment.
If it is and you are still not getting the Qt backend, try to force it with:

from mne.viz import set_browser_backend

set_browser_backend("qt")

[code...]
raw.plot()

This command will set the backend for the entire session.

Mathieu

4 Likes

Thank you so much @mscheltienne
it is working now.

1 Like