Skip to content

Commit 74fac13

Browse files
Replace colors[min(i, n - 1)] with colors[i % n]
1 parent 738e81d commit 74fac13

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plotly/matplotlylib/renderer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ def per_path(colors, i, default):
556556
n = len(colors)
557557
except TypeError:
558558
return colors
559-
return colors[min(i, n - 1)] if n else default
559+
return colors[i % n] if n else default
560560

561561
for i, (verts, codes) in enumerate(props["paths"]):
562562
facecolor = per_path(facecolors, i, "rgba(0,0,0,0)")

0 commit comments

Comments
 (0)