How to gnuplot

Last modified ( Nov.05,1998 )


4階実習室のパソコンからgnuplotを利用することができないので、 取り合えず総合情報処理センター1階のX端末から利用する方法を簡単に書きます。
  1. センター教育システムにloginする
    1年生の時の情報処理(演習)で使ったlogin名とPasswardが必要
  2. 4階実習室のsunシステムにloginする
    prex11> telnet 133.60.98.2 ( <-- lagrangeのIP-address )
    4階実習室のlogin名とPasswardが必要
    1. DISPLAY環境をlagrangeに知らせる
      lagrange% setenv DISPLAY 133.60.192.xxx:0 ( <-- X-terminalのIP-address )
    2. gnuplotの起動
      lagrange% gnuplot
    3. gnuplotの使い方
      1. gnuplot> help
      2. gnuplot> plot "test.data"
        test.dataの内容は
          x1 y1
          x2 y2
          x3 y3

          xn yn
      3. gnuplot> set title "Plot of test.data"
      4. gnuplot> set xlabel "XXXXX"
      5. gnuplot> set ylabel "YYYYY"
      6. gnuplot> replot (再表示)
      7. gnuplot> set grid
      8. gnuplot> replot
      9. gnuplot> set grid
      10. gnuplot> replot
      11. gnuplot> set xrange[-20:50]
      12. gnuplot> set yrange[-10:30]
      13. gnuplot> replot
      14. gnuplot> set label 1 "Test label 1" at 0,45
      15. gnuplot> set label 2 "Test label 2" at 0,40
      16. gnuplot> replot
      17. gnuplot> set size 0.7,0.8
      18. gnuplot> set data styl lines
      19. gnuplot> replot
      20. gnuplot> show all (パラメータの表示)
      21. gnuplot> save "test.parm"
      22. gnuplot> !ls ( Unixのコマンド )
      23. gnuplot> load "test.parm"
      24. gnuplot> replot
      25. 印刷(4階実習室のプリンタ)
        1. gnuplot> set term postscript (グラフが消える)
        2. gnuplot> set output "test.ps"
        3. gnuplot> replot
        4. gnuplot> !ls ( Unixのコマンド )
        5. gnuplot> !lpr -c test.ps ( Unixのコマンド )
        6. gnuplot> set term x11
      26. gnuplot> replot (グラフ再表示)
      27. gnuplot> save "test.parm"
    4. gnuplotの停止
      gnuplot> exit
  3. lagrange% ghostview & ( "test.ps"を見ることができる)
    1. Ghostviewのウインドウが開く
    2. File をクリック
      Open をクリック
    3. 表示したい Postscript file をクリック
    4. Okay をクリック
      • Page 頁を指定
      • Magstep 大きさを指定
      • Orientation 向き等を指定
      • Media 用紙等を指定
    5. File をクリック
      Quit をクリック
  4. 4階実習室のsunシステムからlogoutする
    lagrange% exit
  5. センター教育システムからlogoutする
    prex11> exit

taka@si.hirosaki-u.ac.jp