Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[ENH]: Legend entries for boxplot #27792

Closed
Milestone
@timhoffm

Description

@timhoffm

Problem

Currently, boxplots do not get legend entries.#27711 was an attempt to introduce them but only solved one very particular usecase and did not generalize well. See#27780.

There is alabels parameter, but that only sets x-tick labels. And it has one entry per box. For the legend we should have only one entry perboxplot() call no matter how many boxes that has, becauseboxplot draws N identically styled boxes and it does not make sense to have N identical handles with different labels.

Because of the x-tick relation oflabels and it's relation to individual boxes, this parameter is not suited for the legend labels.

Proposed solution

We need a separate parameter. There are basically two options:

Variant 1)legend_label: str

pro: simple and clear, no interference with the existing API
con: inconsistent with the rest of the library: all other functions uselabel for the legend entry.

Variant 2)label: str

pro: consistent with the rest of the library
con: Havinglabel alongsidelabels is quite confusing and easily leads to errors. (We could runtime-check for the type str vs list of str, to give helpful error messages but still ...)
If we want to go this way, we should renamelabels totick_labels or similar.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp