Hello!
I have a problem with setting axis titles for function drawn by DrawIntegral method. Let’s look at test.C macro:
void test(){
TF1* fun = new TF1(“fun”,“sin(x)”, 0, TMath::TwoPi());
fun->GetXaxis()->SetTitle(“X”);
fun->GetYaxis()->SetTitle(“sin(X)”);
fun->DrawIntegral(“al”);
}
if you run this code, you will see that axis titles are not actually set.
At first glimpse I thought, that it may be due to fact, that DrawIntegral creates it’s own TGraph object, which is later drawn, and does not copy axes titles.
Another thing is that it may be caused by one of the draw options - “a”, which should (as far as I know) “suppress” drawing the axes. And there are two things. First - why axes are still drawn, even with the option “a” specified? Secondly - why if I specify only one option, i.e. :
fun->DrawIntegral(“l”);
axes are actually not drawn, plus the scale on both axes are not set properly.
Although there are few simple workarounds for this minor problem, I’d like to know if there is a “proper” way of setting axis titles after calling the TF1::DrawIntegral() method.
Thank you in advance!
Andrzej