Unable to enter “annotation mode” in Jupyter Notebook

Hello,

I am having a problem with the annotation mode in Jupyter Notebook in the browser. I am following along with the tutorials and when I try to run this command:

fig = raw.plot(start=2, duration=6)
fig.fake_keypress('a')

I get the following error:

c:\python38\lib\site-packages\mne\viz\utils.py:120: 
UserWarning: Matplotlib is currently using module://matplotlib_inline.backend_inline,
which is a non-GUI backend, so cannot show the figure.
  (fig or plt).show(**kwargs)

I installed mne using python pip install mne today. I am not sure what I can do to solve the issue.

Any help is appreciated.

Hello @jam10 and welcome to the forum!

Many interactive plotting elements, and esp. those that open new windows, don’t work with the inline matplotlib backend. We recommend using the Qt backend whenever possible, by running

% matplotlib qt

in a notebook cell.

Best wishes,
Richard

1 Like

This worked! Thanks for the help!

1 Like