So I have been reading Plotting Error Bars on a Log Scale on how to implement errorbars with a logarithmic y-scale but I have another problem: some of my errorbars are negative values and I don't know how to implement this in the graph.

I don't know if this is even possible but if anyone knows a solution I'd be very happy to hear it. Thanks in advance.

  • $\begingroup$ One reason for obtaining the lower end of the error bar being negative when you have positive data is that your distribution is skewed and using plus-or-minus one or two standard deviations (or standard errors) is a poor description of where the data is located (using standard deviations) or how well you've estimated the mean (using standard errors). What you really need to give is a complete example (code and data) if you want a solution targeted to your problem. $\endgroup$
    – JimB
    Commented Apr 23, 2017 at 21:26

1 Answer 1


Non-positive numbers are not real, so they cannot be plotted on the log scale. If these numbers are actually non-physical, like negative absolute temperatures or expected life, you might reconsider how the error limits are being computed. If they are physical, but uninteresting, you could replace them with positive numbers smaller than the smallest interesting values, and then restrict the range of the plot to let them truncate. This might serve the purpose of displaying the data.

In the code below, the code by @Dr. Belisarius has been modified to accomplish this:

(* smaller than smallest interesting value *)
(* replace non-positive numbers with minVal *)
(* restrict lower range using opts *)
ePlot[ListLogPlot,dataX,plusMinList,PlotRange->{Automatic,{10 minVal,All}}]

enter image description here

  • $\begingroup$ This should be sufficient for what I want to do as the negative errorbars don't actually represent something physical so this does the job very well. Thanks a lot! $\endgroup$ Commented Apr 24, 2017 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.