Skip to content

Commit

Permalink
Fixed bug for colors and color_cycles
Browse files Browse the repository at this point in the history
  • Loading branch information
Chilipp committed Jul 7, 2018
1 parent e3924d8 commit fc57da8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion psy_simple/plotters.py
Expand Up @@ -1610,7 +1610,14 @@ def update(self, value):
np.linspace(0., 1., len(list(self.iter_data)),
endpoint=True)))
except (ValueError, TypeError, KeyError):
self.color_cycle = cycle(slist(value))
try:
# do not use safe_list, because it might be a generator
validate_color(value)
except (ValueError, TypeError, AttributeError):
pass
else:
value = [value]
self.color_cycle = cycle(iter(value))
if changed:
self.colors = [
next(self.color_cycle) for arr in self.iter_data]
Expand Down

0 comments on commit fc57da8

Please sign in to comment.