4.0

4.0 | 4 ratings Rate this file 9 Downloads (last 30 days) File Size: 1.65 KB File ID: #5345
image thumbnail

ibar.m

by

 

24 Jun 2004 (Updated )

ibar() does the same as bar(), but returns an individual handle for each bar.

| Watch this File

File Information
Description

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'.

MATLAB release MATLAB 6.5 (R13)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
18 Feb 2008 Shilpa Gandhi

Exactly what I needed! Thanks!

23 Aug 2006 Matthias Moosmann

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)

Contact us