Cycler
¶To inspect the values of the transposed Cycler
use
│ │ │ │ the Cycler.by_key
method:
In [36]: c_m.by_key()
│ │ │ │ Out[36]:
│ │ │ │ -{'marker': ['s', 'o', 's', 'o', 's', 'o'],
│ │ │ │ - 'color': ['r', 'r', 'g', 'g', 'b', 'b']}
│ │ │ │ +{'color': ['r', 'r', 'g', 'g', 'b', 'b'],
│ │ │ │ + 'marker': ['s', 'o', 's', 'o', 's', 'o']}
│ │ │ │
This dict
can be mutated and used to create a new Cycler
with
│ │ │ │ the updated values
In [37]: bk = c_m.by_key()
│ │ │ │
│ │ │ │ In [38]: bk['color'] = ['green'] * len(c_m)
│ │ │ │
│ │ │ │ In [39]: cycler(**bk)
│ │ │ │ -Out[39]: (cycler('marker', ['s', 'o', 's', 'o', 's', 'o']) + cycler('color', ['green', 'green', 'green', 'green', 'green', 'green']))
│ │ │ │ +Out[39]: (cycler('color', ['green', 'green', 'green', 'green', 'green', 'green']) + cycler('marker', ['s', 'o', 's', 'o', 's', 'o']))
│ │ │ │
We can use Cycler
instances to cycle over one or more kwarg
to
│ │ │ │ plot
: