Skip to content

Commit

Permalink
Merge pull request #779 from effigies/fix/restore_confound_order
Browse files Browse the repository at this point in the history
FIX: Restore confound order in correlation plot
  • Loading branch information
effigies authored Jan 28, 2023
2 parents 57caa39 + ad45113 commit 283cb36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions niworkflows/viz/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -900,9 +900,9 @@ def confounds_correlation_plot(
confounds_data = pd.read_table(confounds_file)

if columns:
columns = set(columns) # Drop duplicates
columns.add(reference) # Make sure the reference is included
confounds_data = confounds_data[[el for el in columns]]
columns = dict.fromkeys(columns) # Drop duplicates
columns[reference] = None # Make sure the reference is included
confounds_data = confounds_data[list(columns)]

confounds_data = confounds_data.loc[
:, np.logical_not(np.isclose(confounds_data.var(skipna=True), 0))
Expand Down

0 comments on commit 283cb36

Please sign in to comment.