-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Alternative compositing methods #6210
Copy link
Copy link
Open
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
Metadata
Metadata
Assignees
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
Fields
Give feedbackNo fields configured for issues without a type.
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?