Hello ROOTers,
I’m trying to plot two and more data set in txt format:
{
TFile f("Plot_DataThief.root","RECREATE");
TCanvas c("c", "Grafico Random", 700, 500);
TTree t("t","a simple tree");
TGraphErrors g("Christensen_1977.txt", "%lg %lg %lg %lg");
TGraphErrors h("Patterson_1971.txt", "%lg %lg %lg %lg");
g.GetXaxis()->SetTitle("E_{c.m.} [MeV]");
g.GetYaxis()->SetTitle("S(E) [MeV barn]");
g.SetTitle("Plot DataThief");
g.Draw("ap*");
h.Draw("ap");
t.Write();
f.Close();
}
but if i run the code I obtain:
c.pdf (14,5 KB)
I don’t see the first data set. Here you can find datasets and code: Christensen_1977.txt (514 Byte) DataThief.C (1,3 KB) Patterson_1971.txt (804 Byte)
Someone can help me please?
ROOT Version: v6-20-04
Platform: Xubuntu 20.04
Compiler: gcc version 9.3.0