Drawing histograms to the same canvas without overlaps

https://root.cern.ch/root/roottalk/roottalk03/2763.html