I have data that I want to plot on a log y-scale because it's not linear. When I plot the error, the bars are not of equal length (lower error looks larger) because of the log y-scale. How do I transform the error so it becomes the relative error and I get error bars of equal lengths above and below the datapoints?
I want to plot the error as a shaded area around the main data, so I need not plot a line above and below the main data. How do I calculate these two lines?
I don't calculate the logarithm of my data, I just plot it, and then change the y-axis through:
For clarity a figure of the problem. The dotted lines is the 'data + error', and the 'data - error'. Because of the log scale, the error seems way lager for the 'data - error', eventhough the error margin is equal above and below the data line. How do I transform the error so it has an equal distance between the error above and below the data line? I Hope this is more clear now.
data = [1.0 1.4 1.5 2.6 1.9 1.9 3.6 4.3 9.5 9.2];
error = [1.2 1.1 1.4 2.0 1.5 1.2 2.2 2.6 0.6 0.7];
dataPlus = data + error;
dataMin = data - error;