MATLAB Answers


Can I get a handle to individual bars in barh?

Asked by Chuck37
on 7 Dec 2016
Latest activity Commented on by Chuck37
on 7 Dec 2016
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).


Sign in to comment.


1 Answer

Answer by Image Analyst
on 7 Dec 2016
 Accepted Answer

See my attached demo.

  1 Comment

Thanks, looks like setting 'xtickmode' to 'auto' is the trick to getting them back.

Sign in to comment.