Hi,
I note the bad automatic limits selection happend sometimes in tree->Draw() in 2-D case
Example:
tree->Draw(“s1.eTX:s2.eTX”) limits in X: -0.3 : 0.1 (some points are cutted out)
instead
tree->Draw(“s2.eTX”) limits in X: -0.36 : 0.15 (this is correct - all points are inside)
The number of entries in histograms: 4000
Of cause I can set limits by myself, but it seems to be a bug behaviour.
Could you send the shortest possible running script reproducing the problem?
I would like to have the exact sequence of variables generating a bad axis calculation.
This is an example script:
//-----------------------------------------------------------------
void t()
{
TCanvas *cs = new TCanvas(“csig”,“couples_sigma”);
cs->Divide(1,2);
cs->cd(1);
couples->Project(“htl1(10,0.,1.,40,0.,0.1)”, “s1.eTX:s2.eTX”,"",“prof”);
htl1->Draw();
cs->cd(2);
couples->Draw(“s1.eTX:s2.eTX” );
}
When you pipe the result of Draw to an histogram with:
couples->Project("htl1(10,0.,1.,40,0.,0.1)", "s1.eTX:s2.eTX","","prof");
the new number of bins specification is kept as the default.
In your case, you will get different binning results if you project into
an histogram with 10 bins or 40 bins. If instead of 10 bins, you specify 40 bins
you will get the same result for the 1-D and 2-D case.
Actually the question is not the number of bins, but why the histogram range is setted incorrectly. For the scatter plot like (“x : y”) I’d like not care about bins at all, but I need to see all points on the plot and this is not a case here.
The current algorithm is nort optimized for the case of a histogram with a very small number of bins (eg 10 as in your case).
Just use the default values and your limits will be correctly computed.