TH3 and the label size on colour palette

Hi,

I have a TH3 histogram which I draw as:

hist_power_1->Draw(“glcolz”);

and then I try to resize the labels on the colour palette using the standard procedure:

gPad->Update();
TPaletteAxis pal_1 = (TPaletteAxis)hist_power_1->GetListOfFunctions()->FindObject(“palette”);
pal_1->GetAxis()->SetLabelSize(0.03);

But it does not work. I get:

root [0]
Processing glvox_W.C…

*** Break *** segmentation violation
Generating stack trace…
0x0000000111e1a499 in
0x000000011031b27a in cling::IncrementalExecutor::executeFunction(llvm::StringRef, cling::Value*) (in libCling.so) + 1130
0x00000001103233ad in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) (in libCling.so) + 157
0x000000011032291e in cling::Interpreter::EvaluateInternal(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, cling::CompilationOptions const&, cling::Value*, cling::Transaction**
0x0000000110322ef6 in cling::Interpreter::echo(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, cling::Value*) (in libCling.so) + 38
0x0000000110358025 in cling::MetaSema::actOnxCommand(llvm::StringRef, llvm::StringRef, cling::Value*) (in libCling.so) + 549
0x0000000110351b15 in cling::MetaParser::isXCommand(cling::MetaSema::ActionResult&, cling::Value*) (in libCling.so) + 1077
0x00000001103511b1 in cling::MetaParser::isCommand(cling::MetaSema::ActionResult&, cling::Value*) (in libCling.so) + 97
0x0000000110350fba in cling::MetaParser::isMetaCommand(cling::MetaSema::ActionResult&, cling::Value*) (in libCling.so) + 42
0x0000000110355ea7 in cling::MetaProcessor::process(char const*, cling::Interpreter::CompilationResult&, cling::Value*) (in libCling.so) + 231
0x000000011026f30e in TCling::ProcessLine(char const*, TInterpreter::EErrorCode*) (in libCling.so) + 2382
0x0000000110271f49 in TCling::ProcessLineSynch(char const*, TInterpreter::EErrorCode*) (in libCling.so) + 121
0x000000010fe75980 in TApplication::ExecuteFile(char const*, int*, bool) (in libCore.so) + 2352
0x000000010fe7493c in TApplication::ProcessLine(char const*, bool, int*) (in libCore.so) + 1500
0x00000001101c5720 in TRint::ProcessLineNr(char const*, char const*, int*) (in libRint.so) + 112
0x00000001101c54c0 in TRint::Run(bool) (in libRint.so) + 976
0x000000010fe10e8f in main (in root.exe) + 79
0x00007fff8ba365fd in start (in libdyld.dylib) + 1
0x0000000000000003 in
Root >

I am using ROOT6 on a MacOSX 10.9.

Is it possible to change the colour palette labels for a TH3 histogram?

Thank you,

Cristian

With the GL option the palette is not the same as the one without. It is part of the plot
You cannot really act on it.

Hello,

I see. Thank you for your reply. Then I am still wondering, knowing that it is not possible to change the label sizes in the palette with the GL option, if it could be possible to make them be a bigger size BEFORE drawing the histogram with the “glcolz” option? Something like gStyle->SetLabelsSize() or something similar.

The reason I ask is that I want to put the plot in a paper, and the labels on the colour palette are not easily readable, so I want to make them bigger… I am sure someone else must have had this problem before I did.

Many thanks,

Cristian

I just look at the code. A TGAxis axis is created in DrawPaletteAxis in TGLPlotPainter.cxx.
But not external settings are applied to this axis.