I have a datafile with some points that looks like this (notice that some values are missing):
x A 1-A
0 1 0
0.25 0 1
0.5
0.75 0 1
1 1 0
1.25 0 1
1.5
1.75 0 1
2 1 0
2.25 0 1
2.5
2.75 0 1
3 1 0
3.25 0 1
3.5
3.75 0 1
4 1 0
4.25 0 1
5
I would like to plot this data into a graph that looks like this (notice that the pink line is the max of the other two lines at all times):
In order to do so, I have the following gnuplot code, which works well for all but the pink line:
gnuplot> max(x,y) = (x>y) ? x : y
gnuplot> plot "dataset1" using 1:2 title "A" with lines lc rgbcolor "black" lw 4, \
>"dataset1" using 1:3 title "1-A" with lines lc rgbcolor "blue" lw 4, \
>"dataset1" using 1:(max($2,$3)) title "Fuzzy(A)" with lines lc rgbcolor "purple" lw 4
However, this produces the following graph (notice that the purple line does not do what the pink line in the previous image does):
How could I go about producing a graph that looks like the first image, as opposed to what I have?