TGraphAsymmErrors, show errors for points off axis

Hey there,

So to briefly explain my situation, I used to have two TH1F’s, one as the main plot, and another as a subplot, which showed the ratio of two variables from the main plot using the Divide function. Binomial errors were propogated automatically, and calling the draw function of the ratio plot with Draw(“E0”), drew all points, even those off of the y-axis (I needed to zoom in to a region or else the spectrum would look simply flat, however for a few points that were outside this window it was important that the errors bars which did reach down into that range were seen).

Then I had to move from simple binomial errors to poisson errors. I did this by creating two TGraphAsymmErrors from the two original TH1F’s that went into making the ratio plot, calculating the upper error, nominal, and lower error on each. I then combined these errors and created another TGraphAsymmErrors which I filled with the poisson upper ratio error, nominal ratio, and poisson lower ratio error. (Maybe I am giving too much information but I just want it to be clear that I am doing everything for a purpose).

I now want to plot this TGraphAsymmErrors of the Ratio, in the same way I did with my old TH1F ratio, however using Draw(“ep0”) or Draw(“p0”) does not draw the points off of the y-axis scale like Draw(“e0”) did before, nor does it show the errors associated with these points which should still be visible even though the nominal points are not, so it appears I am unable to do this (I have already looked in root.cern.ch/root/html/TGraphPainter.html).

Is there anyway I can achieve this?

Best Regards,

Dan

Can you post a small running macro reproducing what you get now ?
Thanks in advance

Hey,

So I quickly made this macro which replicates the problem. It is currently set to draw on axis’ which show the points and associated errors, but commenting out the current Y-Axis maximum, and swapping it for the other, replicates an example of the axis I need to display. As you can see the points are out of this range, however the errors are within the range, but are not drawn. For TH1F type Draw(“E0”) does the trick, but for TGraphAsymmErrors this does not appear to be the case.

Many thanks,

Dan
Example.C (1.25 KB)

I see your point. Also if you set the maximum < 9 the bars show up again.
I will check,

Ah yes, the points are all y=10 … as soon as the point is outside the limits nothing is drawn.
I’ll check.

I think I found the fix, but this implies removing some tests in the painting code. So I need to carefully check why these tests have been put in place to start with, in order to avoid bad side effects.
I’ll let you know.

Many thanks, I look forward to your reply!

The option “0” is now implement for TGraphXXXErrors classes in the svn trunk.
Thanks for reporting.

Great, Thanks!