How to gnuplot
Last modified ( Nov.05,1998 )
4階実習室のパソコンからgnuplotを利用することができないので、
取り合えず総合情報処理センター1階のX端末から利用する方法を簡単に書きます。
- センター教育システムにloginする
1年生の時の情報処理(演習)で使ったlogin名とPasswardが必要
- 4階実習室のsunシステムにloginする
prex11> telnet 133.60.98.2 ( <-- lagrangeのIP-address )
4階実習室のlogin名とPasswardが必要
- DISPLAY環境をlagrangeに知らせる
lagrange% setenv DISPLAY 133.60.192.xxx:0
( <-- X-terminalのIP-address )
- gnuplotの起動
lagrange% gnuplot
- gnuplotの使い方
- gnuplot> help
- gnuplot> plot "test.data"
test.dataの内容は
- gnuplot> set title "Plot of test.data"
- gnuplot> set xlabel "XXXXX"
- gnuplot> set ylabel "YYYYY"
- gnuplot> replot (再表示)
- gnuplot> set grid
- gnuplot> replot
- gnuplot> set grid
- gnuplot> replot
- gnuplot> set xrange[-20:50]
- gnuplot> set yrange[-10:30]
- gnuplot> replot
- gnuplot> set label 1 "Test label 1" at 0,45
- gnuplot> set label 2 "Test label 2" at 0,40
- gnuplot> replot
- gnuplot> set size 0.7,0.8
- gnuplot> set data styl lines
- gnuplot> replot
- gnuplot> show all (パラメータの表示)
- gnuplot> save "test.parm"
- gnuplot> !ls ( Unixのコマンド )
- gnuplot> load "test.parm"
- gnuplot> replot
- 印刷(4階実習室のプリンタ)
- gnuplot> set term postscript (グラフが消える)
- gnuplot> set output "test.ps"
- gnuplot> replot
- gnuplot> !ls ( Unixのコマンド )
- gnuplot> !lpr -c test.ps ( Unixのコマンド )
- gnuplot> set term x11
- gnuplot> replot (グラフ再表示)
- gnuplot> save "test.parm"
- gnuplotの停止
gnuplot> exit
- lagrange% ghostview & ( "test.ps"を見ることができる)
- Ghostviewのウインドウが開く
- File をクリック
Open をクリック
- 表示したい Postscript file をクリック
- Okay をクリック
- Page 頁を指定
- Magstep 大きさを指定
- Orientation 向き等を指定
- Media 用紙等を指定
- File をクリック
Quit をクリック
- 4階実習室のsunシステムからlogoutする
lagrange% exit
- センター教育システムからlogoutする
prex11> exit
taka@si.hirosaki-u.ac.jp