GNUPLOTの第一歩

線と点のタイプの変更

グラフの表示にはlineとpoint使った表示があります。デフォルトは lineです。

      gnuplot> plot sin(x) w[ith] l[ine]
      gnuplot> plot sin(x) w l l[ine]t[ype] 4
      gnuplot> plot sin(x) w l l[ine]t[ype] 4 l[ine]w[idth] 3

線種(linetype)、線幅(linewidth)が変更できます。ltやlwの後の数値 で指定します。なお、ディスプレイ上ではline typeは色の指定になり ますが、たとえばpostscriptに出力するときには破線等の指定となりま す。

      gnuplot> plot sin(x) w[ith] p[oint]
      gnuplot> plot sin(x) w p p[oint]s[ize]
      gnuplot> plot sin(x) w p p[oint]s[ize] 3 p[oint]t[ype] 4

点の大きさ、点種が変更できます。psやptの後の数値で指定します。

どれだけの種類の線種、点種が使えるかは利用する出力先(terminal)に よって異なります。


GNUPLOTの第一歩
小栗栖 修
メールアドレス: ogurisu[AT]kanazawa-u.ac.jp ([AT]を@におきかえてください)