Hi Wouter,
I think the following example is what you want, though it could be difficult to program is you have many many bars:
pro barplot_errorplot_ex
nBars = 3
colors = ['red','yellow','blue']
data = RANDOMU(s,10,nBars)
data_error = [0.2, 0.1, 0.1, 0.2, 0.2, 0.1, 0.2, 0.2, 0.1, 0.1]
loc1 = INDGEN(10)-.25
b = BARPLOT(loc1, data[*,0], FILL_COLOR=colors[0], WIDTH = 0.25, /overplot)
p = errorplot(loc1, data[*,0], data_error, /OVERPLOT, LINESTYLE = 6)
loc2 = INDGEN(10)
b = BARPLOT(loc2, data[*,1], FILL_COLOR=colors[1], WIDTH = 0.25, /overplot)
p = errorplot(loc2, data[*,1], data_error, /OVERPLOT, LINESTYLE = 6)
loc3 = INDGEN(10)+.25
b = BARPLOT(loc3, data[*,2], FILL_COLOR=colors[2], WIDTH = 0.25, /overplot)
p = errorplot(loc3, data[*,2], data_error, /OVERPLOT, LINESTYLE = 6)
end
Cheers,
Fernando
|