GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Alternative compositing methods · Issue #6210 · matplotlib/matplotlib

Alternative compositing methods #6210

New issue
Copy link
New issue
Copy link
Closed
#31162
Closed
Alternative compositing methods#6210
#31162
Copy link
Labels
Difficulty: Hardhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesNew featurekeepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Actiontopic: color/alpha
Milestone
v3.12.0

Description

@wavexx
wavexx
opened on Mar 23, 2016
Issue body actions

I'm wondering if there is general interest in having other alpha/color compositing modes for filling edges and patches in MPL. I'd love to have all the classical Porter/Duff operators.

I find alpha blending very limiting. If I want to overlay two datasets while preserving decent luminosity in the output, there are very few light colors that work well and retain good contrast. HSL color blending would in almost all cases provide better results.

If I want to highlight the intersection between two areas, alpha blending incurs into the same problem. I need to calculate the intersection myself for good results. With simple XORing I wouldn't have to.

At least with the cairo backend, it shouldn't be hard to implement, as it has native support for all the classical compositing operators (http://cairographics.org/operators/). I cannot comment on other backends. The blending operator would need to be an extra property of both patches and edges, although for proper compositing you might (as the user) need to separate rasterization of the two for proper results.

General comments?

Reacted by NOhs

Activity

  1. tacaswell
    added this to the This milestone has been deleted milestone on Mar 23, 2016
  2. tacaswell
    added
    New feature
    Difficulty: Hardhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues
    on Mar 23, 2016
  3. mdboom commented on Mar 23, 2016

    @mdboom
    mdboom
    on Mar 23, 2016
    Member
    More actions

    I'm 👍 on the idea. The Agg backend will probably be the trickiest. The Agg library supports these operations, but we have not exposed them to Python, and being templatized C++, it could require a lot of template instantiations to get working.

    Postscript as a format doesn't support these, but it's fine to ignore it for a new feature like this.

  4. anntzer commented on May 12, 2018

    @anntzer
    anntzer
    on May 12, 2018
    Contributor
    More actions

    fwiw, now implemented by mplcairo (https://github.com/anntzer/mplcairo/blob/master/examples/operators.py), though of course this needs to be manually set by a custom artist subclass as there is no support from mpl's side.

    Edit: mplcairo can now dynamically generate such artist subclasses.

  5. story645
    modified the milestones: This milestone has been deleted, needs sorting on Oct 6, 2022
  6. story645
    added
    topic: color/alpha
    on May 25, 2023
  7. github-actions commented on May 27, 2024

    @github-actions
    github-actionsBot
    on May 27, 2024 – with GitHub Actions
    More actions

    This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

  8. github-actions
    added
    status: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Action
    on May 27, 2024
  9. anntzer
    added
    keepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Action
    and removed
    status: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Action
    on May 27, 2024
  10. story645
    closed this as completedin #31162on Aug 27, 2026
  11. QuLogic
    modified the milestones: future releases, v3.12.0 on Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Hardhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesNew featurekeepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Actiontopic: color/alpha

    Type

    No type

    Projects

    No projects

      Milestone

      • v3.12.0No due date

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.