diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-01-19 11:00:25 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-01-19 11:00:25 -0500 |
commit | 9513a494490d98bef891aedf64fce9ad781da636 (patch) | |
tree | f5ee056d435ff6e6f7713c09760a1fd827014709 /leapsecond.py | |
parent | 75ae2d7ab090871abafa72d643cb99ddf3d02d2c (diff) | |
download | gpsd-9513a494490d98bef891aedf64fce9ad781da636.tar.gz |
Document how to get a leapsecond trend plot.
Diffstat (limited to 'leapsecond.py')
-rwxr-xr-x | leapsecond.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/leapsecond.py b/leapsecond.py index 6b3376eb..86b37bff 100755 --- a/leapsecond.py +++ b/leapsecond.py @@ -13,6 +13,9 @@ # # With -c, generate a C initializer listing leap seconds in Unix time. # +# With -g, generate a plot of the leap-second trend over time. The command +# you probably want is "leapsecond.py -g leapcheck.i | gnuplot -persist". +# # With the -n option, compute Unix local time for an IERS leap-second event # given as a three-letter English Gregorian month abbreviation followed by # a 4-digit year. @@ -149,6 +152,7 @@ def graph_history(filename): fmt += 'set format y "%Y-%m-%d"\n' fmt += 'set yrange ["%s":"%s"]\n' % (dates[0], dates[-1]) fmt += 'set key left top box\n' + fmt += 'set data style linespoints\n' fmt += 'plot "-" using 1:2 title "Leap-second trend"\n' for (i, d) in enumerate(dates): fmt += "%d\t%s\n" % (i, d) |