18dirName = str(ROOT.gROOT.GetTutorialDir())
20dirName= dirName.replace(
"/./",
"/")
21inputFileName =
"%s/SWAN2017.dat" %dirName
25g.SetTitle(
"SWAN Users during July 2017;Time;Number of Sessions")
30lines = open(inputFileName,
"r").readlines()
32for i, line
in enumerate(lines):
33 d, h, value = line.split()
34 g.SetPoint(i, ROOT.TDatime(
"%s %s" %(d,h)).Convert(), float(value))
37c = ROOT.TCanvas(
"c",
"c", 950, 500)
42g.SetLineColor(ROOT.kBlue)
44g.GetYaxis().CenterTitle()
48xaxis.SetTimeDisplay(1)
50xaxis.SetTimeFormat(
"%a %d")
52xaxis.SetNdivisions(-219)
53xaxis.SetLimits(ROOT.TDatime(2017, 7, 3, 0, 0, 0).Convert(), ROOT.TDatime(2017, 7, 22, 0, 0, 0).Convert())
54xaxis.SetLabelSize(0.025)