We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d0790f commit 254ef43Copy full SHA for 254ef43
src/palantir/plot_utils.py
@@ -278,9 +278,10 @@ def color_generator(exclude):
278
for clr in default_cycle:
279
if clr not in exclude:
280
yield clr
281
+ hex_digits = np.array(list("0123456789ABCDEF"))
282
# If default cycle is exhausted, generate random colors.
283
while True:
- new_color = "#" + "".join(random.choice("0123456789ABCDEF") for _ in range(6))
284
+ new_color = "#" + "".join(np.random.choice(hex_digits, size=6))
285
if new_color not in exclude:
286
yield new_color
287
0 commit comments