Hi All,
I have two histograms with different entries such as hs and his. Find the sreenshots below.
When I am trying to plot these histograms in a single canvas. Plot is fine and entry of hs table also is fine but entry of his table does not show, as attached below.
Lines of blue color for hs and red color for his.
Could anyone please help me with why not entries, mean, std dev of his show in canvas like as hs?
Here is the macro-
void mergeroot()
{
TCanvas *c1 = new TCanvas("c1", "c1");
// TCanvas *c2 = new TCanvas("c2", "c2");
TFile *f1 = new TFile("muon_energy.root", "READ");
TH1F *h1 = (TH1F*)f1->Get("hs");
h1->SetLineWidth(2);
h1->SetLineColor(kBlue);
c1->cd();
h1->Draw("hist");
TFile *f2 = new TFile("muon_energy_off.root", "READ");
TH1F *h2 = (TH1F*)f2->Get("his");
h2->SetLineWidth(2);
h2->SetLineColor(kRed);
c1->cd();
h2->Draw("hist same");
}
Thank You!
Anil