Please read tips for efficient and successful posting and posting code
ROOT Version: 6.26.10
Platform: Windows
Hi everyone!
I was trying to plot two histograms on the same canvas in python:
canvas = ROOT.TCanvas(“canvas”)
canvas.cd()
hist1 = ROOT.TH1F(“hist1”, “Ei_histogram;Ei”, 30,0,4)
gst.Draw(“Ei>>hist1”, “colz”)
hist2 = ROOT.TH1F(“hist2”, “Ef_histogram;Ef”, 30,0,4)
gst.Draw(“Ef>>hist2”, “SAME”)
canvas.Print(“trial.pdf”)
But for some reason it complains about the “SAME”:
Error in TTreeFormula::Compile: Bad numerical expression : “SAME”
Info in TSelectorDraw::AbortProcess: Variable compilation failed: {Ef,SAME}
Can someone please explain to me what was my mistake here?
Thank you in advance!!!
Kirill