[Excel] color between two curves
rediriger-ccm
Posted messages
37
Status
Member
-
Mario -
Mario -
Hello!
I have 2 curves in Excel of the type: y=f(x)
I would like to color the area between these two curves in red, how can I do that?
Thank you!
I have 2 curves in Excel of the type: y=f(x)
I would like to color the area between these two curves in red, how can I do that?
Thank you!
1 answer
-
Assuming curve A is above curve B.
Create a chart with the following data series (in order):
- curve B
- curve A-B
Choose "chart type": stacked areas. Choose "no fill" for the bottom area and red fill for the area between the curves.
For the case of two curves A and B that cross, you can also color the intermediate area in one color (say red) if AB. To do this, simply stack 3 areas:
- curve of the min of A and B, with no fill
- curve of the negative part of A-B (=- (A-B) if A- curve of the positive part of A-B (=A-B if A>B and 0 otherwise), in green