【发布时间】:2013-06-19 20:42:48
【问题描述】:
当我尝试绘制显示国债收益率的时间线时,Gnuplot 并未在 x 轴上列出所有日期。 看下面的情节图片: Gnuplot 在 1995-Jun 之后删除了 xtics,并且没有显示任何进一步的日期。我的数据如下:
1993-01-04 5.9
1993-01-05 5.9
1993-01-06 5.94
1993-01-07 6.05
..
1996-12-27 6.09
1996-12-30 6.1
1996-12-31 6.21
这是我的 gnuplot 配置文件:
set terminal latex
set xdata time
set timefmt "%Y-%m-%d"
set output "5yr-yields.tex"
set xrange ["1993-01-04":"1996-12-31"]
set yrange [4:8]
set xtics format "%Y-%b"
unset mxtics
set xtics ("1993-06", "1992-12", "1993-06", "1993-12", "1994-06", "1994-12", "1995-06", "1995-12", "1996-06", "1996-12")
set size 1.4,1
set xlabel "date"
set ylabel "\\rotatebox{90}{5-year treasury yield}" rotate by 270
plot "5yr-yields.dat" using 1:2 index 0 notitle with lines smooth csplines
我希望 gnuplot 也列出 1995-Dec、1996-Jun 和 1996-Dec。有什么想法吗?
【问题讨论】: