Skip to content

Commit

Permalink
Merge pull request #66 from CAVEconnectome/fix-colors-with-non
Browse files Browse the repository at this point in the history
Handle null data with color selection
  • Loading branch information
ceesem authored Jan 30, 2025
2 parents 17977f0 + c8df47b commit e74c2b0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/nglui/statebuilder/mappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,12 @@ def seg_colors(self, data):
for ii, oid in enumerate(self.fixed_ids):
colors[oid] = self.fixed_id_colors[ii]

if self.color_column is not None:
clist = data[self.color_column].to_list()
for col in self.data_columns:
for ii, oid in enumerate(data[col]):
colors[oid] = clist[ii]
if data is not None:
if self.color_column is not None:
clist = data[self.color_column].to_list()
for col in self.data_columns:
for ii, oid in enumerate(data[col]):
colors[oid] = clist[ii]

return colors

Expand Down

0 comments on commit e74c2b0

Please sign in to comment.