From c1d7c941acdcc84c5daf7d6364fdbdfb0c81f0ac Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sat, 18 Jul 2020 15:14:27 +0200 Subject: [plots] cycle through matplotlib C* colors --- allocbench/plots.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/allocbench/plots.py b/allocbench/plots.py index 1747d95..0c73661 100644 --- a/allocbench/plots.py +++ b/allocbench/plots.py @@ -86,9 +86,11 @@ def _set_all_alloc_colors(allocators): matplotlib_c_colors = ["C" + str(i) for i in range(0, 10)] avail_colors = [c for c in matplotlib_c_colors if c not in explicit_colors] + i = 0 for alloc in allocators.values(): if alloc["color"] is None: - alloc["color"] = avail_colors.pop() + alloc["color"] = avail_colors[i] + i = (i + 1) % len(avail_colors) def get_alloc_color(bench, alloc): -- cgit v1.2.3