Center Title of TMultiGraph

I want to center the titles of both x- and y-axes in TMultiGraph, but I can’t do it. Can anyone help me please?
Thanks.

   multigraph->GetYaxis()->SetTitle("Y-axis");
   multigraph->GetYaxis()->CenterTitle(true);
   multigraph->GetXaxis()->SetTitle("X-axis");
   multigraph->GetXaxis()->CenterTitle(true);

Thank you very much for your help.