TH2 palette value - change display format

Hi!

Is it possible to change the format used to write the numbers on the color palette in a TH2 histogram, drawn using “colz” option?

Right now I have this:

I want “E-7”, “E-6”, etc instead of “10*{-7}”, “10*{-6}”.

Is there a way to do that?

Thank you!

No. There is no simple way to do that.

1 Like

Good.

I really appreciate a fim “no”. :smiley:

(not kidding! I can make peace with that fact)

Thank you couet!

Yes there is no “simple” way … using “ChangeLabel” may work but that’s very painful and will work for one given histogram. I would recommend to use that way if, for example, you really need such representation for one specific histogram for some publication in some paper.

1 Like

My issue is actually related to the width of the tpalette, which also affects the size of the “colored area” (where the data are plotted… I don’t know how to call it. Graph maybe…?) of the entire picture. And labels are cropped because of the squared shape of the picture.

I can’t edit the aspect ratio, nor the dimension and the position (it must stay in the center) of the “colored area”.
I’ve hundreds of pictures that I edit after that root makes them, using a bash script that took me an entire day for setting the right numbers. I’m a bit short in time to re-do the entire thing again.

So, it’s ok the way it is.

May be just move the palette in that case.

I tried that.

I opened a thread here about that, indeed: TPaletteAxis size

When I try to use it in a script I wrote, I get some “Segmentation Error”.

I don’t want to debug it.

I think the thread you mentioned was replied.

I know.

And that example works.

There’s something that doesn’t work when I use the same commands in my script.

I assume that the “DrawCopy” command makes some mess. :man_shrugging:

Ok. Post the non-working script if you want some help on it.

Actually it is online: https://github.com/amivaleo/mctalHist/

After compiling the code, launch the script “mesh.sh” and it will draw a picture.

I do not expect you to work on that. It takes way too much time.

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