On a counts plot, How can I shift the marker over to the mid-point of the x range respectively?
4 views (last 30 days)
Show older comments
Ana-Patricia Lopez
on 28 Dec 2013
Answered: Walter Roberson
on 3 Jan 2014
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.
2 Comments
Accepted Answer
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.
0 Comments
More Answers (0)
See Also
Categories
Find more on Annotations 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!