SetLogy not applied

Hi everyone,

I have an issue with SetLogy , I apply it to the canvas, but I see no impact, and no error as well.
Could you please help?
Thanks!

Cheers,
Des

This is my code

string pathName="hWZ_EEE_pTZ";

    TFile *f_nom = TFile::Open("FigureOfMerit/isoStudies/Signal/normal.root");
      TH1 *mwt_nom= (TH1*)f_nom->Get(pathName.c_str());

    TFile *f_fix = TFile::Open("FigureOfMerit/isoStudies/Signal/Fixed.root");
    TH1 *mwt_fix = (TH1*)f_fix->Get(pathName.c_str());

    TFile *f_mix = TFile::Open("FigureOfMerit/isoStudies/Signal/Mixed.root");
    TH1 *mwt_mix = (TH1*)f_mix->Get(pathName.c_str());

    TFile *f_grad = TFile::Open("FigureOfMerit/isoStudies/Signal/Gradient.root");
    TH1 *mwt_grad = (TH1*)f_grad->Get(pathName.c_str());

    
    TCanvas *c1=new TCanvas();
    c1->Divide(2,2); //canvas divided into 2parts
    c1->cd(1); //select a canvas
    c1->SetLogy();
    

    mwt_nom->SetMinimum(0);
    mwt_nom->SetLineColor(kMagenta);
    mwt_nom->Draw();
    mwt_fix->SetLineColor(kBlue);
    mwt_fix->Draw("SAME");
    mwt_mix->SetLineColor(2);
    mwt_mix->Draw("SAME");
    mwt_grad->SetLineColor(kGreen-1);
    mwt_grad->Draw("SAME");

gPad->SetLogy(); // needed for each c1->cd(subpadnumber)

Thanks Pepe! However I get the following error and the pad does not appear.

Error in < THistPainter::PaintInit >: Cannot set Y axis to log scale

Cheers,
Des

How much is log(0) ?

(const double)(-inf)
is this what you mean?

So, if you explicitly SetMinimum(0), why do you complain afterwards?

Oh great! Problem solved, thanks!