but it seems to me that given that the method GetLowerRefGraph() requires the TRatioPlot ratio2 to be drawn first. And If ratio2 is drawn then the whole Canvas gets messed up and the ratio2 is not drawn (h2 is however properly plotted on the upper pad). The macro I am using can be found here (*)