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'.
It was exactly what I was looking for. But unfortunately it doesn't work with R2006a...
03 Feb 2005
Tim Hallett
for later version need to change the "bar command" to bar('v6',...) so get the appropriate handle assignments.
04 Jan 2005
Bob Farrell
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')
Updates
06 Jan 2005
Now works for MATLAB 7, too.(MATLAB bar function changed in Version 7)
14 Feb 2005
obviously I didn't manage to upload the revised version last time... Sorry