Overlaying continous plots

Hi Everyone!

I’m trying to overlay two plots and I need to resize the axes. I have 2 TGraphs, one with the x-axis from 0 to 20 GeV, and the second 20 to 50 GeV. When overlayed, they should make a continous curve.

I’ve plotted the first graph using g1->Draw(“ALP”)
Then i’ve overlayed the 2nd one using g2->Draw(“PSAME”)

But the x-axis only goes up to 20 GeV. If I do g2->Draw(“APSAME”) then the x-axis is in the interval 20-50 GeV.

How do I do resize the axes to 0-50 GeV?
I also need to resize the y-axis.

Thanks
Anjum

see class TMultiGraph and example in $ROOTSYS/tutorials/graphs/multigraph.C

Rene

Wow that’s perfect! Thanks Rene!