# Formatting (axis labels and more) on a multi-pad canvas

**URL:** <https://root-forum.cern.ch/t/formatting-axis-labels-and-more-on-a-multi-pad-canvas/7428>\
**Category:** ROOT\
**Created:** [November 12, 2008, 1:53pm UTC](https://root-forum.cern.ch/t/formatting-axis-labels-and-more-on-a-multi-pad-canvas/7428 "2008-11-12T13:53:26Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![mks](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/50afbb/32.png) [@mks](https://root-forum.cern.ch/u/mks)\
**Post date:** [November 12, 2008, 1:53pm UTC](https://root-forum.cern.ch/t/formatting-axis-labels-and-more-on-a-multi-pad-canvas/7428/1 "2008-11-12T13:53:26Z")

</div>

Hello everyone,

I have got a macro which draws a number of two-dimensional histograms in a grid. In general it works more-or-less fine, there are however a few issues it would be great if you could comment upon:

1. After the histograms in question have been drawn, white gaps appear between some of them which I haven’t been able to get rid of. Any idea where these come from?

2. For some reason, the same value of size of axis labels and titles possesses different meaning for the first and the last column/row of histograms and for all the others. Is this a bug? If not, how can I force the same size on all of them?

3. In order to make labels on the horizontal axes not overlap I tried to make them vertical by calling hist-\>GetXaxis()-\>LabelsOption(“v”), however this results in the message “Warning in TAxis::Sort: Cannot sort. No labels” and no orientation change. Am I doing something wrong here?

4. More on messing around with axis labels. Instead of using vertical orientation I would rather reduce the number of labels printed on the screen. Is there a method for controlling this?

5. Axis labels again. How could I delete the final (top-/rightmost) labels from axes so that they don’t overlap with first (bottom-/leftmost) labels from their neighbour?

6. Last but not least, I would like to get a single colour palette for all the histograms on the canvas, stretched along the whole right side of the pads. Is there any sensible way of doing this? I tried simply using “colz” instead of “col” on one of the histograms but unfortunately this doesn’t seem to allow the palette to be stretched beyond the boundaries of that histogram’s pad.

I use ROOT 5.18.00 and 5.20.00, on x86 and amd64. Attached you will find the macro files, the required input file and a screenshot of the output I get.

All comments and suggestions will be appreciated!

 ![](https://root-forum.cern.ch/uploads/default/original/2X/3/3e161586842325d9f8970b138d39555bdc3003fa.png)  
  
[pTscan\_collection-cEtaPhi.root](https://root-forum.cern.ch/uploads/default/original/2X/9/9de5b47fcc8b45560baf603eef947fed8f8a31e5.root) (96.1 KB)  
[plotScan.C](https://root-forum.cern.ch/uploads/default/original/2X/6/662c705c88f1e2d9fe907b6dc9ad705a96071cd1.C) (2 KB)  
[makePadsHists.C](https://root-forum.cern.ch/uploads/default/original/2X/3/33a472e1821141317e6672a2285a6bca70fa7025.C) (4.11 KB)

---

_[View the full topic](https://root-forum.cern.ch/t/formatting-axis-labels-and-more-on-a-multi-pad-canvas/7428)._
