You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR removes the propagation of `labels` to any artist legend labels.
Other than the rest of the plotting functions `labels` is not used for legend labels
but for xtick labels. This is only poorly documented via
https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.bxp.html and in an
[example](https://matplotlib.org/stable/gallery/statistics/boxplot_color.html).
Whatever our way forward regarding the use of `labels` is, we should by no means
propagate them simultaneously to xticks and legend entries. This coupling would cripple
users' configurability and limit our ability to migrate to a clear API where legend
labels and tick labels can be configured independently.
Until we have sorted out a better API, the recommended solution for the original issue
#20512 is to grab the artists returned from `boxplot()` and either `set_label()` on
them or pass them to the legend call `ax.legend(handles, labels)`.
0 commit comments