CO/アクセスログを描いてみよう
をテンプレートにして作成
査読
rst2hooktail
進行表
執筆中
かぎマニュ
物理のかぎプロジェクト
トップ
最近の更新
ヘルプ
開始行:
* アクセスログを描いてみよう [#l6faed8e]
gnuplot + unix 環境を使って [[ここ:http://www12.plala.or....
不明な点は以下へ。
- [[CO/アクセスログを描いてみよう/QandA]]
** 必要環境 [#o1cacba3]
- gnuplot 4.0 (or later)
- unix環境 (Cygwin や Linux などでも可)
Cygwin を入れると gnuplot も入るので、Windows な人は Cygw...
フルインストール(全てのパッケージをインストールする)をお...
** データの入手 [#x71745ac]
日ごとのアクセスログは以下の URL から入手できます。
毎日深夜1時頃には前日分までのデータが更新されています。
http://hooktail.maxwell.jp/data/daycount.log
中身は2つの列からなっています。一列目は日付、二列目はアク...
20060601 0
20060602 0
20060603 0
20060604 0
20060605 0
20060606 0
20060607 0
20060608 0
20060609 0
20060610 0
20060611 0
20060612 0
20060613 798
20060614 823
20060615 880
20060616 804
20060617 567
20060618 645
20060619 914
20060620 895
20060621 883
20060622 850
20060623 739
20060624 568
(以下略)
** プロット [#ed577a06]
ダウンロードしたファイルをとりあえずプロットしてみましょ...
ps ファイルに出力したいと思います。
set term postscript eps enhanced colour
set xlabel "date"
set ylabel "access number"
set output "01.eps"
plot "daycount.log" using 1:2 notitle with lines lt 1 lw 3
上記をファイル plot01.gp に保存して下さい。そして Cygwin ...
gnuplot plot01.gp
と実行して下さい。01.eps というファイルができているはずで...
ファイルには以下のようにプロットされています。
&ref(01.png);
データをプロットすることはできましたが、横軸が変ですね。
これはデータファイルの第一列が「日付」ではなく「数値」と...
*** x 軸を日付とする [#x42b5d3f]
日付として認識させるためには plot01.gp を以下のように変更...
set term postscript eps enhanced colour
set xlabel "date"
set ylabel "access number"
set xdata time
set timefmt "%Y%m%d"
set format x "%m/%d(%a)"
set output "02.eps"
plot "daycount.log" using 1:2 notitle with lines lt 1 lw 3
上記を plot02.gp というファイルに保存し、Cygwin 上で gnup...
gnuplot plot02.gp
02.eps は次のようにプロットされているはずです。
&ref(02.png);
横軸が日付になりましたね。
*** 描画範囲を指定する [#e04cdc6c]
plot02.gp では全データをプロットしています。データ数が多...
プロット範囲を指定するには set xrange 命令を使います。
x 軸を日付としているので、数値として認識されないように値...
例えば 7月 25日から 8月 25日までのデータをプロットしたい...
set term postscript eps enhanced colour
set xlabel "date"
set ylabel "access number"
set xdata time
set timefmt "%Y%m%d"
set format x "%m/%d(%a)"
set xrange ["20060725":"20060825"]
set output "03.eps"
plot "daycount.log" using 1:2 notitle with lines lt 1 lw 3
これを plot03.gp というファイルに保存して gnuplot にプロ...
&ref(03.png);
終了行:
* アクセスログを描いてみよう [#l6faed8e]
gnuplot + unix 環境を使って [[ここ:http://www12.plala.or....
不明な点は以下へ。
- [[CO/アクセスログを描いてみよう/QandA]]
** 必要環境 [#o1cacba3]
- gnuplot 4.0 (or later)
- unix環境 (Cygwin や Linux などでも可)
Cygwin を入れると gnuplot も入るので、Windows な人は Cygw...
フルインストール(全てのパッケージをインストールする)をお...
** データの入手 [#x71745ac]
日ごとのアクセスログは以下の URL から入手できます。
毎日深夜1時頃には前日分までのデータが更新されています。
http://hooktail.maxwell.jp/data/daycount.log
中身は2つの列からなっています。一列目は日付、二列目はアク...
20060601 0
20060602 0
20060603 0
20060604 0
20060605 0
20060606 0
20060607 0
20060608 0
20060609 0
20060610 0
20060611 0
20060612 0
20060613 798
20060614 823
20060615 880
20060616 804
20060617 567
20060618 645
20060619 914
20060620 895
20060621 883
20060622 850
20060623 739
20060624 568
(以下略)
** プロット [#ed577a06]
ダウンロードしたファイルをとりあえずプロットしてみましょ...
ps ファイルに出力したいと思います。
set term postscript eps enhanced colour
set xlabel "date"
set ylabel "access number"
set output "01.eps"
plot "daycount.log" using 1:2 notitle with lines lt 1 lw 3
上記をファイル plot01.gp に保存して下さい。そして Cygwin ...
gnuplot plot01.gp
と実行して下さい。01.eps というファイルができているはずで...
ファイルには以下のようにプロットされています。
&ref(01.png);
データをプロットすることはできましたが、横軸が変ですね。
これはデータファイルの第一列が「日付」ではなく「数値」と...
*** x 軸を日付とする [#x42b5d3f]
日付として認識させるためには plot01.gp を以下のように変更...
set term postscript eps enhanced colour
set xlabel "date"
set ylabel "access number"
set xdata time
set timefmt "%Y%m%d"
set format x "%m/%d(%a)"
set output "02.eps"
plot "daycount.log" using 1:2 notitle with lines lt 1 lw 3
上記を plot02.gp というファイルに保存し、Cygwin 上で gnup...
gnuplot plot02.gp
02.eps は次のようにプロットされているはずです。
&ref(02.png);
横軸が日付になりましたね。
*** 描画範囲を指定する [#e04cdc6c]
plot02.gp では全データをプロットしています。データ数が多...
プロット範囲を指定するには set xrange 命令を使います。
x 軸を日付としているので、数値として認識されないように値...
例えば 7月 25日から 8月 25日までのデータをプロットしたい...
set term postscript eps enhanced colour
set xlabel "date"
set ylabel "access number"
set xdata time
set timefmt "%Y%m%d"
set format x "%m/%d(%a)"
set xrange ["20060725":"20060825"]
set output "03.eps"
plot "daycount.log" using 1:2 notitle with lines lt 1 lw 3
これを plot03.gp というファイルに保存して gnuplot にプロ...
&ref(03.png);
ページ名:
Modified by
物理のかぎプロジェクト
PukiWiki 1.4.6
Copyright © 2001-2005
PukiWiki Developers Team
. License is
GPL
.
Based on "PukiWiki" 1.3 by
yu-ji
Powered by PHP 5.3.29 HTML convert time to 0.002 sec.