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: Set the seaborn barplot hue property value #100

Merged
merged 1 commit into from
May 6, 2024

Conversation

jhlegarreta
Copy link
Collaborator

@jhlegarreta jhlegarreta commented May 5, 2024

Set the seaborn barplot hue property value and set the legend property to False.

Fixes:

/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nireports/reportlets/nuisance.py:898:
 FutureWarning:

Passing `palette` without assigning `hue` is deprecated and will be removed in v0.14.0.
Assign the `x` variable to `hue` and set `legend=False` for the same effect.

Fixes #89.

Set the `seaborn` barplot `hue` property value and set the `legend`
property to `False`.

Fixes:
```
/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nireports/reportlets/nuisance.py:898:
 FutureWarning:

Passing `palette` without assigning `hue` is deprecated and will be removed in v0.14.0.
Assign the `x` variable to `hue` and set `legend=False` for the same effect.
```
Copy link

codecov bot commented May 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.14%. Comparing base (0d893ff) to head (ac700a9).
Report is 106 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #100      +/-   ##
==========================================
- Coverage   57.36%   57.14%   -0.22%     
==========================================
  Files          22       22              
  Lines        2024     2023       -1     
  Branches      359      316      -43     
==========================================
- Hits         1161     1156       -5     
- Misses        782      786       +4     
  Partials       81       81              
Flag Coverage Δ
unittests 57.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jhlegarreta
Copy link
Collaborator Author

@mgxd The result is slightly different from the current one: in the current version the darkest hue is assigned to the last barplot; the fixed version the darkest hue is assigned according to the value of the index (a, d, f, c). Is there a preference for the current behavior?

Current ignore_initial_volumes = 0

Fixed version ignore_initial_volumes = 0

Current ignore_initial_volumes = 1

Fixed version ignore_initial_volumes = 1

@oesteban oesteban merged commit 0924b31 into nipreps:main May 6, 2024
20 of 21 checks passed
@jhlegarreta jhlegarreta deleted the FixPletteHueWarning branch May 6, 2024 12:44
Copy link
Contributor

@mgxd mgxd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @jhlegarreta !

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.

Plotting deprecation warning
3 participants