How to use gnuplot

Last modified ( Nov.14,1999 )


  1. UNIXシステムにloginする.
    1. gnuplotの起動
      % gnuplot [Return]
    2. 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 xrange[-20:50]
      10. gnuplot> set yrange[-10:30]
      11. gnuplot> replot
      12. gnuplot> set label 1 "Test label 1" at 0,45
      13. gnuplot> set label 2 "Test label 2" at 0,40
      14. gnuplot> replot
      15. gnuplot> set size 0.7,0.8
      16. gnuplot> set data styl lines
      17. gnuplot> replot
      18. gnuplot> show all (パラメータの表示)
      19. gnuplot> save "test.parm"
      20. gnuplot> !ls ( Unixのコマンド )
      21. gnuplot> load "test.parm"
      22. gnuplot> replot
      23. 印刷(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
      24. gnuplot> replot (グラフ再表示)
      25. gnuplot> save "test.parm"
    3. gnuplotの停止
      gnuplot> exit
  2. % ghostview & ( "test.ps"を見ることができる)
    1. Ghostviewのウインドウが開く
    2. File をクリック
      Open をクリック
    3. 表示したい Postscript file をクリック
    4. Okay をクリック
      • Page 頁を指定
      • Magstep 大きさを指定
      • Orientation 向き等を指定
      • Media 用紙等を指定
    5. File をクリック
      Quit をクリック
  3. UNIXシステムからlogoutする
    % exit