# How to draw more than two histograms with adjacent axises

**URL:** <https://root-forum.cern.ch/t/how-to-draw-more-than-two-histograms-with-adjacent-axises/1207>\
**Category:** ROOT\
**Created:** [October 27, 2004, 5:58am UTC](https://root-forum.cern.ch/t/how-to-draw-more-than-two-histograms-with-adjacent-axises/1207 "2004-10-27T05:58:16Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![kame](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/k/34f0e0/32.png) [@kame](https://root-forum.cern.ch/u/kame)\
**Post date:** [October 27, 2004, 5:58am UTC](https://root-forum.cern.ch/t/how-to-draw-more-than-two-histograms-with-adjacent-axises/1207/1 "2004-10-27T05:58:16Z")

</div>

I am wondering if there is any easy way to display multiple histograms with a common x-axis keeping each height of the histogram frames equal to one another.  
What I want to do is to place three or more histograms as done in zone.C, a tutorial macro.  
zone.C works fine if the number of division is two along vertical or horizontal direction.  
But in the case where one divides a Canvas into three or more sub pads via TCanvas::Divide(),  
the histograms drawn in the top or bottom pads become smaller than others due to the margins the top and bottom pads have.  
To avoid this, we need to create sub pads specifying their sizes calculated from the margins to be left.  
But it is quite a hassle…  
In PAW, combination of zone command and “set ywin 0” can set margin between histograms to zero without changing the size of histogram frames.  
I hope ROOT also provides an easy way to do this.

–  
kame

---

_[View the full topic](https://root-forum.cern.ch/t/how-to-draw-more-than-two-histograms-with-adjacent-axises/1207)._
