diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2020-07-18 15:14:27 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2020-07-18 15:14:27 +0200 |
| commit | c1d7c941acdcc84c5daf7d6364fdbdfb0c81f0ac (patch) | |
| tree | f65cfde736b3342f98fc05d3fc463ce15c834665 | |
| parent | 6abee3a629c640dc0d32c36077929a338bfe6285 (diff) | |
| download | allocbench-c1d7c941acdcc84c5daf7d6364fdbdfb0c81f0ac.tar.gz allocbench-c1d7c941acdcc84c5daf7d6364fdbdfb0c81f0ac.zip | |
[plots] cycle through matplotlib C* colors
| -rw-r--r-- | allocbench/plots.py | 4 |
1 files changed, 3 insertions, 1 deletions
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): |
