gnuplot / plot (5)
not so FAQ
|
2次元プロットのあれこれ (その5)図の中に図を描きたい グラフ中の空いた部分に,別の小さな図を描いてみましょう.よくあるの gnuplot> set xrange [ 0 : 20 ] gnuplot> set yrange [ 0 : 6 ] gnuplot> set xtics 5 gnuplot> set ytics 1 gnuplot> set multiplot multiplot> set origin 0.0,0.0 multiplot> set size 1.0,1.0 multiplot> plot "file.dat" u 1:2:3 notitle with yerrorbars, > "file.cal" u 1:2 notitle with lines 図の原点を空いた部分(0.45,0.1)に移動した後,縮小したグラフを描きます. multiplot> set origin 0.45,0.1 multiplot> set size 0.5,0.5 multiplot> set xrange [ 1 : 5 ] multiplot> set yrange [ 2.4 : 3.0 ] multiplot> set ytics 0.5 multiplot> replot multiplot> set nomultiplot gnuplot> Xの小さい部分が拡大されて見やすくなっていませんか.ここでは,拡大 軸名を入れる場合は全体の図だけにしておき,小さい方の図には付けないほ 簡単な棒グラフ. スタイル一覧にあるように, Postscriptに出力するなら,非常に太い線を使って gnuplot> set term postscript eps enhanced color gnuplot> set linestyle 1 lt 1 lw 50 gnuplot> # for gnuplot ver.4 gnuplot> # set style line 1 lt 1 lw 50 gnuplot> plot "test.dat" using 1:2 with imp ls 1 ![]() [ver.4] ONLY ! Ver.4以降では,box styleでの矩形を塗りつぶすオプションが追加されてい with boxes fs pattern の場合は,使用するパターンを番号で 下の例では,棒の幅は3とし,これを(3)で与えています. gnuplot> plot "test.dat" usi 1:2:(3) w boxes fs pattern 1, gnuplot> "test.dat" usi ($1+5):2:(3) w boxes fs solid 0.7 ![]() |