Skip to content

Commit

Permalink
changed handling of colors for masks with many indices
Browse files Browse the repository at this point in the history
  • Loading branch information
LynnSchmittwilken committed Feb 16, 2023
1 parent de916f9 commit a162d54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stimuli/utils/plotting.py
Expand Up @@ -58,7 +58,7 @@ def plot_stim(
colormap = plt.cm.tab10

for idx in np.unique(mask)[np.unique(mask) > 0]:
color = colormap.colors[idx % 10]
color = colormap.colors[idx % 19]
color = np.reshape(color, (1, 1, 3))
img = np.where(mask == idx, color, img)
ax.imshow(img)
Expand Down

0 comments on commit a162d54

Please sign in to comment.