Histograms and error bars
Mathieu Dubois
mathieu.dubois at limsi.fr
Thu Dec 11 11:36:55 CET 2008
Hi everyone,
I would like to plot an histogram to compare 5 experimental conditions.
For example let's say that I have 4 classes and 2 experimental conditions.
Therefore I have a 4*1 vector "classes" giving the classes and a 4*2
matrix "average" giving the average for each class and each experimental
conditions.
Then:
--> bar(classes, average)
does the trick.
The problem is that I want to plot error bars for each class and each
experimental condition.
I know how to do that with a single experimental condition with the
"errbar" function because in this case I know the x and y position of each
bar (x is given by "classes" and y by "average"). But with several
experimental conditions, each bar has a different x position. "bar"
internally compute this x position but I cannot access it so I cannot use
"errbar".
Does anyone have an idea?
Is there a way to "attach" errors to data and automatically plot them?
Thanks in advance,
Mathieu
More information about the users
mailing list