Skip to content

Commit 00a321d

Browse files
committed
Fix face color cycle
1 parent a65f78e commit 00a321d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/napari_deeplabcut/_reader.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ def _populate_metadata(
125125
"label": dict(zip(header.bodyparts, label_colors)),
126126
"id": dict(zip(header.individuals, id_colors)),
127127
}
128+
face_color_prop = "id" if ids[0] else "label"
128129
return {
129130
"name": "keypoints",
130131
"text": "{id}–{label}" if ids[0] else "label",
@@ -134,8 +135,8 @@ def _populate_metadata(
134135
"likelihood": likelihood,
135136
"valid": likelihood > pcutoff,
136137
},
137-
"face_color_cycle": label_colors,
138-
"face_color": "id" if ids[0] else "label",
138+
"face_color_cycle": face_color_cycle_maps[face_color_prop],
139+
"face_color": face_color_prop,
139140
"face_colormap": colormap,
140141
"edge_color": "valid",
141142
"edge_color_cycle": ["black", "red"],

0 commit comments

Comments
 (0)