# Using lower command on subcripted symbols

**URL:** <https://root-forum.cern.ch/t/using-lower-command-on-subcripted-symbols/56171>\
**Category:** Newbie\
**Created:** [August 28, 2023, 5:34am UTC](https://root-forum.cern.ch/t/using-lower-command-on-subcripted-symbols/56171 "2023-08-28T05:34:10Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shailesh](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/50afbb/32.png) [@Shailesh](https://root-forum.cern.ch/u/Shailesh)\
**Post date:** [August 28, 2023, 5:34am UTC](https://root-forum.cern.ch/t/using-lower-command-on-subcripted-symbols/56171/1 "2023-08-28T05:34:10Z")

</div>

I am trying to enter `perpendicular symbol` as a subscript in a TH1F object. Firstly, it looks weirdly aligned. Secondly, it’s vertical alignment isn’t changing despite using it in `#lower[]{}`. Can someone explain what’s going on? I tried using a different symbol, `sigma`, and there the alignment did change with `#lower`. Example code below:

```auto
void customizeHistogram() {
     // Create a TH1F histogram
     TH1F *hist = new TH1F("hist", "Example Histogram", 10, 0, 10);
 
     // Using #lower command on the subscript part only
    hist->GetXaxis()->SetTitle("X_{#lower[-0.3]{#perp} #perp}");
    hist->GetYaxis()->SetTitle("Y_{#lower[0.3]{#sigma} #sigma}");
 
     // Create a canvas and draw the histogram
     auto c = new TCanvas();
     hist->Draw();
}

```

 ![c](https://root-forum.cern.ch/uploads/default/original/3X/0/6/06d4fd55dbb3a3a53801a52ef6869c427e0ce752.png)

_ROOT Version:_ 6.26.04

---

<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:** [August 28, 2023, 9:01am UTC](https://root-forum.cern.ch/t/using-lower-command-on-subcripted-symbols/56171/2 "2023-08-28T09:01:52Z")

</div>

> [@Shailesh](#):
>
> I am trying to enter `perpendicular symbol` as a subscript

The way to do it is simply:

```auto
   hist->GetXaxis()->SetTitle("X_{#perp}");

```

---

<div class="post-metadata">

**Author:** ![Shailesh](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/50afbb/32.png) [@Shailesh](https://root-forum.cern.ch/u/Shailesh)\
**Post date:** [August 28, 2023, 9:20am UTC](https://root-forum.cern.ch/t/using-lower-command-on-subcripted-symbols/56171/3 "2023-08-28T09:20:15Z")

</div>

I am sorry for the confusion. What I want to do is write `{#perp}T` in the subscript. But these two are not aligned properly. That’s why I tried to changed the vertical alignment of `#perp` using `#lower`. As seen in the figure, alignment of `#sigma` changes but `#perp`.

Also, I don’t want to re-align `T` in `#perp T` as `#perp` is already aligned very low.

---

<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:** [August 28, 2023, 9:34am UTC](https://root-forum.cern.ch/t/using-lower-command-on-subcripted-symbols/56171/5 "2023-08-28T09:34:32Z")

</div>

```auto
   hist->GetXaxis()->SetTitle("X_{#perpT}");

```

Gives:  
 ![Screenshot 2023-08-28 at 11.34.31](https://root-forum.cern.ch/uploads/default/original/3X/f/2/f2f07ab09b051fc38448f39073db7e390a483836.png)

What do you want to obtain exactly ? can you show an example ?

---

<div class="post-metadata">

**Author:** ![Shailesh](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/50afbb/32.png) [@Shailesh](https://root-forum.cern.ch/u/Shailesh)\
**Post date:** [August 28, 2023, 9:37am UTC](https://root-forum.cern.ch/t/using-lower-command-on-subcripted-symbols/56171/6 "2023-08-28T09:37:00Z")

</div>

![CodeCogsEqn](https://root-forum.cern.ch/uploads/default/original/3X/9/2/92fce514a9d3d9cfd8194fb5855e05316b9741c4.gif)  
Something like the one showed in this figure. The T and `#perp` are at the same level here. But that is not coming out in ROOT’s `hist->GetXaxis()->SetTitle("X_{#perpT}");`

---

<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:** [August 28, 2023, 10:31am UTC](https://root-forum.cern.ch/t/using-lower-command-on-subcripted-symbols/56171/7 "2023-08-28T10:31:52Z")

</div>

```auto
   hist->GetXaxis()->SetTitle("X_{T \\perp}");

```

![Screenshot 2023-08-28 at 12.32.11](https://root-forum.cern.ch/uploads/default/original/3X/a/e/ae3312df3068cdd1afc8fec1c3d8cb0270dfadce.png)

---

<div class="post-metadata">

**Author:** ![Shailesh](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/50afbb/32.png) [@Shailesh](https://root-forum.cern.ch/u/Shailesh)\
**Post date:** [August 28, 2023, 11:18am UTC](https://root-forum.cern.ch/t/using-lower-command-on-subcripted-symbols/56171/8 "2023-08-28T11:18:12Z")

</div>

Oh yes this works. Can I ask what exactly is happening here? When I use a different symbol like `#sigma`, the alignment is proper and also the lower command works on it. But when I use `#perp`, it is not the case.

---

<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:** [August 28, 2023, 11:48am UTC](https://root-forum.cern.ch/t/using-lower-command-on-subcripted-symbols/56171/9 "2023-08-28T11:48:03Z")

</div>

The way I proposed use TMathText which is more LaTex like
