ibar() does the same as bar(), but returns a seperate handle for each bar, therefore enabling you to address each bar and set ist properties individually, e.g. change color of single bars. To access the handles s.a. Matlab Help 'Obtaining Data from Cell Arrays'.
Exactly what I needed! Thanks!
It was exactly what I was looking for. But unfortunately it doesn't work with R2006a...
for later version need to change the "bar command" to bar('v6',...) so get the appropriate handle assignments.
Perfect! Just want I was looking for. However, an example would have been helpful. Here is one:
y = rand(10, 1);
h = ibar(y);
% set elements 3, 5, 7 of bar plot to yellow:
set( h([3 5 7]), 'facecolor', 'yellow')
Now works for MATLAB 7, too.(MATLAB bar function changed in Version 7)
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.