Use the example posted here (movepal.C):
https://root-forum.cern.ch/t/drawing-tpaletteaxis-in-a-different-pad/28161/3