Rank: 210 based on 365 downloads (last 30 days) and 1 file submitted
photo

Martina Callaghan

E-mail
Company/University
University College London
Lat/Long
51.538635, -0.101385

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Martina
Updated   File Tags Downloads
(last 30 days)
Comments Rating
27 Aug 2013 Screenshot Bar Chart with Error Bars This is a very simple extension of MatLab's bar function to add error bars. Author: Martina Callaghan error, bar, errorbar, bar chart, plotting, graph 365 34
  • 4.9
4.9 | 20 ratings
Comments and Ratings by Martina View all
Updated File Comments Rating
16 Sep 2014 Bar Chart with Error Bars This is a very simple extension of MatLab's bar function to add error bars. Author: Martina Callaghan

Hi Parto,

For example:
h = barwitherr(randn(3,4), randn(3,4));
set(h(1), 'FaceColor','r')
set(h(2), 'FaceColor','g')

The first parameter will be red and the second parameter will be green.

12 Feb 2014 Bar Chart with Error Bars This is a very simple extension of MatLab's bar function to add error bars. Author: Martina Callaghan

Hi Clare, yes, you can change the line width via:
[hBox hErr] = barwitherr(errY, y);
set(hErr(:), 'LineWidth', 2)

20 Jan 2014 Bar Chart with Error Bars This is a very simple extension of MatLab's bar function to add error bars. Author: Martina Callaghan

Hi Cui, use asymmetric error bars (example in header) and set one error to 0.

24 Jun 2013 Bar Chart with Error Bars This is a very simple extension of MatLab's bar function to add error bars. Author: Martina Callaghan

Mossi, see the help entry for the file and the help entry for bar (dictates what kind of plots can be created).

You appear to have four parameters in three conditions. So, your data (y) and errors (errY) should each be held in a 3x4 matrix.
h = barwitherr(errY, y);

Use the handles "h" to tailor figure properties/appearance.

22 May 2013 freezeColors / unfreezeColors Use multiple colormaps per figure! Version 2, now works for many types of objects, not only images. Author: John Iversen

Thanks! Super useful.

Comments and Ratings on Martina's Files View all
Updated File Comment by Comments Rating
17 Sep 2014 Bar Chart with Error Bars This is a very simple extension of MatLab's bar function to add error bars. Author: Martina Callaghan WH

This is a very useful script. Thank you!
However, I can get it to work in Matlab 2014a, but it doesn't work in Matlab 2014b trial version. The bars display properly but the error bars didn't. Do you know what the problem is? Thank you!

16 Sep 2014 Bar Chart with Error Bars This is a very simple extension of MatLab's bar function to add error bars. Author: Martina Callaghan Parto

Thanks for your quick response. The color of both bars change together to red or green.
for example:
y=[0.33,0.362];
errY=[0.017,0.054];
h=barwitherr(errY,y);
set(h(1),'FaceColor','g')

16 Sep 2014 Bar Chart with Error Bars This is a very simple extension of MatLab's bar function to add error bars. Author: Martina Callaghan Callaghan, Martina

Hi Parto,

For example:
h = barwitherr(randn(3,4), randn(3,4));
set(h(1), 'FaceColor','r')
set(h(2), 'FaceColor','g')

The first parameter will be red and the second parameter will be green.

15 Sep 2014 Bar Chart with Error Bars This is a very simple extension of MatLab's bar function to add error bars. Author: Martina Callaghan Parto

Thank you very much for this useful matlab file. I just wanted to know how I can modify each bar separately, for example color?

23 Jul 2014 Bar Chart with Error Bars This is a very simple extension of MatLab's bar function to add error bars. Author: Martina Callaghan Elizabeth

Thank you! Works a charm!

Contact us