[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-dev] [PATCH 1/4] Change axis, time monotonic on X , leapsecond cou
From: |
Sanjeev Gupta |
Subject: |
[gpsd-dev] [PATCH 1/4] Change axis, time monotonic on X , leapsecond count on Y |
Date: |
Fri, 1 May 2015 23:40:28 +0800 |
---
leapsecond.py | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/leapsecond.py b/leapsecond.py
index f287510..60e478e 100755
--- a/leapsecond.py
+++ b/leapsecond.py
@@ -24,7 +24,7 @@ Options:
-v be verbose
- -g generate a plot of the leap-second trend over time. The command you
+ -g generate a plot of leap-second dates over time. The command you
probably want is something like (depending on if your gnuplot install
does or does not support X11.
@@ -302,15 +302,16 @@ def graph_history(filename):
fmt += 'lsq(x) = %s * x + %s\n' % (b, c)
fmt += '# Maximum residual error is %.2f weeks\n' % e
fmt += 'set autoscale\n'
- fmt += 'set xlabel "Leap second offset"\n'
- fmt += 'set xrange [0:%d]\n' % (len(dates) - 1)
- fmt += 'set ylabel "Leap second date"\n'
+ fmt += 'set ylabel "Leap second offset"\n'
+ fmt += 'set yrange [0:%d]\n' % (len(dates) - 1)
+ fmt += 'set xlabel "Leap second date"\n'
+ fmt += 'set xtics rotate by 300\n'
fmt += 'set timefmt "%Y-%m-%d"\n'
- fmt += 'set ydata time\n'
- fmt += 'set format y "%Y-%m-%d"\n'
- fmt += 'set yrange ["%s":"%s"]\n' % (dates[0], dates[-1])
+ fmt += 'set xdata time\n'
+ fmt += 'set format x "%Y-%m-%d"\n'
+ fmt += 'set xrange ["%s":"%s"]\n' % (dates[0], dates[-1])
fmt += 'set key left top box\n'
- fmt += 'plot "-" using 1:3 title "Leap-second trend" with linespoints ;\n'
+ fmt += 'plot "-" using 3:1 title "Leap-second trend" with linespoints ;\n'
for (i, (r, d)) in enumerate(zip(raw, dates)):
fmt += "%d\t%s\t%s\n" % (i, r, d)
fmt += 'e\n'
--
2.1.4
- [gpsd-dev] [PATCH 1/4] Change axis, time monotonic on X , leapsecond count on Y,
Sanjeev Gupta <=
- [gpsd-dev] [PATCH 2/4] Leap seconds plotted as points., Sanjeev Gupta, 2015/05/01
- [gpsd-dev] [PATCH 3/4] Extend yrange, so that first and last points can be seen., Sanjeev Gupta, 2015/05/01
- [gpsd-dev] [PATCH 4/4] Extend xrange, so that first and last points can be seen., Sanjeev Gupta, 2015/05/01
- [gpsd-dev] Fwd: [PATCH 1/4] Change axis, time monotonic on X , leapsecond count on Y, Sanjeev Gupta, 2015/05/04