How to plot stair like this??

3 views (last 30 days)
onlyPlot =[ 95 143
91 289
91 427
77 551
77 671]
x=[onlyPlot(:,2)];
y=[onlyPlot(:,1)];
stairs(x,y,'LineWidth',2,'Marker','o','MarkerFaceColor','c');
axis([0,700,76,96])

Accepted Answer

Jon
Jon on 15 Nov 2021
Edited: Jon on 15 Nov 2021
I think this does what you want and is nice and simple
X = [95 0;onlyPlot]
stairs(flip(X(:,2)),flip(X(:,1)),'-o')
  2 Comments
Vannapong Klungthong
Vannapong Klungthong on 16 Nov 2021
Thanks a lot it solve my problem clearly

Sign in to comment.

More Answers (0)

Tags

Products


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!