area, stairs
25 views (last 30 days)
Show older comments
Is there any property setting for 'area' function which generates the 'straits' for the boundary of the colored regions instead of 'plot' curves?
0 Comments
Accepted Answer
Oleg Komarov
on 20 Jul 2011
% Random row input
x = 1:10;
y = rand(1,10);
% Normal area chart
subplot(3,1,1)
area(x,y)
% Stairs chart (non area)
subplot(3,1,2)
stairs(x,y)
% Stairs area
subplot(3,1,3)
x = [x;x];
y = [y;y];
area(x([2:end end]),y(1:end))
More Answers (0)
See Also
Categories
Find more on Line 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!