disp_TPG.py 473 Bytes
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:
	while True:
		time.sleep(60)
		print('updating plot\n')
		g('set autoscale')
		g('rep')
except KeyboardInterrupt:
	g.close()