The following code:
# in ipython notebook, enable inline plotting with:
It produces the following graph:

I would like to indicate the colors of the four areas (1) the background (currently white), (2 and 3) each individual event (non-overlapping areas, currently blue and red) and (4) the intersection event (currently mixed with purple ) For example, I could color them red, green, blue, yellow, or — I could give them four different, precisely defined values for shades of gray (a later version). [Colors will be generated based on the characteristics of the underlying data.]
I specifically do not want to use alpha blending to “bring out” the color at the intersection. I need to explicitly control the colors of all four areas.
I can come up with several strategies to solve this problem:
- Ask mpl to extract the “primitive” patch objects that make up the three clearly colored graphic areas (and do something similar to working in the background), and then color them.
- Given the circles, manually calculate their intersection and the color of that intersection (somehow). Jumping over points seems ugly.
Thanks!
source share