【发布时间】:2014-03-06 09:23:34
【问题描述】:
Gnuplot 往往会使时间序列图中的 x 轴混乱。有关窄间距标签的示例,请参见下图:
有没有办法让 gnuplot 避免如此狭窄的间距?最好这应该在 gnuplot 脚本中完成以生成绘图。
我使用以下 gnuplot 脚本和一个随机数据文件生成了绘图:
set terminal png
set output "plot.png"
set timefmt "%s"
set xdata time
set xlabel "time"
set ylabel "Random Data"
set boxwidth 600
set style fill solid 0.5
set key below
plot "random.dat" using 1:2 w boxes title ".60"
注意:我使用的是 Gnuplot 4.6。
编辑
- 写更少的时间就足够了。
- 生成绘图的示例文件可在http://pastebin.com/w0kia7Dt 获得
【问题讨论】:
-
你想把x轴展开,还是写少一点?
-
我想写的次数越少越好。
-
您能否提供指向您的数据文件的链接(可能在 pastebin 或类似的东西上)?
-
您似乎找到了答案,但这个问题 (stackoverflow.com/questions/15975631/…) 可能会提供一些避免重叠的方法。
标签: gnuplot time-series