gnuplotによる作図(multiplot) をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
#norelated
* gnuplotで複数枚のグラフを描画する方法(multiplot) [#od94...
指導書の図5はgnuplotのmultiplot環境で,2枚のグラフを同時...
これは次の手順に従っている.なお,コマンドはsetもしくはun...
gnuplot> set multiplot
multiplot> set size 1,0.5
multiplot> set origin 0,0.5
multiplot> set key left
multiplot> set yrange [-10:10]
multiplot> set title "Real part of DFT, sin(x), 103158, ...
multiplot> set xlabel "Sample number"
multiplot> set ylabel "DFT"
multiplot> plot "sin_R.dft" with impulses, "sin_R.dft" w...
multiplot> set size 1,0.5
multiplot> set origin 0,0
multiplot> set yrange [-10:10]
multiplot> set title "Imaginary part of DFT, sin(x), 103...
multiplot> set xlabel "Sample number"
multiplot> set ylabel "DFT"
multiplot> plot "sin_I.dft" with impulses, "sin_I.dft" w...
multiplot> unset multiplot
最後のunset terminalでmultiplot環境を抜け出します.
%%%使用ファイル名%%%や%%%描画範囲(xrange, yrange)%%%を適...
&br;&br;
なお,これら一連のコマンドをテキストファイルに保存し,gnu...
+ エディタを用いて,これらコマンドを書き込んだ%%%テキスト...
+ gnuplotを立ち上げ,
gnuplot> load "sin_dft.plt"
とプロットファイルsin_dft.pltを読み込む.
プロットファイル中の読み込みデータファイルの部分を修正す...
* multiplot環境でのグラフの保存 [#r1ade395]
multiplot環境で図の表示が確認されたら,画像として保存しま...
ただし,multiplot環境の場合,出力端末(terminal)を途中で変...
そこで%%%上の操作の前に次の2行%%%
gnuplot> set terminal pngcairo
gnuplot> set output "sample.png"
を追加し,%%%上の操作の最後のコマンド(unset multiplot)の...
multiplot> unset terminal
を追加する.
すなわち
gnuplot> set terminal pngcairo
gnuplot> set output "sample.png"
gnuplot> set multiplot
multiplot> set size 1,0.5
multiplot> set origin 0,0.5
multiplot> set key left
multiplot> set yrange [-10:10]
multiplot> set title "Real part of DFT, sin(x), 103158, ...
multiplot> set xlabel "Sample number"
multiplot> set ylabel "DFT"
multiplot> plot "sin_R.dft" with impulses, "sin_R.dft" w...
multiplot> set size 1,0.5
multiplot> set origin 0,0
multiplot> set yrange [-10:10]
multiplot> set title "Imaginary part of DFT, sin(x), 103...
multiplot> set xlabel "Sample number"
multiplot> set ylabel "DFT"
multiplot> plot "sin_I.dft" with impulses, "sin_I.dft" w...
multiplot> unset terminal
multiplot> unset multiplot
とする.
%%%使用ファイル名%%%を適切に設定すること.
終了行:
#norelated
* gnuplotで複数枚のグラフを描画する方法(multiplot) [#od94...
指導書の図5はgnuplotのmultiplot環境で,2枚のグラフを同時...
これは次の手順に従っている.なお,コマンドはsetもしくはun...
gnuplot> set multiplot
multiplot> set size 1,0.5
multiplot> set origin 0,0.5
multiplot> set key left
multiplot> set yrange [-10:10]
multiplot> set title "Real part of DFT, sin(x), 103158, ...
multiplot> set xlabel "Sample number"
multiplot> set ylabel "DFT"
multiplot> plot "sin_R.dft" with impulses, "sin_R.dft" w...
multiplot> set size 1,0.5
multiplot> set origin 0,0
multiplot> set yrange [-10:10]
multiplot> set title "Imaginary part of DFT, sin(x), 103...
multiplot> set xlabel "Sample number"
multiplot> set ylabel "DFT"
multiplot> plot "sin_I.dft" with impulses, "sin_I.dft" w...
multiplot> unset multiplot
最後のunset terminalでmultiplot環境を抜け出します.
%%%使用ファイル名%%%や%%%描画範囲(xrange, yrange)%%%を適...
&br;&br;
なお,これら一連のコマンドをテキストファイルに保存し,gnu...
+ エディタを用いて,これらコマンドを書き込んだ%%%テキスト...
+ gnuplotを立ち上げ,
gnuplot> load "sin_dft.plt"
とプロットファイルsin_dft.pltを読み込む.
プロットファイル中の読み込みデータファイルの部分を修正す...
* multiplot環境でのグラフの保存 [#r1ade395]
multiplot環境で図の表示が確認されたら,画像として保存しま...
ただし,multiplot環境の場合,出力端末(terminal)を途中で変...
そこで%%%上の操作の前に次の2行%%%
gnuplot> set terminal pngcairo
gnuplot> set output "sample.png"
を追加し,%%%上の操作の最後のコマンド(unset multiplot)の...
multiplot> unset terminal
を追加する.
すなわち
gnuplot> set terminal pngcairo
gnuplot> set output "sample.png"
gnuplot> set multiplot
multiplot> set size 1,0.5
multiplot> set origin 0,0.5
multiplot> set key left
multiplot> set yrange [-10:10]
multiplot> set title "Real part of DFT, sin(x), 103158, ...
multiplot> set xlabel "Sample number"
multiplot> set ylabel "DFT"
multiplot> plot "sin_R.dft" with impulses, "sin_R.dft" w...
multiplot> set size 1,0.5
multiplot> set origin 0,0
multiplot> set yrange [-10:10]
multiplot> set title "Imaginary part of DFT, sin(x), 103...
multiplot> set xlabel "Sample number"
multiplot> set ylabel "DFT"
multiplot> plot "sin_I.dft" with impulses, "sin_I.dft" w...
multiplot> unset terminal
multiplot> unset multiplot
とする.
%%%使用ファイル名%%%を適切に設定すること.
ページ名: