Dear root experts,
I want the maximum value of y axis to be the value 1.2*max value of the plot and use logarithmic scale at the same time but it does not seem to work,when i comment gPad->SetLogy(); it works.I use root version 6.30/04 .My code for the fitting plot is
TCanvas c_B = new TCanvas(“c_B”, " model 0 fit on Bgk only data");
RooPlot frame_B = output_BDT.frame();
double yma = gPad->GetFrame()->GetY2();
frame_B->GetYaxis()->SetLimits(0.1,1.2yma);
// gPad->SetLogy();
data_B->plotOn(frame_B);
model_0.plotOn(frame_B);
model_0.paramOn(frame_B);
model_0.plotOn(frame_B, LineColor(kRed),Components(“tt_pdf”));
model_0.plotOn(frame_B, LineColor(kGreen),Components(“dy_pdf”));
RooCurve curve_0 = dynamic_cast<RooCurve*>(frame_B->getObject(1));
curve_0->GetYaxis()->SetRangeUser(0.1,1.2*yma);
frame_B->Draw();
So without gPad->SetLogy(); i get a margin left at the top but when using log scale it is not done
without log scale
nolog.pdf (14.6 KB)
and with log scale
logscale.pdf (14.7 KB)
Do you have anything to suggest?
Thank you in advance.
Artemis