Skip to content

[ENH]: scalermappable bar #26312

Open
Open
@story645

Description

@story645

Problem

Coloring the bars in the bar chart based on some value isn't uncommon (#23265, #26310) and colors=cmap(norm(values)) is serviceable but it'd be nice if folks could directly set the cmap, norm, and data separately-especially for legend and colorbar creation.

Proposed solution

While it has it's problems, scatter has an API for how to manage colormap/norm or colors for discrete markers, so I think it would stay consistent if the scatter API for colors could be ported to bars. Could then probably adapt scatter.legend_elements implementation to auto generate legends from the colors.

ETA: If we did this, it'd probably also be a good reason to implement #7383

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions