reset
reset session
out=2
outputpath= "./"
outputfilename="betacummulative"
if(out==1) {
set terminal qt size 1000,750 font ",14"
}
if(out==2) {
set terminal pdfcairo size 16cm,12cm font ",20" linewidth 2
set output outputpath.outputfilename.".pdf"
}
if(out==3) {
set terminal pngcairo size 800,600 font ",14"
set output outputpath.outputfilename.".png"
}
dbeta(x,a,b) = exp((a-1)*log(x)+(b-1)*log(1-x)-lgamma(a)-lgamma(b)+lgamma(a+b))
pbeta(x,a,b) = ibeta(a,b,x)
f(x,y,z) = pbeta(x,y,z)
set samples 500
set xrange [0:1]
set xtics 0.2
set yrange [0:1]
set ytics 0.2
#set xlabel "x"
set ylabel "CDF"
set key at .40,1
set grid xtics ytics mytics lw 1 lc rgb "#888" dashtype 3 lt 1
set border 3 back lw 2 lc rgb "#222"
set tics in nomirror scale 0.75
lww=2
set ls 1 lw lww lc rgb "#E41A1C"
set ls 2 lw lww lc rgb "#377EB8"
set ls 3 lw lww lc rgb "#4DAF4A"
set ls 4 lw lww lc rgb "#984EA3"
set ls 5 lw lww lc rgb "#FF7F00"
plot \
f(x, 0.5,0.5) w l ls 1 title "{/Symbol a} = {/Symbol b} = 0.5", \
f(x, 5, 1) w l ls 2 title "{/Symbol a} = 5, {/Symbol b} = 1", \
f(x, 1, 3) w l ls 3 title "{/Symbol a} = 1, {/Symbol b} = 3", \
f(x, 2, 2) w l ls 4 title "{/Symbol a} = 2, {/Symbol b} = 2", \
f(x, 2, 5) w l ls 5 title "{/Symbol a} = 2, {/Symbol b} = 5"
if (out>1) {
set output
}
if (out == 1) {
pause -1
}