Deprecate adding a (meaningless) colorbar to RGB or RGBA images · Issue #20576 · matplotlib/matplotlib · GitHub
Skip to content

Deprecate adding a (meaningless) colorbar to RGB or RGBA images #20576

Description

@Zac-HD

Describe the issue

In #9391, I proposed to open a new issue for "colorbar should refuse to let itself be created for an RGB(A) image" because colorbars are not meaningful for images with existing color. #4369 (comment) similarly notes that this makes no sense.

(better late than never I guess!)

Proposed fix

I think that attempting to add a colorbar for an RGB or RGBA image should be an explicit error, following a period of deprecation warnings.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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