ChangeLabel in jsroot

Dear expert, I am trying to change the label of a 2d histo’s using

auto xax = mLayers[iLayer]->GetXaxis();
     for(Int_t i =0; i<5;i++)  xax->ChangeLabel(i+1,-1,-1,-1,-1,-1,Form("%i",i));
    auto yax = mLayers[iLayer]->GetYaxis();
    for (int iSec = 0; iSec < 18; ++iSec)  yax->ChangeLabel(iSec+1,-1,-1,-1,-1,-1,Form("%i",iSec));

plot in local root file is good .
as I expected.
but in qcg its wired, have a look at the label it able to draw label for three-tick only.

Any suggestion?

Hi @namalik ,

Thank you for the question!

The generated plot by QCG is the one intented by the task generating the ROOT Object. If you take a closer look at the object stored in CCDB: , you will see that there are 2 parameters stored in the database: drawOptions - COLZ and displayHints - logz

These parameters are generated through QC tasks (more info: QualityControl/ at master · AliceO2Group/QualityControl · GitHub )
QCG takes those parameters and applies them before plotting the ROOT object.

If you would like to ignore these parameters, you will need to:

  1. Create a layout
  2. Add the object to your layout
  3. Edit layout and select object and select option Ignore defaults
  4. Save the layout

I created an example layout with comparisons for you:

Please let me know if you have further questions!

Have a nice weekend,

I think you miss-understood my question . I am talking about label of x-axis and y-axis, as you see in above figures , first figure was drawn in local-root browser the label is good as according to defined in above script, but the second figure , that is from qcg-testweb browser, the label in both x-axis and y-axis not draw all label .