admin管理员组文章数量:1123160
I have a table that I want to plot with gnuplot. The first "x" column is the timestamp is seconds since Epoch. I want the xtics to show only the hours, skipping 3. That is:
... 9 12 15 18 ...
So I set this:
set xdata time
set format x "%k"
set xtics 3600,10800
It works, but the problem is that the hours are given in UTC time, while I heed to apply the local time (shifted -2 hours). Hence, instead of
... 9 12 15 18 ...
I need
... 7 10 13 16 ...
at the corresponding places.
Is there a way to apply a formula to the xtics without affecting the funcion? Of course I could simply apply an offset to the first column of the data substracting 3 hours, but I don´t want to do that.
I have a table that I want to plot with gnuplot. The first "x" column is the timestamp is seconds since Epoch. I want the xtics to show only the hours, skipping 3. That is:
... 9 12 15 18 ...
So I set this:
set xdata time
set format x "%k"
set xtics 3600,10800
It works, but the problem is that the hours are given in UTC time, while I heed to apply the local time (shifted -2 hours). Hence, instead of
... 9 12 15 18 ...
I need
... 7 10 13 16 ...
at the corresponding places.
Is there a way to apply a formula to the xtics without affecting the funcion? Of course I could simply apply an offset to the first column of the data substracting 3 hours, but I don´t want to do that.
Share Improve this question asked 5 hours ago Luis A. FloritLuis A. Florit 2,5793 gold badges37 silver badges66 bronze badges1 Answer
Reset to default 0You don't provide original data, but simply shift your data by -2 hours.
plot FILE u ($1-2*3600):2 # or whatever column you need to plot
本文标签: linuxHow to shift the xtics values in gnuplotStack Overflow
版权声明:本文标题:linux - How to shift the xtics values in gnuplot? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736549167a1944490.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论