Two circles with “exponential decay” coloring, and alpha < 1, having trouble with color mixing?

Please keep all emails on-list.

I am actually not sure this is possible. The problem is even if the
background is transparent, the first image is still composited on to it
first, thus the bottom value still comes in with alpha ** 2 when the second
layer is added.

Why are you trying to do this? You might be a better to add your data into
one image and then use shapely to compute the union of the paths for



On Mon, Nov 23, 2015 at 8:07 PM Brian Merchant <bhmerchant at> wrote:

Hi Thomas,

Ah, so should I somehow set the background to be transparent? Put another
way, how would I remove the influence of the background on the compositing?

On Mon, Nov 23, 2015 at 2:41 PM, Thomas Caswell <tcaswell at> > wrote:

The way we do the alpha blending, the output value is (alpha * v1) +
((alpha-1) * v2). All of the artists are compsited down on top of a white
background so the compositing is not commutative.

(a * .5) + (.5 * (b * .5 + .5)) =/= (b * .5) + (.5 * (a * .5 + .5))

On Mon, Nov 23, 2015 at 1:55 PM Sterling Smith <smithsp at> >> wrote:

Maybe the issue is with the colormap not having an alpha? Does this

Otherwise, you might file a bug at


On Nov 20, 2015, at 4:46PM, Brian Merchant <bhmerchant at> wrote:

> Hi all,
> In order to get circles such that their coloring is radially
symmetric, with center being the darkest, and exponential decay in color as
one moves farther away from the center along the radius, I used imshow with
clip_path using Circle patches.
> Here's a toy script that overlaps two such circles:
> As you can see if you run the script (or, if you follow this link:, even though the alpha is set at 0.5,
there doesn't seem to be proper "color mixing" occurring (we should see a
result that is symmetric along the x-axis).
> Why is that, and what could I do to fix this issue?
> Kind regards,
> Brian
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at

Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple
Matplotlib-users mailing list
Matplotlib-users at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>