Palette with time on axis

Hi, I have a TAxisPalette object whose color scale is supposed to be associated to time. I’d like the labels to be in time format (mm-yy) rather than seconds. I’ve played around with the TGAxis member but didn’t find a way to make it work.
Is it feasible? If so, how? Thanks

Edit: I elaborate a bit. I have a TH2 histogram whose Z axis spans a range in time (in seconds). I paint the histogram with COLZ option, then I get its palette with:

TPaletteAxis *palette = (TPaletteAxis*)ratioAuxHisto->GetListOfFunctions()->FindObject("palette")

What do I have to do to palette to obtain the desired result?

Once you have the palette you can retrieve the TGaxis using GetAxis. See:

Then you can make this axis a time axis as explained in: … time-units

Thanks couet, but the method for drawing a time axis explained in your second link works if you create a new TGaxis and pass to it the option “t” in the constructor. When using a palette, the TGaxis is created by TPaletteAxis without the “t” option, so it is not a time axis. I tried to retrieve it, set the “t” option and draw it again, but it does not work:

The color axis is unchanged in the plot, it seems that neither Paint nor Draw work.

True …
may be you can try to play with GetOption and SetOption :

1st do a GetOption to see what is teh current option used to draw the axis.
2nd do a SetOption with the option you found with GetOption plus in addition the T option.

Just a warning. TGaxis options are CASE SENSITIVE (i.e. “t” != “T”).

Thanks Pepe, but the correct one is lowercase. The documentation says “t”, and also reading the code it seems that lowercase is the correct one. Furthermore, the example by couet works with “t”.