-
Notifications
You must be signed in to change notification settings - Fork 576
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
[BUG] In plot_to_surf vmin is set to 0 despite not setting a threshold #3944
Labels
Bug
for bug reports
Comments
Thx for reporting. |
It looks like a bug for the plotly engine. Works as it should for matplotlib. Here's a code to more quickly reproduce the warning and buggy behaviorr: from nilearn import datasets
from nilearn import plotting
destrieux_atlas = datasets.fetch_atlas_surf_destrieux()
parcellation = destrieux_atlas['map_left']
fsaverage = datasets.fetch_surf_fsaverage()
plot_1 = plotting.plot_surf_roi(
fsaverage.infl_left,
parcellation,
hemi="left",
cmap="viridis_r",
vmin=2,
vmax=50,
colorbar=True,
bg_map=fsaverage.sulc_left,
engine="plotly",
)
plot_1.show() I'll follow up with a PR to fix |
Looks good. We should make sure that the behavior is consistent btw mpl and plotly. |
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
Operating system
Operating system version
Mac OS Version 13.4.1 "Ventura"
Python version
nilearn version
Dev version in #3942
Expected behavior
The minimum value in the colorbar should be set by
vmin
when the user does not provide athreshold
.Current behavior & error messages
This is what I got:
I assume
threshold
has a numerical value by default (rather thanNone
) and that's whyvmin
is set to 0.Steps and code to reproduce bug
The text was updated successfully, but these errors were encountered: