|
From: Olan B. <ol...@gm...> - 2009-07-10 16:19:07
|
Hello all,
Just a quick question on something I seem to be stuck with. With gnuplot.py
I want to be able to subtract the current timestamp from column 1. The most
straight-forward way seems to be to set an interim value 'now' and then pass
this into the plot statement. However I cannot figure out how to get the
timestamp variable 'now' from python assigned in gnuplot. A segment of what
I'm trying to do is below:
py:
from time import time
now = time()
print now
g('now =', now) ## problem line. g() can't take the extra now input
g.plot("'test.txt' using ($1-now):2")
text.txt:
1247220778.304284 10
1247220778.406589 12
1247220778.509067 10
1247220778.713930 8
1247220778.816432 11
1247220778.918740 10
1247220779.021023 10
Apologies if this is a simple question [which is seems like it is], but
after spending ages googling I still can't find the solution! Thanks for any
help..
Olan
|