Can I get a handle to individual bars in barh?

2 views (last 30 days)
I'd like to have a separate callback for each bar in a barh plot. Can I get an individual handle to each for this purpose? I tried plotting each bar one at a time, but the Y-axis is all wrong (it appears to keep only the label for the first bar).

Accepted Answer

Image Analyst
Image Analyst on 7 Dec 2016
See my attached demo.
  1 Comment
Chuck37
Chuck37 on 7 Dec 2016
Thanks, looks like setting 'xtickmode' to 'auto' is the trick to getting them back.

Sign in to comment.

More Answers (0)

Categories

Find more on Graphics Object Programming in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!