Gnuplot:两个轴的时间不同

Gnuplot:两个轴的时间不同,gnuplot,Gnuplot,我试着画一张一年左右日出日落时间的图表。这是我的绘图脚本: set terminal png size 1000,500 set output "dose.png" set xlabel "2018" set label 1 'secs after midnight' at graph -0.08, graph 0.3 rotate set xdata time set timefmt "%m-%d" set xtics "1",2592000,"365" out set format x "%

我试着画一张一年左右日出日落时间的图表。这是我的绘图脚本:

set terminal png size 1000,500
set output "dose.png"
set xlabel "2018"
set label 1 'secs after midnight' at graph -0.08, graph 0.3 rotate
set xdata time
set timefmt "%m-%d"
set xtics "1",2592000,"365" out
set format x "%m-%d"
set ytics "0",3600,"86400" out
set title "sunrise and sunset at Oulu"
set key off
datafile="./f.data"
set yrange ["0":"86399"]
plot datafile using 1:2 w filledcurve x1 lc rgb "#BFD0FB", \
'' using 1:3 w filledcurve x2 lc rgb "#BFD0FB", \
'' using 1:4 w filledcurve x1 lc rgb "#7FA2F7", \
'' using 1:5 w filledcurve x2 lc rgb "#7FA2F7", \
'' using 1:6 w filledcurve x1 lc rgb "#3F74F3", \
'' using 1:7 w filledcurve x2 lc rgb "#3F74F3", \
'' using 1:8 w filledcurve x1 lc rgb "#0046F0", \
'' using 1:9 w filledcurve x2 lc rgb "#0046F0", \
'' using 1:10 w filledcurve x1 lc rgb "#002EA0", \
'' using 1:11 w filledcurve x2 lc rgb "#002EA0", \
'' using 1:12 w filledcurve x1 lc rgb "#001750", \
'' using 1:13 w filledcurve x2 lc rgb "#001750", \
'' using 1:14 w filledcurve x1 lc rgb "black", \
'' using 1:15 w filledcurve x2 lc rgb "black"
下面是
f.data
中的一行:

4-23 15720 72660 15540 72780 15300 73020 15120 73200 11280 77100 3480 84840 0 86400
然而,我想把yticsk改为小时,但我无法做到这一点。我希望看到10而不是36000,23而不是82800。我怎么能做到


如果需要,我可以更改数据文件的格式。

可能有更好的方法,但这应该可以:

set ytics ("" 0)
do for [y = 0:23] {
   set ytics add (sprintf("%d",y) (y*3600))
}
第一个
set
是删除默认值,然后我们通过值0到23循环,并执行
set ytics add(“…”)
添加一个新的显式标签,该标签由字符串和y值组成,y值应该放在哪里