Setting the range for a profile histogram

None of the standard methods seem to work when I try to set the range to be displayed for a profile histogram. I have tried both SetRangeUser() and SetMinimum()/SetMaximum() as you see below (the former is commented out at the moment).

[code]TH2F* ge1613_afp;


ge1613_afp->ProfileX("_pfx",1,49,"");
ge1613_afp_pfx->Draw();

// ge1613_afp_pfx->GetYaxis()->SetRangeUser(1580,1640);

ge1613_afp_pfx->GetYaxis()->SetMinimum(1580.);
ge1613_afp_pfx->GetYaxis()->SetMaximum(1640.);
[/code]

SetRangeUser doesn’t do anything, and SetMinimum()/SetMaximum() causes an interpreter error. Is there another method that I should be using?

Thanks,
Matt

So naturally once I post my problem I end up figuring it out myself. I should remove “GetYaxis()->” and just use:

ge1613_afp_pfx->SetMinimum(1580.); ge1613_afp_pfx->SetMaximum(1640.);