Skip to content

Commit 7f78674

Browse files
committed
Add whats_new entry
1 parent e9b3d97 commit 7f78674

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
An iterable object with labels can be passed to `Axes.plot()`
2+
-------------------------------------------------------------
3+
4+
If multidimensional data is used for plotting, labels can be specified in
5+
a vectorized way with an iterable object of size corresponding to the
6+
data array shape (exactly 5 labels are expected when plotting 5 lines).
7+
It works with `Axes.plot()` as well as with it's wrapper `plt.plot()`.
8+
9+
.. plot::
10+
11+
from matplotlib import pyplot as plt
12+
13+
x = [1, 2, 5]
14+
15+
y = [[2, 4, 3],
16+
[4, 7, 1],
17+
[3, 9, 2]]
18+
19+
plt.plot(x, y, label=['one', 'two', 'three'])
20+
plt.legend()

0 commit comments

Comments
 (0)