How can I plot multiple areas in the same graph?
Show older comments
I have 6 vectors and I want to make a plot of their areas, exactly like the image attached.

Is there any way to acomplished that? Thanks a lot!
Accepted Answer
More Answers (2)
Héctor
on 19 May 2014
0 votes
Ullekh Gambhira
on 16 Jun 2018
0 votes
I am facing the same issue, I solved it by using "Shade area between two curves" function by John Bockstege. The file exchange link for this function is below:
https://www.mathworks.com/matlabcentral/fileexchange/13188-shade-area-between-two-curves
It does not consider base value, but basically shades the area between two lines. So one line can be your vector and the other can be a baseline*ones(size(x)).
Hope this helps.
Regards, Ullekh
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!