65 Plot

plotgnuplot で図を描くための基本的なコマンドです。 それは関数 やデータを実に多くの方法で表示します。plot は 2 次元の関数やデータを 描くのに使われ、splot は 3 次元の曲面やデータの 2 次元投影を描きます。 plotsplot は多くの共通の特徴点を持ちますが、その違いについては 以下参照: splot (p. [*])。特に注意しておきますが、binary < binary list> オプ ションは plot, splot の両方で動作しますが、両者には小さな違いがあ ります。

書式:

     plot {<ranges>}
          {<iteration>}
          {<function> | {"<datafile>" {datafile-modifiers}}}
          {axes <axes>} {<title-spec>} {with <style>}
          {, {definitions{,}} <function> ...}

関数 < function> 、または引用符で囲まれたデータファイル名 (< datafile> ) のどちらか一方を与えます。関数は一本の数式、または parametric mode に おいては 2 つの数式の組です。数式は完全に定義してもいいですし、前の方 の gnuplot のコマンド列で部分的に定義してもいいです (以下参照:user-defined (p. [*]))。

関数とパラメータは plot コマンド自身の上で定義をすることも可能です。 これは単に他の項目とコンマで分離して記述することでなされます。

例:

     plot sin(x)
     plot sin(x), cos(x)
     plot f(x) = sin(x*a), a = .2, f(x), a = .4, f(x)
     plot "datafile.1" with lines, "datafile.2" with points
     plot [t=1:10] [-pi:pi*2] tan(t), \
          "data.1" using (tan($2)):($3/$4) smooth csplines \
                   axes x1y2 notitle with lines 5
     plot for [datafile in "spinach.dat broccoli.dat"] datafile

以下参照: show plot (p. [*])


Subsections
竹野茂治@新潟工科大学
2011年11月14日