72 Plot

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

書式:

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

関数 < function> 、または引用符で囲まれたデータファイル名 (< datafile> ) のどちらか一方を与えます。関数は通常は 1 本の数式ですが、媒介変数モー ド (parametric) においては 2 つの数式の組です。関数は、組み込み関数、 ユーザ定義関数、あるいはその plot コマンドの上で与えるもののいずれかを 使用できます。コンマで区切ることで、複数のデータや関数を 1 つのコマン ドで描画できます。以下参照: data (72.3), functions (72.6)

例:

     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 (82.52)


Subsections
竹野茂治@新潟工科大学
2014年9月25日