Skip to content

Commit c96334d

Browse files
committed
fix failing test
1 parent 2e41cb5 commit c96334d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

doc/users/next_whats_new/boxplot_legend_support.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Legend support for Boxplot
33
Boxplots now support a *label* parameter to create legend entries.
44

55
Legend labels can be passed as a list of strings to label multiple boxes in a single
6-
`.boxplot` call:
6+
`.Axes.boxplot` call:
77

88

99
.. plot::
@@ -37,7 +37,7 @@ Legend labels can be passed as a list of strings to label multiple boxes in a si
3737
ax.legend()
3838

3939

40-
Or as a single string to each individual `.boxplot`:
40+
Or as a single string to each individual `.Axes.boxplot`:
4141

4242
.. plot::
4343
:include-source: true

lib/matplotlib/tests/test_legend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1460,7 +1460,7 @@ def test_boxplot_legend_labels():
14601460
assert all(isinstance(h, mpl.lines.Line2D) for h in handles)
14611461

14621462
# Testing legend with number of labels different from number of boxes.
1463-
with pytest.raises(ValueError, match='There must be an equal number'):
1463+
with pytest.raises(ValueError, match='values must have same the length'):
14641464
bp3 = axs[2].boxplot(data, label=legend_labels[:-1])
14651465

14661466
# Test that for a string label, only the first box gets a label.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy