nschloe/perfplot

colors parameter doesn't have any effect

Closed this issue · 0 comments

In using perfplot today I noticed there is a colors parameter included in the readme example, but this doesn't actually seem to be used anywhere. It gets passed through to PerfplotData but then isn't used after that point:

self.colors = colors
if self.colors is None:
colors = plt.rcParams["axes.prop_cycle"].by_key()["color"]
# extend colors list to fit all self.labels
colors *= -(-len(self.labels) // len(colors))
self.colors = colors[: len(self.labels)]

I guess this is probably just an artefact from a previous version? I'd be happy to pull together a PR stripping this out, and maybe there's an argument to be made for providing a dedicated example of how to vary the colours in use.