Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dd84a56

Browse filesBrowse files
committed
remove redundant code, fix docs, simplify test
1 parent c083eb6 commit dd84a56
Copy full SHA for dd84a56

File tree

Expand file treeCollapse file tree

3 files changed

+12
-12
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+12
-12
lines changed
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
``boxplot`` legend labels
22
~~~~~~~~~~~~~~~~~~~~~~~~~
3-
The tick labels on `~.Axes.boxplot` were previously set with the `labels` parameter.
4-
This has been changed to `tick_labels` to be consistent with `~.Axes.bar` and to
5-
accommodate the newly introduced `label` parameter for the legend labels.
3+
The tick labels on `~.Axes.boxplot` were previously set with the *labels* parameter.
4+
This has been changed to *tick_labels* to be consistent with `~.Axes.bar` and to
5+
accommodate the newly introduced *label* parameter for the legend labels.

‎doc/users/next_whats_new/boxplot_legend_support.rst

Copy file name to clipboardExpand all lines: doc/users/next_whats_new/boxplot_legend_support.rst
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
Legend support for Boxplot
22
~~~~~~~~~~~~~~~~~~~~~~~~~~
33
Boxplots now generate legend entries and can be labelled with the
4-
new `label` parameter. If a patch is passed to the box with `show_patch=True`,
4+
new *label* parameter. If a patch is passed to the box with ``show_patch=True``,
55
the legend gets its handle from the patch instead of the `.Line2D` object from
66
the whiskers.
7-
The old `labels` parameter that was used for setting tick labels is deprecated
8-
and replaced with `tick_labels`.
7+
The old *labels* parameter that was used for setting tick labels is deprecated
8+
and replaced with *tick_labels*.
99

1010
.. plot::
1111
:include-source: true

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3886,8 +3886,7 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
38863886
boxes are drawn with Patch artists.
38873887
38883888
tick_labels : sequence, optional
3889-
Labels for each dataset (one per dataset). These are used for
3890-
x-tick labels; *not* for legend entries.
3889+
Labels for each dataset (one per dataset).
38913890
38923891
.. versionadded:: 3.9
38933892
@@ -3957,13 +3956,14 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
39573956
The style of the median.
39583957
meanprops : dict, default: None
39593958
The style of the mean.
3960-
data : indexable object, optional
3961-
DATA_PARAMETER_PLACEHOLDER
3962-
label : sequence, optional
3959+
label : str or list of str, optional
39633960
Legend labels for each boxplot.
39643961
39653962
.. versionadded:: 3.9
39663963
3964+
data : indexable object, optional
3965+
DATA_PARAMETER_PLACEHOLDER
3966+
39673967
See Also
39683968
--------
39693969
.Axes.bxp : Draw a boxplot from pre-computed statistics.
@@ -4179,7 +4179,7 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
41794179
zorder : float, default: ``Line2D.zorder = 2``
41804180
The zorder of the resulting boxplot.
41814181
4182-
label : sequence, optional
4182+
label : str or list of str, optional
41834183
Legend labels for each boxplot.
41844184
41854185
Returns

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.