於是解決方案就是用call指令,我將底下的文字存成sample.plt
set xrange[-10:20]打算用來觀察高斯分布的特色,另一點有問題的是style line似乎無法很好的運作在wxt+multiplot模式底下。
set yrange[0:1]
g(x,mean)=exp(-(x-mean)*(x-mean)/v/v/2.0)/sqrt(2.0*pi)/v
v = 2
set style line 1 lt 1
set style line 2 lt 2
set style line 3 lt 3
set multiplot title "The decay model is P{/*0.5 0}/(distance{\^{/Symbol a}}) (P{/*0.5 0})=100.\nThe sample distances are 5m and 10m.\nThe recevied powerunder defferent distance.\n" layout 2,2
set title "{/Symbol a}=1.5"
plot g(x,0),g(x,8.94) lt 2,g(x,3.16) lt 3
set title "{/Symbol a}=1.75"
plot g(x,0),g(x,5.98) ls 2,g(x,1.78) ls 3
set title "{/Symbol a}=2"
plot g(x,0),g(x,4) ls 2,g(x,1) ls 3
set title "{/Symbol a}=2.5"
plot g(x,0),g(x,1.79) ls 2,g(x,0.316) ls 3
unset multiplot
set term wxt enhanced
call 'sample.plt'
沒有留言:
張貼留言