Draw with cuts on errors


Say that I want to enforce a cut with respect to errors on a draw, how can I do that?

For example, look at this graph

you can see a point with a large error, which pretty much disguise the true graph’s shape due to rescaling of the y axis, and I would like to remove that point, and points with similar y-error.
On the same note, can I do that with relative error as well?



I don’t think the functionality you’re looking for exists. You could try to use your original histogram to obtain a rebinned one with larger bin sizes towards the high end of the x axis - that way your bin-by-bin fluctuations will ikely go down, and you might get a decent plot. It will need a bit of work with GetBinContent and GetBinError in a for-loop, though… :wink:



If you just want to get rid of such points on the plot … you can easily use TH1::SetMinimum and / or TH1::SetMaximum (or TGraph::SetMinimum and / or TGraph::SetMaximum).

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.