# SetMoreLogLabels for TEfficiency?

**URL:** <https://root-forum.cern.ch/t/setmoreloglabels-for-tefficiency/34122>\
**Category:** Newbie\
**Created:** [May 17, 2019, 5:15pm UTC](https://root-forum.cern.ch/t/setmoreloglabels-for-tefficiency/34122 "2019-05-17T17:15:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![armin.kadlecsik](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/e9c0ed/32.png) [@armin.kadlecsik](https://root-forum.cern.ch/u/armin.kadlecsik)\
**Post date:** [May 17, 2019, 5:15pm UTC](https://root-forum.cern.ch/t/setmoreloglabels-for-tefficiency/34122/1 "2019-05-17T17:15:13Z")

</div>

Hello,

I am trying to create a TEfficiency histogram with values very close together, so I’ve switched the canvas to logarithmic scale on the y axis. (TCanvas c-\>setLogy()).  
This results in the figure I’ve attached.  
[backgnd\_Eta\_effs.pdf](https://root-forum.cern.ch/uploads/default/original/3X/7/c/7c0016e393efaaf82db821837b1d31ff1227af32.pdf) (24.1 KB)  
As you can see, the y axis labels are not nearly dense enough…  
How do you fix this? I know there is SetMoreLogLabels, but that is only available for a TAxis, and I know of no function that would return a TAxis from a TEfficiency.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 17, 2019, 5:28pm UTC](https://root-forum.cern.ch/t/setmoreloglabels-for-tefficiency/34122/2 "2019-05-17T17:28:01Z")

</div>

Try:

```auto
gPad->Modified(); gPad->Update(); // make sure it's really (re)drawn
your_effs->GetPaintedGraph()->GetYaxis()->SetMoreLogLabels(kTRUE);
gPad->Modified(); gPad->Update(); // make sure it's really (re)drawn

```

---

<div class="post-metadata">

**Author:** ![armin.kadlecsik](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/e9c0ed/32.png) [@armin.kadlecsik](https://root-forum.cern.ch/u/armin.kadlecsik)\
**Post date:** [May 17, 2019, 5:45pm UTC](https://root-forum.cern.ch/t/setmoreloglabels-for-tefficiency/34122/3 "2019-05-17T17:45:33Z")

</div>

[backgnd\_Eta\_effs.pdf](https://root-forum.cern.ch/uploads/default/original/3X/3/6/369df44f926fefa85db48d5b3900d3c99f892b44.pdf) (24.3 KB)

Hmm, that seems to have only added the tick to the bottom of the axis (9x10^-1). Is there any way to make the ticks even more dense?

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 17, 2019, 5:52pm UTC](https://root-forum.cern.ch/t/setmoreloglabels-for-tefficiency/34122/4 "2019-05-17T17:52:41Z")

</div>

Try:

```auto
your_effs->GetPaintedGraph()->SetMinimum(0.1);

```

---

<div class="post-metadata">

**Author:** ![armin.kadlecsik](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/e9c0ed/32.png) [@armin.kadlecsik](https://root-forum.cern.ch/u/armin.kadlecsik)\
**Post date:** [May 17, 2019, 6:01pm UTC](https://root-forum.cern.ch/t/setmoreloglabels-for-tefficiency/34122/5 "2019-05-17T18:01:35Z")

</div>

[backgnd\_Eta\_effs.pdf](https://root-forum.cern.ch/uploads/default/original/3X/c/c/ccf42284af72f0dfd13b452fe4a96204d8494577.pdf) (24.3 KB)

The problem with that is then all the data is becomes unreadable, they are literally drawn on top of each other. They are all 0.9, that is why I have set the minimum there previously. 😕

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [May 20, 2019, 8:20am UTC](https://root-forum.cern.ch/t/setmoreloglabels-for-tefficiency/34122/6 "2019-05-20T08:20:40Z")

</div>

Do you really need log scale ? it seems your data are between 0.9 and 1. How does it show in linear scale ?
