You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Version 2.0.0b1.post7580.dev0+ge487118
matplotlib
Fork me on GitHub

This Page

matplotlib.axes.Axes.set_prop_cycle

Axes.set_prop_cycle(*args, **kwargs)

Set the property cycle for any future plot commands on this Axes.

set_prop_cycle(arg) set_prop_cycle(label, itr) set_prop_cycle(label1=itr1[, label2=itr2[, …]])

Form 1 simply sets given Cycler object.

Form 2 creates and sets a Cycler from a label and an iterable.

Form 3 composes and sets a Cycler as an inner product of the pairs of keyword arguments. In other words, all of the iterables are cycled simultaneously, as if through zip().

Parameters:

arg : Cycler

Set the given Cycler. Can also be None to reset to the cycle defined by the current style.

label : str

The property key. Must be a valid Artist property. For example, ‘color’ or ‘linestyle’. Aliases are allowed, such as ‘c’ for ‘color’ and ‘lw’ for ‘linewidth’.

itr : iterable

Finite-length iterable of the property values. These values are validated and will raise a ValueError if invalid.