Drawing TPaletteAxis in a different pad

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:

TPaletteAxis* Zaxis2 = (TPaletteAxis*) graph2->GetListOfFunctions()->FindObject(“palette”);

and then


But this is not drawing anything.

Does anyone have a suggestion for fixing this?


you can move the palette as shown in the following example.
movepal.C (2.4 KB)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.