Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Improve vline #181

Merged
merged 14 commits into from
Aug 2, 2023
Merged

ENH: Improve vline #181

merged 14 commits into from
Aug 2, 2023

Conversation

marsipu
Copy link
Member

@marsipu marsipu commented Aug 1, 2023

What does this implement/fix?

This changes the width of the vline to improve visibility as suggested in #155.
It also adds that the vline-label changes color too when the mouse hovers over the vline.

@larsoner @mscheltienne WDYT should be the width (examples in #155)?

@mscheltienne
Copy link
Member

2 or 3 looks reasonable to me.

mne_qt_browser/_pg_figure.py Outdated Show resolved Hide resolved
@marsipu marsipu enabled auto-merge (squash) August 2, 2023 13:05
@marsipu marsipu merged commit bc2a1ac into mne-tools:main Aug 2, 2023
@mscheltienne
Copy link
Member

It looks like something is wrong with the hovercolor, when you create the vline, the label is not always of the correct color. It changes back to the correct color when the mouse enters the overview-bar area.

Screencast.from.08-02-2023.05.05.18.PM.webm

@marsipu marsipu deleted the improve_vline branch August 2, 2023 15:32
@marsipu
Copy link
Member Author

marsipu commented Aug 2, 2023

@mscheltienne Thank you, unfortunately I can't reproduce this behaviour.
Could you post sys info and your code?
EDIT: And it would help to see the mouse in the screen-capture

@mscheltienne
Copy link
Member

import numpy as np
from mne import create_info
from mne.io import RawArray
from mne.viz import set_browser_backend


set_browser_backend("qt")
data = np.random.randn(3, 10000)
raw = RawArray(data, create_info(3, 1000, "eeg"))
raw.plot(scalings="auto")

Yes the default pop-os screen capture tool does not include the mouse for some reason. I'm just randomly clicking in the area, and then sometimes also on the vertical line. Both mne and mne-qt-browser are running the main version.

Platform             Linux-6.2.6-76060206-generic-x86_64-with-glibc2.35
Python               3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0]
Executable           /home/scheltie/pyvenv/mscheltienne/mne-python/bin/python
CPU                  x86_64 (12 cores)
Memory               31.0 GB

Core
├☑ mne               1.5.0.dev84+g0f2ea8183
├☑ numpy             1.23.5 (OpenBLAS 0.3.20 with 12 threads)
├☑ scipy             1.10.1
├☑ matplotlib        3.7.2 (backend=Qt5Agg)
├☑ pooch             1.7.0
└☑ jinja2            3.1.2

Numerical (optional)
├☑ sklearn           1.2.2
├☑ numba             0.56.4
├☑ nibabel           5.1.0
├☑ nilearn           0.10.0
├☑ dipy              1.7.0
├☑ openmeeg          2.5.6
├☑ pandas            2.0.0
└☐ unavailable       cupy

Visualization (optional)
├☑ pyvista           0.37.0 (OpenGL 4.6 (Core Profile) Mesa 22.3.5 via Mesa Intel(R) UHD Graphics 770 (ADL-S GT1))
├☑ pyvistaqt         0.10.0
├☑ ipyvtklink        0.2.3
├☑ vtk               9.2.6
├☑ qtpy              2.3.1 (PyQt5=5.15.2)
├☑ ipympl            0.9.3
├☑ pyqtgraph         0.13.3
└☑ mne-qt-browser    0.6.0.dev4+gc912752

Ecosystem (optional)
├☑ mne-bids          0.13.dev0
├☑ mne-connectivity  0.6.0dev0
└☐ unavailable       mne-nirs, mne-features, mne-icalabel, mne-bids-pipeline

@mscheltienne
Copy link
Member

mscheltienne commented Aug 2, 2023

One part reproducible, if the label is green and you click on the vline it becomes yellow. Everytime.

@mscheltienne
Copy link
Member

Same on another computer on windows.

@marsipu
Copy link
Member Author

marsipu commented Aug 2, 2023

Oh you mean the label should always stay green and it doesn't?
That was on purpose, I connected a color change of the label to the hovering of the line to improve visual feedback on hovering and when you are able to drag the line/label

@mscheltienne
Copy link
Member

I did not look in detail, but I figured it had something to do with hovering. I'm fine with the color change on hovering, but my point is, it doesn't seem to work correctly.

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.

4 participants