void test_th3d_OS() { auto h = new TH3D("array_histo", "array_histo", 10, 0, 10, 10, 0, 10, 10, 0, 10); h->Fill(1,1,1,5); h->Fill(9,9,9,2); h->GetZaxis()->SetTitle("aaa"); h->Draw("box2z"); gPad->SetMargin(0.1, 0.2, 0.1, 0.1); gPad->Modified(); gPad->Update(); // make new TPaletteAxis with a fake histogram inheriting // features from original except title of zaxis auto p = (TPaletteAxis*)(h->FindObject("palette")); if (p == NULL) return; auto dummy_axis= new TPaletteAxis(); auto dummy_hist = (TH3D*)h->Clone(); dummy_hist->SetName("dummy"); dummy_axis->SetHistogram(dummy_hist); dummy_axis->SetX1(p->GetX1()); dummy_axis->SetX2(p->GetX2()); dummy_axis->SetY1(p->GetY1()); dummy_axis->SetY2(p->GetY2()); dummy_hist->GetZaxis()->SetTitle("vvv"); //remove original h->GetListOfFunctions()->Remove(p); delete p; // draw without option z h->Draw("box2"); dummy_axis->Draw(); gPad->Modified(); gPad->Update(); }