Name and Title do not appear neither in canvas or TH2

Hi

I am reading as input a root will all the TH2 plots which I want to save as .ps files

[code]TIter nextkey (((TDirectory *) fin.Get (“Plots”))->GetListOfKeys ());
while (key = (TKey *) nextkey ()) {
// read object from first source file
TObject *obj = key->ReadObj ();
if (obj->IsA ()->InheritsFrom (“TH2”)) {
TH2 *h = (TH2 *) obj;
string hname (h->GetName ());

    h->GetXaxis ()->SetTitle ("mass_squark");
    h->GetYaxis ()->SetTitle ("mass_neutralino");
    gPad->SetGridx(0); gPad->SetGridy(0);

    h->GetXaxis()->SetLabelFont(42);
    h->GetXaxis()->SetLabelOffset(0.007);
    h->GetXaxis()->SetLabelSize(0.05);
    h->GetXaxis()->SetTitleSize(0.06);
    h->GetXaxis()->SetTitleOffset(0.9);
    h->GetXaxis()->SetTitleFont(42);
    h->GetZaxis()->SetLabelFont(42);
    h->GetZaxis()->SetLabelOffset(0.007);
    h->GetZaxis()->SetLabelSize(0.05);
    h->GetZaxis()->SetTitleSize(0.03);
    h->GetZaxis()->SetTitleFont(42);
    h->SetStats(0);
    h->SetName(hname.c_str());
    h->SetTitle(hname.c_str());
    h->Draw ("COLTEXTZ");

    canvas.SetName(hname.c_str());
    canvas.SetTitle(hname.c_str());
    canvas.SetLogz();
    canvas.Modified ();
    canvas.Update ();

[/code]

Problem is that neither title nor name appear in the final ps file…

Thanks

Alex

Can you post a running example reproducing the problem please ?