From: Elisa PLN on
Hello,

I have two series of data and I would like to generate a graph to compare the means of the two series: I have in mind a simple graph with two bars, with the height of the first (second) bar corresponding to the mean of the first (second) series. And I would like to have the SEM of the series indicated on each bar - something like the whiskers in box plot representations.

Could you please let me know how to generate this?

Many thanks in advance for your precious help :-)

All the best,
Elise
From: us on
"Elisa PLN" <elise.payzan(a)gmail.com> wrote in message <hqulva$67m$1(a)fred.mathworks.com>...
> Hello,
>
> I have two series of data and I would like to generate a graph to compare the means of the two series: I have in mind a simple graph with two bars, with the height of the first (second) bar corresponding to the mean of the first (second) series. And I would like to have the SEM of the series indicated on each bar - something like the whiskers in box plot representations.
>
> Could you please let me know how to generate this?
>
> Many thanks in advance for your precious help :-)
>
> All the best,
> Elise

one of the many solutions

x=1:10;
y=rand(size(x));
e=.2*rand(size(x));
eh=errorbar(x,y,e);
hold on;
bar(x,y);
ec=get(eh,'children');
set(ec(1),'visible','off');

us