TGraph2D Palette : Fix a value to a color


ROOT Version 5.34/36
Platform, compiler gcc version 4.9.3 (GCC)


I’m plotting many TGraph2D plots using “colz”. However for each plot the value I’m interested in changes its color in the palette (because the Palette range is changing). How can I fix a value to a color in the palette ?

I guess you should be able to enforce the same “z-range” for all your 2D graphs. For each of them call:

SomeTGraph2D->SetMinimum(MyMinimum);
SomeTGraph2D->SetMaximum(MyMaximum);

Wile_E_Coyote I enforced the same “z-range” for all my 2D graphs and it worked.
Thanks !

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