
Change color of overlapping waves with "fill-to-zero" mode

quoderatmac
Is there a straightforward way to reproduce the style of the attached plot in Igor Pro? In particular, where the red wave overlaps with the green wave, the color is white. I suspect there is an easy way to do this by arranging waves and choosing the correct mode/fill, but I haven't been able to figure it out. Any help is appreciated. I have Igor 7, so I can make one of the waves translucent; this approximates the effect I'm after, but I would prefer the look of the attached plot.


Forum

Support

Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More
With just two waves you could simply use fill-to-next with different colors for positive and negative values.
December 15, 2018 at 12:20 pm - Permalink
To do what you want without transparency, you need to splt the front (red) wave into two waves which add up to the value in the red wave. Here's a function that does that:
I've attached an image of the results compared to using transparency, as well as my demo experiment.
December 16, 2018 at 02:34 pm - Permalink