Closed
Description
With:
>>> list(colors)
[array([ 0.21602461, 0.4948712 , 0.71987699]),
array([ 0.89411765, 0.10196079, 0.10980392]),
array([ 0.3042676 , 0.68329106, 0.2929335 ]),
array([ 0.60083047, 0.30814303, 0.63169552]),
array([ 1. , 0.50591311, 0.00313725]),
array([ 0.60000002, 0.60000002, 0.60000002]),
array([ 0.65845446, 0.34122262, 0.17079585]),
array([ 0.95850827, 0.508466 , 0.74492889])]
Trying to assign the color cycle:
mpl.rcParams['axes.color_cycle'] = list(colors)
I get this error:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
C:\Data\Antonio\software\src\multispot_paper - new\styles\style.py in <module>()
----> 1 mpl.rcParams['axes.color_cycle'] = list(colors)
C:\Users\laser2002j\Anaconda\envs\py3\lib\site-packages\matplotlib\__init__.py in __setitem__(self, key, val)
872 warnings.warn(self.msg_depr % (key, alt_key))
873 key = alt_key
--> 874 val = alt_val(val)
875 elif key in _deprecated_ignore_map:
876 alt = _deprecated_ignore_map[key]
C:\Users\laser2002j\Anaconda\envs\py3\lib\site-packages\matplotlib\__init__.py in <lambda>(x)
834 lambda x: "path" if x else "none", None),
835 'savefig.extension': ('savefig.format', lambda x: x, None),
--> 836 'axes.color_cycle': ('axes.prop_cycle', lambda x: cycler('color', x),
837 lambda x: [c.get('color', None) for c in x]),
838 }
C:\Users\laser2002j\Anaconda\envs\py3\lib\site-packages\matplotlib\rcsetup.py in cycler(*args, **kwargs)
713 if validator is None:
714 raise TypeError("Unknown artist property: %s" % prop)
--> 715 vals = validator(vals)
716 # We will normalize the property names as well to reduce
717 # the amount of alias handling code elsewhere.
C:\Users\laser2002j\Anaconda\envs\py3\lib\site-packages\matplotlib\rcsetup.py in f(s)
80 raise
81 elif type(s) in (list, tuple):
---> 82 return [scalar_validator(v) for v in s if v]
83 else:
84 msg = "'s' must be of type [ string | list | tuple ]"
C:\Users\laser2002j\Anaconda\envs\py3\lib\site-packages\matplotlib\rcsetup.py in <listcomp>(.0)
80 raise
81 elif type(s) in (list, tuple):
---> 82 return [scalar_validator(v) for v in s if v]
83 else:
84 msg = "'s' must be of type [ string | list | tuple ]"
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Anaconda on Windows 7 x64, python 3.4 and matplotlib 1.5rc2.