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

Support blocking param for visualizations #553

Open
alexk101 opened this issue May 7, 2024 · 1 comment
Open

Support blocking param for visualizations #553

alexk101 opened this issue May 7, 2024 · 1 comment
Labels

Comments

@alexk101
Copy link
Contributor

alexk101 commented May 7, 2024

Describe the new feature or enhancement

The main mne.viz module allows for the specification of the block param. mne-nirs visualization functions don't support this. Our workflow is primarily scripts in vscode, and not notebooks, which means that many of these plots, particularly this one...

immediately close upon running. I have read the discussion on this subject in the forums, and as was suggested there, would like to have a block param.

Describe your proposed implementation

Maybe implement in the abstract class

https://github.com/mne-tools/mne-python/blob/main/mne/viz/backends/_abstract.py#L16

and then added as a parameter to the various plotting functions in the mne_nirs.visualization. Or just add logic the functions themselves. I am unsure what the best way would be. Given that these are not matplotlib plots, but some unknown backend that varies from system to system, the abstract implementation makes the most sense to me.

@alexk101 alexk101 added the ENH label May 7, 2024
@larsoner
Copy link
Member

Agreed this should probably be part of the viz backend system. Rather than add a block param I think it would be nicer to have a function that you can just call. Currently we have stuff like mne.viz.set_3d_view. This could be something like mne.viz.block(kind="3d") or something maybe (where the default kind="matplotlib" would just wrap plt.show(block=True))?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants