MATLAB Answers

Add markers for stairs() plot, specified amount of makers

4 views (last 30 days)
Robert Short
Robert Short on 29 Oct 2020
Answered: Star Strider on 29 Oct 2020
Plotting various data which looks more presentable using the stairs() function.
The data has a lot of samples 1000+ for a 10 second duration. I'd like to add a specific amount of markers as a function of the number of samples.
I understand 'MarkerIndices', 1: length(variable)/20:length(variable)) would give me 20 markers if I were to use a generic plot - however this does not work with the 'stairs' function. Is there a workaround ?

Community Treasure Hunt

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

Start Hunting!

Translated by