mne-tools / mne-nirs

Process Near-Infrared Spectroscopy Data in MNE
https://mne.tools/mne-nirs/
BSD 3-Clause "New" or "Revised" License
79 stars 35 forks source link

no option to set color axis limits in mne_nirs.visualisation.plot_nirs_source_detector() #540

Open AlinaSchulte opened 5 months ago

AlinaSchulte commented 5 months ago

Describe the new feature or enhancement

As far as I am aware, the function mne_nirs.visualisation.plot_nirs_source_detector() has no option of setting the axis limits for the color bar. An argument in the function such as "clim" would be handy to make sure the color axis is representing similiar values when plotting e.g. GLM results of different conditions, to make plots visually comparable.

drammock commented 5 months ago

agree that it seems like a good idea to expose that functionality. Are you up for making a pull request to add it? In MNE packages we usually call such variables vmin/vmax (scalars) or vlim (tuple of two scalars), with a preference for migrating to vlim everywhere (eventually / gradually). I'm not super familiar with the NIRS codebase though, so if it's exposed everywhere else in the mne_nirs API as vmin / vmax it's fine to follow suit here.