When drawing a histogram with errorbars (at least with drawing option "E") points are clipped (removed and not drawn) if the central value of the point to be drawn falls outside of the axis range, even if the length of the error bar to be drawn extends inside of the axis range.
Is there any way to prevent this clipping behaviour?
Reason being that for some datasets, the central value of some points may lie a long way from the typical spread of points. Such points which are far from the typical spread of points often also have large uncertainties/errorbars.
In such cases, it is misleading to simply not draw the point. Although the central value cannot be seen, it is often very useful to be able to see the end of the errorbar, as this indicates that a point exists beyond the range of the axis being shown.
Of course, if the errorbar does not extend into the drawing range, then neither the central value, nor the end of the errorbar will be drawn.
In such cases, it would be extremely useful to be able to draw a V or ^ symbol at the x-axis location of the point to indicate that the point is not seen within the current axis range. This is not something which is currently conventional (to my knowledge) however it would be a very nice new feature.
I see, you want some “signal” on a zoomed plot to show there is data outside the range … It looks a bit weird seems to me and it surely cannot be the default behavior. If you want to implement a such (new) option you are welcome to submit a PR. But that’s something nobody asked before.
Yes, I agree for this example it is a bit strange…
Perhaps it is more logical with the following example?
You can see that for the bottom plot, the right most points have “dissappeared”.
It does not really make a whole lot of sense to zoom out further because you see less on the figure.
This example shows just a single series of data, but image ratio plots with two series of data, one which fluctuates with much greater magnitude than the other. It may be sensible in such cases to “zoom in” without clipping points from the series which exceeds the axis range.
@couet This cannot be correct, at least not with all drawing options - see the example above. If you check the middle plot, you can see that there are 3 missing points, and no shaded region for the error uncertainty
auto ce2 = new TCanvas("ce2","ce2",600,400);
auto he2 = new TH1F("he2","Distribution drawn with option E2",100,-3,3);
for (i=0;i<10000;i++) he2->Fill(gRandom->Gaus(0,1));