Let's start with what I already found on the internet:
data = {{10, 4, 3, 0, 8, 8, 10, 8, 9, 10},
{2, 1, 2, 15, 5, 8, 7, 10, 9, 15},
{1, 4, 8, 1, 2, 8, 12, 10, 9, 15}};
ListLinePlot[Accumulate[data], Filling -> {1 -> {Axis, LightRed},
2 -> {{1}, LightOrange}, 3 -> {{2}, LightBlue}}, PlotStyle -> {Red, Orange, Blue}]
This one will produce a stacked graph like the one i want:
but the data I have is not directly usable like in this example because accumulate wouldn't work unless I process data in some way.
Let's say the data i have is something like this:
data = {
{ {1, 10}, {3, 94.94}, {5, 41.52}, {10, 15.25}, {100, 2.19} },
{ {4, 2.35}, {8, 10.64}, {12, 90.28}, {36, 50.74} },
{ {2, 11.55}, {10, 15.65}, {20, 41.81} },
{ {1, 20.13}, {3, 57.44}, {5, 42.74}, {10, 3.59}, {40, 2.05}, {100, 2.05} },
{ {4, 13.74}, {20, 65.49}, {40, 112.62}, {80, 10.42} }};
If plot all together with a ListLinePlot
, this is what I will get:
ListLinePlot[Table[data[[i]], {i, 1, Length[data] - 1}], Filling -> Axis]
Where each line is the junction of points for each set..
I would like to obtain a stacked graph exactly with these lines.
Could you help me to achieve this result?
Best Regards
PS: if possible would be cool see both cases where the values outside domains gives 0 contribute or the case were we continue using the same angular coefficient for the borders like in this image:
With the functions gets anyways = 0 if value < 0 :)