Skip to content

Commit

Permalink
FIX: Restore confound order in correlation plot
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Jan 27, 2023
1 parent 57caa39 commit ad45113
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 ad45113

Please sign in to comment.