How to change plotyn plot curve lines to stairs line
Show older comments
I have 5 curve line, I have got them using plotyn.(see attached plot) I need to change the 5 line curves to stairs type line. How I can do it?
Thanks!
1 Comment
manoharb
on 18 Mar 2016
Please attach working m. file of plotyn
Accepted Answer
More Answers (1)
Star Strider
on 4 Mar 2016
1 vote
Consider using the interp1 function with the 'nearest' method on your data, then plot the result produced by interp1 as a function of the interpolation vector you used. Experiment with it to get the result you want. It should give you the ‘stairs’ effect.
Otherwise, you would have to hack into the code for the plotyn version you are using, and substitute stairs for plot. I don’t suggest modifying someone else’s code unless you thoroughly understand how it works.
1 Comment
davit petraasya
on 4 Mar 2016
Categories
Find more on Language Fundamentals 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!