Blame view

disp_TPG.py 473 Bytes
7047b0001   bmarechal   initial commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  import Gnuplot, time
  
  g= Gnuplot.Gnuplot(persist=1)
  g('set grid')
  g('set log y')
  g('set format y "%.1e"')
  g('set timefmt "%s"')
  g('set format x "%y/%m/%d - %H:%M:%S"')
  g('set xdata time')
  g('set xtics rotate by 90 right')
  
  g('plot for [file in system("find ~/server/data/2016/ -name 20161*TPG*.dat | sort")] file u 1:3 w l lt 1 title file')
  
  try:
7422dc704   bmarechal   replace 4 spaces ...
15
16
17
18
19
20
  	while True:
  		time.sleep(60)
  		print('updating plot
  ')
  		g('set autoscale')
  		g('rep')
7047b0001   bmarechal   initial commit
21
  except KeyboardInterrupt:
7422dc704   bmarechal   replace 4 spaces ...
22
  	g.close()