I have an experiment that relies on measuring temperature as a function of a given condition. I change the condition, allow the temperature to stabilize as much as possible, then take 3 measurements in a row, which are all slightly different, as the values tend to oscillate.
For example, I might have a set of readings that looks like this:
X Temperature 10.1 80.3 10.8 82.1 10.3 78.9 20.4 100.2 20.0 101.1 20.2 101.0 30.1 139.1 30.0 140.2 30.0 138.2
Which I will combine to look like this:
uniqueX Xmean Xstd Tmean Tstd _______ ______ ________ ______ _______ 10 10.2 0.1 80.433 1.6042 20 20.2 0.2 100.77 0.49329 30 30.033 0.057735 139.17 1.0017 % Matlab code for computation xNom = round(X); [uniqueX,~,subs] = unique(xNom); Tmean = accumarray(subs, T, , @mean); Tstd = accumarray(subs, T, , @std); Xmean = accumarray(subs, X, , @mean); Xstd = accumarray(subs, X, , @std); tb = table(uniqueX, Xmean, Xstd, Tmean, Tstd);
I'm wondering: what is the best way to plot such data, i.e. when three data points like this are combined to represent one point, what is the best value to use for the error bars on a plot of T vs X, for example in this case?