Bus errorとSegmentation faultに困ったら見るブログ

物理の研究者による日々の研究生活のメモ書きです ( python/emacs/html/Japascript/シェルスクリプト/TeX/Mac/C言語/Linux/git/tmux/R/ポケモンGO)

【gnuplot】ガンベル分布の書き方

ガンベル分布についての詳しい情報はwikiなどどうぞ↓

参考

ガンベル分布(gumble) wiki



set term png
set output "pin_gumbel_pdf.png"

set title "gumbel pdf(a, b, x)=1/b*exp(-(x-a)/b)*exp(-exp(-(x-a)/b))"
set xlabel "x"
set xlabel "pdf(x)"
set xrange [-5:20]

f(a, b, x)=1/b*exp(-(x-a)/b)*exp(-exp(-(x-a)/b))
plot f(0.5, 2.0, x) w l lw 2 title "a=0.5, b=2.0"
replot f(1.0, 2.0, x) w l lw 2 title "a=1.0, b=2.0"
replot f(1.5, 3.0, x) w l lw 2 title "a=1.5, b=3.0"
replot f(3.0, 4.0, x) w l lw 2 title "a=3.0, b=4.0"
replot f(3.0, 6.0, x) w l lw 2 title "a=3.0, b=6.0"
set term png
set output "pin_gumbel_pdf.png"
replot

こんな感じのスクリプトを書いて
gnupot plot_gumble_pdf.plt
で次のようなグラフができるはず



ランキング参加中です

↓クリックしていただけると嬉しいです〜