TGraph and TH1F on same canvas, setting axis

Hi All,

I am currently trying to get a TGraph and TH1F to appear on the same canvas. As of now I am using:

auto c1 = new TCanvas("c1","c1",200,10,600,400);

...

h1->Draw("HIST");
TGraph* gr = new TGraph(c,x,y);
gr->Draw("*");

c1->Update();

to draw them both, but my graph is outside of the plot (not by much) and I would like to have them both fully visible. How can I go about doing this?

Thanks so much!

-Frank

auto c1 = new TCanvas("c1","c1",200,10,600,400);
...
gPad->DrawFrame(xmin,ymin,xmax,ymax); // define the right limits there

h1->Draw("HIST SAME");
TGraph* gr = new TGraph(c,x,y);
gr->Draw("*");

@couet ,

Thank you so much!

-Frank