I am drawing a TH2D with “colz” option. I would like to draw the z-axis in a different pad from the one used for the histogram. I have tried to retrieve the TPaletteAxis from the histogram:
graph2->Draw();
TPaletteAxis* Zaxis2 = (TPaletteAxis*) graph2->GetListOfFunctions()->FindObject(“palette”);
and then
pad2->cd();
Zaxis2->Draw(“colz”);
But this is not drawing anything.
Does anyone have a suggestion for fixing this?
Thanks.