On a counts plot, How can I shift the marker over to the mid-point of the x range respectively?

5 views (last 30 days)
I plotted a figure showing binranges (x) and counts (y) using histc(). I would like to know how to shift the marker specifier "+" of each range in x to the mid-point.
the #counts should be represented right in the middle of time slot. say, 6 values above threshold within 0-1 second. 6 should be at .5s in the graph.
any help is appreciated.

Accepted Answer

Walter Roberson
Walter Roberson on 3 Jan 2014
plot((BR(1:end-1)+BR(2:end))/2, bincounts(1:end-1), '+r')
Caution: this drops off the last count as its position is undefined in your scheme.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!