How to save two hist on a single canvas?


I have some problems.
I want to save two hist on a single canvas.
I know how to save one hist on a single canvas.
For example (from input / output chapter in guide):

char name[10], title[20];
 TObjArray Hlist(0); // create an array of Histograms
 TH1F* h; // create a pointer to a histogram
 // make and fill 15 histograms and add them to the object array
 for (Int_t i = 0; i < 15; i++) {
 sprintf(title,"histo nr:%d",i);
 h = new TH1F(name,title,100,-4,4);
 // open a file and write the array to the file
 TFile f("demo.root","recreate");

So, I will have 15 single histograms.

I want to save two (or more) histograms on a single canvas.
I.e. I want to have something like this: … histos.png

If I use Hlist.Add(h_1) and then Hlist.Add(h_2), I have two histograms and two canvas.

If I use h_1->Draw() and then h_2->Draw(), root will draw histograms in real time, but I just want to save them in file.

Could you help me?


Thanks a lot!
I have understood the case with histograms.

But how to save two or more TGraph or TGraphErrors on a single canvas?
Do they have something like THStack?