# ChangeLabel in jsroot

**URL:** <https://alice-talk.web.cern.ch/t/changelabel-in-jsroot/1307>\
**Category:** O2 Analysis\
**Tags:** qcg, quality-control\
**Created:** [August 19, 2022, 12:59pm UTC](https://alice-talk.web.cern.ch/t/changelabel-in-jsroot/1307 "2022-08-19T12:59:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![namalik](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/n/4bbf92/32.png) [@namalik](https://alice-talk.web.cern.ch/u/namalik)\
**Post date:** [August 19, 2022, 12:59pm UTC](https://alice-talk.web.cern.ch/t/changelabel-in-jsroot/1307/1 "2022-08-19T12:59:13Z")

</div>

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

```auto
auto xax = mLayers[iLayer]->GetXaxis();
    xax->SetNdivisions(-5);
        xax->CenterLabels();
     xax->SetTickLength(0);
     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();
    yax->SetNdivisions(-18);
    yax->CenterLabels();
    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 .  
 ![Canvas_1](https://alice-talk.web.cern.ch/uploads/default/original/1X/63447878ee4ac8be4efc96304b670d2875376806.png)  
as I expected.  
but in qcg its wired, have a look

 ![canvas](https://alice-talk.web.cern.ch/uploads/default/original/1X/009de23961ac324ea0c6eea28a94211f652e8ebb.png)

[https://qcg-test.cern.ch/?page=objectView&objectName=qc/TRD/MO/TrackletsTask/TrackletsPerLayer/layer0](https://qcg-test.cern.ch/?page=objectView&objectName=qc/TRD/MO/TrackletsTask/TrackletsPerLayer/layer0)look at the label it able to draw label for three-tick only.

Any suggestion?

---

<div class="post-metadata">

**Author:** ![graduta](https://alice-talk.web.cern.ch/user_avatar/alice-talk.web.cern.ch/graduta/32/183_2.png) [@graduta](https://alice-talk.web.cern.ch/u/graduta)\
**Post date:** [August 19, 2022, 3:03pm UTC](https://alice-talk.web.cern.ch/t/changelabel-in-jsroot/1307/2 "2022-08-19T15:03:06Z")

</div>

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: [http://ccdb-test.cern.ch:8080/latest/qc/TRD/MO/TrackletsTask/TrackletsPerLayer/layer0](http://ccdb-test.cern.ch:8080/latest/qc/TRD/MO/TrackletsTask/TrackletsPerLayer/layer0) , 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/Advanced.md at master · AliceO2Group/QualityControl · GitHub](https://github.com/AliceO2Group/QualityControl/blob/master/doc/Advanced.md#canvas-options) )  
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: [https://qcg-test.cern.ch/?page=layoutShow&layoutId=62ffa5d432332505759f139e](https://qcg-test.cern.ch/?page=layoutShow&layoutId=62ffa5d432332505759f139e)

Please let me know if you have further questions!

Have a nice weekend,  
George

---

<div class="post-metadata">

**Author:** ![namalik](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/n/4bbf92/32.png) [@namalik](https://alice-talk.web.cern.ch/u/namalik)\
**Post date:** [August 24, 2022, 11:55am UTC](https://alice-talk.web.cern.ch/t/changelabel-in-jsroot/1307/3 "2022-08-24T11:55:43Z")

</div>

@graduta  
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 .
