Skip to content

Commit 439b2c0

Browse files
committed
Clarify docs for stackplot.
Fixes #20036.
1 parent 45031fd commit 439b2c0

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

lib/matplotlib/stackplot.py

+10-5
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,17 @@ def stackplot(axes, x, *args,
4141
size of each layer. It is also called 'Streamgraph'-layout. More
4242
details can be found at http://leebyron.com/streamgraph/.
4343
44-
labels : Length N list of str
45-
Labels to assign to each data series.
44+
labels : list of str, optional
45+
A sequence of labels to assign to each data series. If unspecified,
46+
then no labels will be applied to artists.
4647
47-
colors : Length N list of color
48-
A list or tuple of colors. These will be cycled through and used to
49-
colour the stacked areas.
48+
colors : list of color, optional
49+
A sequence of colors to be cycled through and used to color the stacked
50+
areas. The sequence need not be exactly the same length as the number
51+
of provided *y*, in which case the colors will repeat from the
52+
beginning.
53+
54+
If not specified, the colors from the Axes property cycle will be used.
5055
5156
**kwargs
5257
All other keyword arguments are passed to `.Axes.fill_between`.

0 commit comments

Comments
 (0)