Rank: 465761 based on 0 downloads (last 30 days) and 0 file submitted
photo

Eric

E-mail

Personal Profile:

 

Watch this Author's files

 

Comments and Ratings by Eric
Updated File Comments Rating
14 Jun 2013 barwitherr(errors,varargin) This is a very simple extension of MatLab's bar function to add error bars. Author: Martina Callaghan

Very useful function - I added a line to return the handle to the plot, so that existing commands from Matlab's "bar" can still be used with barwitherr:

After
>handles.bar = bar(varargin{:}); % standard implementation of bar fn
>hold on

Add:
h = handles.bar

and then change the function line at the top of the program to:

function h = barwitherr(errors,varargin)

You can then use things like

set(h(1),'FaceColor','g');

in your code that calls barwitherr, exactly as you would with calls to 'bar'.

Contact us