Skip to content

[ENH]: Allow list of padding values for bar_label #29647

Closed
@nhansendev

Description

@nhansendev

Problem

Sometimes when adding labels to bar plots the labels will overlap another item and need padding. In this example the label "300" (column D) is too low and overlaps other text. Ideally I could just provide padding as a list to bar_label so that I can target this specific label (instead of the current all-or-nothing float value):
Image

With manually added labels I can add padding to just the desired label, but it would be nice as a built-in option:
Image

Proposed solution

Add logic to check if the padding parameter of bar_label is an appropriate-length iterable and apply padding accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good first issueOpen a pull request against these issues if there are no active ones!New feature

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions