Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a69074e

Browse files
committed
Merge pull request #2146 from dmcdougall/fix_stackplot_legend
Update stackplot docs for legend capabilities
2 parents a74dc26 + 6a2258c commit a69074e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/matplotlib/stackplot.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ def stackplot(axes, x, *args, **kwargs):
4343
Returns *r* : A list of
4444
:class:`~matplotlib.collections.PolyCollection`, one for each
4545
element in the stacked area plot.
46+
47+
Note that :class:`~matplotlib.legend.Legend` does not support
48+
:class:`~matplotlib.collections.PolyCollection` objects. To create a
49+
legend on a stackplot, use a proxy artist:
50+
http://matplotlib.org/users/legend_guide.html#using-proxy-artist
4651
"""
4752

4853
if len(args) == 1:

0 commit comments

Comments
 (0)