A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.set_prop_cycle.html below:

matplotlib.axes.Axes.set_prop_cycle — Matplotlib 3.10.5 documentation

matplotlib.axes.Axes.set_prop_cycle#
Axes.set_prop_cycle(*args, **kwargs)[source]#

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_cycle(cycler)
set_prop_cycle(label=values, label2=values2, ...)
set_prop_cycle(label, values)

Form 1 sets given Cycler object.

Form 2 creates a Cycler which cycles over one or more properties simultaneously and set it as the property cycle of the Axes. If multiple properties are given, their value lists must have the same length. This is just a shortcut for explicitly creating a cycler and passing it to the function, i.e. it's short for set_prop_cycle(cycler(label=values, label2=values2, ...)).

Form 3 creates a Cycler for a single property and set it as the property cycle of the Axes. This form exists for compatibility with the original cycler.cycler interface. Its use is discouraged in favor of the kwarg form, i.e. set_prop_cycle(label=values).

Parameters:
cyclerCycler or None

Set the given Cycler. None resets to the cycle defined by the current style.

labelstr

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'.

valuesiterable

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

Examples

Setting the property cycle for a single property:

>>> ax.set_prop_cycle(color=['red', 'green', 'blue'])

Setting the property cycle for simultaneously cycling over multiple properties (e.g. red circle, green plus, blue cross):

>>> ax.set_prop_cycle(color=['red', 'green', 'blue'],
...                   marker=['o', '+', 'x'])
Examples using matplotlib.axes.Axes.set_prop_cycle#

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4