Skip to content

Commit ff412c3

Browse files
committed
Change multi-animal default colormap
1 parent 4ea26bf commit ff412c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/napari_deeplabcut/_reader.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ def read_hdf(filename: str) -> List[LayerData]:
183183
old_idx = temp.columns.to_frame()
184184
old_idx.insert(0, "individuals", "")
185185
temp.columns = pd.MultiIndex.from_frame(old_idx)
186+
colormap = "viridis"
187+
else:
188+
colormap = "Set3"
186189
if isinstance(temp.index, pd.MultiIndex):
187190
temp.index = [os.path.join(*row) for row in temp.index]
188191
df = (
@@ -210,6 +213,7 @@ def read_hdf(filename: str) -> List[LayerData]:
210213
ids=df["individuals"],
211214
likelihood=df.get("likelihood"),
212215
paths=list(paths2inds),
216+
colormap=colormap,
213217
)
214218
metadata["name"] = os.path.split(filename)[1].split(".")[0]
215219
metadata["metadata"]["root"] = os.path.split(filename)[0]

0 commit comments

Comments
 (0)