# Problem positioning two pads

**URL:** <https://root-forum.cern.ch/t/problem-positioning-two-pads/41306>\
**Category:** Newbie\
**Created:** [September 5, 2020, 4:50am UTC](https://root-forum.cern.ch/t/problem-positioning-two-pads/41306 "2020-09-05T04:50:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Edward\_Finkelstein](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/edward_finkelstein/32/20070_2.png) [@Edward\_Finkelstein](https://root-forum.cern.ch/u/Edward_Finkelstein)\
**Post date:** [September 5, 2020, 4:50am UTC](https://root-forum.cern.ch/t/problem-positioning-two-pads/41306/1 "2020-09-05T04:50:19Z")

</div>

Hello,  
I am having trouble trying to draw two pads to a canvas. I want a runner plot on the bottom, but my code seems to be putting the second pad on top of the first one.  
[alpha\_0\_beta\_and\_C01.cxx](https://root-forum.cern.ch/uploads/short-url/XeKaF8r2rhBQ3tLaa6bQzHhygq.cxx) (3.7 KB)  
[alpha\_0\_beta\_and\_C01.txt](https://root-forum.cern.ch/uploads/short-url/eTSYpM3vTFBgxwMGnizsP3B2f4v.txt) (783 Bytes)

Any help would greatly be appreciated.  
\_ROOT Version: 6.23/01

---

<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:** [September 7, 2020, 7:31am UTC](https://root-forum.cern.ch/t/problem-positioning-two-pads/41306/2 "2020-09-07T07:31:10Z")

</div>

A pad is always created in the current active pad. This is the way to make nested pads. If your canvas is `C` you will need to do `C->cd(0)` to make the canvas "the current pad’.

---

<div class="post-metadata">

**Author:** ![Edward\_Finkelstein](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/edward_finkelstein/32/20070_2.png) [@Edward\_Finkelstein](https://root-forum.cern.ch/u/Edward_Finkelstein)\
**Post date:** [September 7, 2020, 7:08pm UTC](https://root-forum.cern.ch/t/problem-positioning-two-pads/41306/3 "2020-09-07T19:08:16Z")

</div>

Yes, so I included the line  
`c1->cd(1);`  
and it worked. Thank you couet.  
[alpha\_0\_beta\_and\_C01.cxx](https://root-forum.cern.ch/uploads/short-url/2H1xOQY7xG2yn3ekKOOybWuc2nW.cxx) (3.6 KB)
