0

国債利回りを示すタイムラインをプロットしようとすると、Gnuplot は x 軸にすべての日付を表示しません。次のプロット図を参照してください: プロット Gnuplot は 1995 年 6 月以降の 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 年 12 月、1996 年 6 月、1996 年 12 月もリストしてもらいたいです。何か案は?

4

2 に答える 2

0

私の問題を解決したようです。行set size 1.4,1を省略すると、目的の日付が x 軸に表示されます。しかし、グラフが水平方向に十分に大きくないため、日付が互いに重なっています。

サイズパラメータなしでグラフをスケーリングするにはどうすればよいですか?

于 2013-06-19T21:03:47.167 に答える
0

試していただけますか:

plot "5yr-yields.dat" using 2:xtic(1) index 0 notitle with lines smooth csplines
于 2013-06-19T20:55:42.007 に答える