Set the property cycle of the Axes. The property cycle controls the style properties such as color, marker and linestyle of future plot commands. The style properties of data already added to the Axes are not modified. Call signatures:: set_prop_
(self, *args, **kwargs)
| 1605 | _title.set_clip_box(None) |
| 1606 | |
| 1607 | def set_prop_cycle(self, *args, **kwargs): |
| 1608 | """ |
| 1609 | Set the property cycle of the Axes. |
| 1610 | |
| 1611 | The property cycle controls the style properties such as color, |
| 1612 | marker and linestyle of future plot commands. The style properties |
| 1613 | of data already added to the Axes are not modified. |
| 1614 | |
| 1615 | Call signatures:: |
| 1616 | |
| 1617 | set_prop_cycle(cycler) |
| 1618 | set_prop_cycle(label=values, label2=values2, ...) |
| 1619 | set_prop_cycle(label, values) |
| 1620 | |
| 1621 | Form 1 sets given `~cycler.Cycler` object. |
| 1622 | |
| 1623 | Form 2 creates a `~cycler.Cycler` which cycles over one or more |
| 1624 | properties simultaneously and set it as the property cycle of the |
| 1625 | Axes. If multiple properties are given, their value lists must have |
| 1626 | the same length. This is just a shortcut for explicitly creating a |
| 1627 | cycler and passing it to the function, i.e. it's short for |
| 1628 | ``set_prop_cycle(cycler(label=values, label2=values2, ...))``. |
| 1629 | |
| 1630 | Form 3 creates a `~cycler.Cycler` for a single property and set it |
| 1631 | as the property cycle of the Axes. This form exists for compatibility |
| 1632 | with the original `cycler.cycler` interface. Its use is discouraged |
| 1633 | in favor of the kwarg form, i.e. ``set_prop_cycle(label=values)``. |
| 1634 | |
| 1635 | Parameters |
| 1636 | ---------- |
| 1637 | cycler : `~cycler.Cycler` or ``None`` |
| 1638 | Set the given Cycler. *None* resets to the cycle defined by the |
| 1639 | current style. |
| 1640 | |
| 1641 | .. ACCEPTS: `~cycler.Cycler` |
| 1642 | |
| 1643 | label : str |
| 1644 | The property key. Must be a valid `.Artist` property. |
| 1645 | For example, 'color' or 'linestyle'. Aliases are allowed, |
| 1646 | such as 'c' for 'color' and 'lw' for 'linewidth'. |
| 1647 | |
| 1648 | values : iterable |
| 1649 | Finite-length iterable of the property values. These values |
| 1650 | are validated and will raise a ValueError if invalid. |
| 1651 | |
| 1652 | See Also |
| 1653 | -------- |
| 1654 | matplotlib.rcsetup.cycler |
| 1655 | Convenience function for creating validated cyclers for properties. |
| 1656 | cycler.cycler |
| 1657 | The original function for creating unvalidated cyclers. |
| 1658 | |
| 1659 | Examples |
| 1660 | -------- |
| 1661 | Setting the property cycle for a single property: |
| 1662 | |
| 1663 | >>> ax.set_prop_cycle(color=['red', 'green', 'blue']) |
| 1664 |