gnuplot> set terminal 出力のタイプ [オプション] gnuplot> set output ファイル名 |
gnuplot> set xrange [-2:2] gnuplot> set yrange [-2:2] gnuplot> set size 0.721,1 gnuplot> set term png truecolor size 640, 480 gnuplot> set output "IMGSEQUENCE/sequence001.png" gnuplot> p "SAMPLEDATA/Dust001.txt" w p pt 1 gnuplot> set output | x軸範囲 y軸範囲 画像の縦横比(正方形の場合) 出力をpng(640x480)に設定する 出力先ファイルを開く 結果を出力する 出力先ファイルを閉じる |
set term gif size 640, 480などとします。(出力ファイルの拡張子を変えるのを忘れずに!)
gnuplot> load "script.plt" | スクリプトを読んで実行する |
MakeScript.pl | |
#! /usr/bin/perl $input = "SAMPLEDATA/Dust"; $ext = "txt"; $output = "IMGSEQUENCE/sequence"; $datanumber = 5; printf "set xrange [-2:2]\r\n"; printf "set yrange [-2:2]\r\n"; printf "set size 0.721,1\r\n"; printf "set term png truecolor size 640, 480\r\n"; for ($i = 1;$i <= $datanumber; $i++){ printf "set output \"$output%.03d.png\"\r\n", $i; printf "p \"$input%.03d.$ext\" w p pt 1\r\n", $i; printf "set output\r\n"; } printf "set term windows\r\n"; printf "rep\r\n"; |
システム内のperlの位置 入力ファイル名の基本部分 入力ファイル拡張子 出力ファイル名の基本部分 データ数 表示の設定部分 pngで出力 ループ 連番出力ファイルを設定 連番シミュレーション結果を出力 出力ファイル閉じる 最後に出力先を画面にする (UNIX系なら出力先はX11等) 再出力 |
set xrange [-2:2] set yrange [-2:2] set size 0.721,1 set term png truecolor size 640,480 set output "IMGSEQUENCE/sequence001.png" p "SAMPLEDATA/Dust001.txt" w p pt 1 set output set output "IMGSEQUENCE/sequence002.png" p "SAMPLEDATA/Dust002.txt" w p pt 1 set output set output "IMGSEQUENCE/sequence003.png" p "SAMPLEDATA/Dust003.txt" w p pt 1 set output set output "IMGSEQUENCE/sequence004.png" p "SAMPLEDATA/Dust004.txt" w p pt 1 set output set output "IMGSEQUENCE/sequence005.png" p "SAMPLEDATA/Dust005.txt" w p pt 1 set output set term windows rep |
$ MakeScript.pl > script.plt $ gunplot G N U P L O T Version 4.2 patchlevel 4 ...略... gnuplot > load "script.plt" |