fix vline when scrolling in epochs browser#9276
fix vline when scrolling in epochs browser#9276drammock wants to merge 1 commit intomne-tools:mainfrom
Conversation
|
Thanks @drammock for giving a stab at this. When I tried to make a green vertical line by left clicking, this happened: here's how I got to epochs: import os
import mne
sample_data_folder = mne.datasets.sample.data_path()
sample_data_raw_file = os.path.join(sample_data_folder, 'MEG', 'sample',
'sample_audvis_raw.fif')
raw = mne.io.read_raw_fif(sample_data_raw_file, verbose=False).crop(tmax=120)
events = mne.find_events(raw, stim_channel='STI 014')
event_dict = {'auditory/left': 1, 'auditory/right': 2, 'visual/left': 3,
'visual/right': 4, 'face': 5, 'button': 32}
epochs = mne.Epochs(raw, events, tmin=-0.2, tmax=0.5, event_id=event_dict,
preload=True) |
|
are you using the macos backend for MPL?
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
…On Friday, April 9, 2021 7:22 PM, Mainak Jas ***@***.***> wrote:
Thanks ***@***.***(https://github.com/drammock) for giving a stab at this. When I tried to make a green vertical line by left clicking, this happened:
[image](https://user-images.githubusercontent.com/15852194/114252009-35543f80-9971-11eb-8e08-869ca16056fc.png)
here's how I got to epochs:
import
os
import
mne
sample_data_folder
=
mne
.
datasets
.
sample
.
data_path
()
sample_data_raw_file
=
os
.
path
.
join
(
sample_data_folder
,
'MEG'
,
'sample'
,
'sample_audvis_raw.fif'
)
raw
=
mne
.
io
.
read_raw_fif
(
sample_data_raw_file
,
verbose
=
False
).
crop
(
tmax
=
120
)
events
=
mne
.
find_events
(
raw
,
stim_channel
=
'STI 014'
)
event_dict
=
{
'auditory/left'
:
1
,
'auditory/right'
:
2
,
'visual/left'
:
3
,
'visual/right'
:
4
,
'face'
:
5
,
'button'
:
32
}
epochs
=
mne
.
Epochs
(
raw
,
events
,
tmin
=
-
0.2
,
tmax
=
0.5
,
event_id
=
event_dict
,
preload
=
True
)
—
You are receiving this because you were mentioned.
Reply to this email directly, [view it on GitHub](#9276 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AAN2AU534B3ZPZDY346J4QLTH6K5ZANCNFSM42VXIJEQ).
|
|
so I had started using $ ipython --matplotlibwhat I thought was the recommendation but I just checked and it seems the recommendation is: $ ipython --matplotlib=qtand with this, it works! |
|
Actually no, it doesn't work on that backend either. I spoke too soon. It depends where you click. Should I try another backend? |
|
I replicate the problem on my machine. |
|
I cannot replicate on my macOS machine, but I do get this: And interaction with this backend is pretty bad. I recommend people use Qt5Agg on macOS, the experience will probably be better. We should still fix this, but I wish the default backend on macOS was Qt5Agg so we didn't have to keep working around the MacOSX backend flaws in our code :( |
Another alternative is that one of you folks who has a mac laptop can do all the 2D viz work (or ship a mac laptop to me) :) |

this is item 4 from #8761