gnuplot / plotpm3d
| not so FAQ 
 | カラーマップを使った3次元表示 (pm3d)3次元図をカラー表示で描きたい.[ver.4] ONLY !  gnuplotの3次元表示は線あるいは点で描かれますが,ver.3.8や4.0からは gnuplot> set xrange [-2:2] gnuplot> set yrange [-2:2] gnuplot> set pm3d gnuplot> splot exp(-x*x)*exp(-y*y)   PostScriptに出力する場合は,terminalのオプションcolor/monochrome gnuplot> set term postscript eps enhanced color gnuplot> set output "color.eps" gnuplot> replot gnuplot> set term postscript eps enhanced monochromer gnuplot> set output "mono.eps" gnuplot> replot    等高線を色で表示したい.[ver.4] ONLY !  gnuplotの等高線はその名のとおり「線」ですが,pm3dを用いると色を塗っ gnuplot> set pm3d at b gnuplot> set ticslevel 0.8 gnuplot> set isosample 40,40 gnuplot> splot x*x*exp(-x*x)*y*y*exp(-y*y)  pm3dを使って底面だけを2次元表示するのは非常に簡単です. gnuplot> set pm3d map gnuplot> splot x*x*exp(-x*x)*y*y*exp(-y*y)  3次元の棒グラフを描きたい. gnuplotは3次元棒グラフを描けないので,少々インチキする必要があります. # X Y Z 0.0 0.0 2.0 0.0 1.0 3.5 1.0 0.0 1.0 1.0 1.0 3.0  最初の行は,0< X <1, 0< Y <1 の範囲で Z=2 を表し,下の図   データの各行を何かプログラムを使って膨らませます.上の図でX=0の線上を # X Y Z 0.0 0.0 2.0 0.0 1.0 2.0 0.0 1.0 3.5 0.0 2.0 3.5 1.0 0.0 2.0 1.0 1.0 2.0 1.0 1.0 3.5 1.0 2.0 3.5 1.0 0.0 1.0 1.0 1.0 1.0 1.0 1.0 3.0 1.0 2.0 3.0 2.0 0.0 1.0 2.0 1.0 1.0 2.0 1.0 3.0 2.0 2.0 3.0  このようにデータを用意できれば,後は隠線処理して線で繋ぐだけです.こ gnuplot> set hidden3d gnuplot> splot "test.dat" with lines  [ver.4] ONLY !  Gnuplot ver.4を使っているなら,pm3dを使って,もう少しカッコ良いグラ gnuplot> set pm3d gnuplot> splot "test.dat" with pm3d  | 
 
 