#!/usr/bin/python import time from ROOT import * f = TFile("muon_mu_meson_mesotron_vs_year.root") f.cd() myStyle.cd() c = TCanvas() c.cd() muon_vs_year.Draw("APL") mu_meson_vs_year.Draw("PL") mesotron_vs_year.Draw("PL") myLegend = TLegend(0.8,0.8,0.9,0.9) myLegend.SetBorderSize(1) myLegend.AddEntry( muon_vs_year, "muon", "l") myLegend.AddEntry( mu_meson_vs_year, "mu meson", "l") myLegend.AddEntry( mesotron_vs_year, "mesotron", "l") myLegend.Draw() try: time.sleep(1E9) except KeyboardInterrupt: pass