FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[ENH]: set facecolor and edgecolor alpha separately · Issue #24681 · matplotlib/matplotlib · GitHub

Repository navigation

[ENH]: set facecolor and edgecolor alpha separately #24681

Description

Problem

I like making diagrams where my patch edge is solid but the fill is semi-transparent - in my case usually to fade out the color, but it's also useful to emphasize boundaries

Since alpha applies to the whole patch, the way I do this now is by converting my HTML colors into RGBs and appending an A

edgecolor=x_color, facecolor=(*mcolors.to_rgb(x_color), .10)

ETA: apparently I could also just do facecolor = mcolors.to_rgba(x_color, .10)

Proposed solution

Allow alpha to take a (facecolor, fillcolor) tuple for patch methods. As an example of prior art, we allow vectorized/separable alphas in imshow as of #14889

Activity

  1. added this to the v3.8.0 milestone on Mar 20, 2023
  2. changed the title [-][ENH]: set facecolor and edgecolor alpha seperately[/-] [+][ENH]: set facecolor and edgecolor alpha separately[/+] on Aug 9, 2023
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL