Henry, many thanks for your reply!
I have tried that. Then there is no bar chart anymore.
Here is a snippet of my code:
array=dlmread("testfile2.csv",",") % there are 2 rows and 6 columns of example
data
% data in columns, cols 1,3,5 are the values to be plotted as bars,
% cols 2,4,6 contain dy for the error bars
columns=[]
bars=[]
for i=1:3
columns=[columns,array(:,2*i-1)] % isolate data for bars
bars=[bars,array(:,2*i)] % isolate data for error bars
endfor
newplot()
colormap winter;
bar([columns])
errorbar([columns],[bars])
title('Title XYZ','Fontsize',16);
ylim([0,10]) % yaxis neu setzen
xlim([0,10])
legend('condition 1','condition 2','condition 3')
ylabel('arbitrary units')
when the % before "bar" is removed (and the "errorbars" line is commented out),
then a bar chart with 2 sets of bars (3 bars per set)
is displayed. If the code is run as shows, I get 3x2 plotted points with errer
bars.
When both lines are executed, first I see a plot with the axes messed up (xlim
and ylim are ignored), then I see another plot with correct axes, but no
columns (as when the bar command is not run at all)
Any clues?