Time scrollbar does not work as desired when using raw.plot

  • MNE version: 1.0.dev0 (yes–I realize this is not up to date, but my issue goes back several versions)
  • macOS 12.5.1

For a simple raw data plot, I have no problems using the keyboard to scroll through data, adjust scaling, etc. However, when I select the scrollbar box at the bottom of my plot, I cannot drag it to advance through my signal as one might expect. Clicking just to the right or left of the box works fine. I realize this is a small aesthetic detail, but I’m wondering if there’s a way to remedy this.

import mne
file='my_file.edf'
raw=mne.io.read_raw_edf(file, preload=True)
raw.plot(duration=20,bgcolor='w',color='b', bad_color='r')

It’s a bit difficult to visualize the problem, could you create and upload a short screen capture of this issue?
On macOS, this can be done super easily by using the default screenshot tool (Applications/Utilities/Screenshot).

Also you may wish to try out the mne-qt-browser, a new and modern interface for Raw and Epochs plots

Here’s an image. I’ve inserted a black arrow at the slider location that I wish to simply drag from left to right with my mouse in order to advance the time. Clicking the mouse where I’ve drawn the red arrow does advance the slider though.

Oh, I did not notice you were using the old matplotlib browser.
Indeed, I think the slider can not be dragged on this one. Honestly, you should give a shot to the new mne-qt-browser, which is available as of version 1.0. I think you will find the experience way more pleasant :slight_smile:

To use the mne-qt-browser, make sure it’s installed in your environment. You can check with:

import mne
print (mne.sys_info())

And then, I think you need to enable it in version 1.0 and it became the default in 1.1 (don’t quote me on that). You can enable the browser by setting the qt backend before plotting (e.g. at the top of your script):

from mne.viz import set_browser_backend
set_browser_backend("qt")
1 Like

Update: I was able to resolve my issue by settin block=True in my raw.plot()