set term svg size 800,600 dynamic enhanced set termoption dashed set style line 1 lt 1 lc rgb "black" lw 1 set style line 2 lt 2 lc rgb "black" lw 1 set style line 3 lt 3 lc rgb "black" lw 1 set style line 4 lt 4 lc rgb "black" lw 1 set style line 5 lt 5 lc rgb "black" lw 1 set style line 6 lt 1 lc rgb "black" lw 2 ismin(x,y) = (x>y)?y:x ismax(x,y) = (x>y)?x:y fur_dis=0.5 #bszrgh=0.2 # 8 inch ridges #bcxrow=1.0 set xlabel 'Crop Height (m)' set ylabel 'Reduction Factor' red_fac_ht(bczht,bszrgh)=(bczht>(fur_dis*bszrgh))?(1.0-fur_dis*bszrgh/bczht):0 #red_fac_wd(bczht,bszrgh,bcxrow)=(bczht>(fur_dis*bszrgh))?(bcxrow>bczht*5.0)?(1.0/(0.92+0.021*bcxrow/(bczht-fur_dis*bszrgh))):1:0 red_fac_wd(bczht,bszrgh,bcxrow)=(bczht>(fur_dis*bszrgh))?ismin(1.0,(1.0/(0.92+0.021*bcxrow/(bczht-fur_dis*bszrgh)))):0 #red_fac_wd(bczht,bszrgh,bcxrow)=(bcxrow>(bczht-fur_dis*bszrgh)*5.0)?(1.0/(0.92+0.021*bcxrow/(bczht-fur_dis*bszrgh))):1 #set log x #set log y set xrange [0:3.0] #set yrange [-2:2] set key box bottom right opaque # using decimal in numbers to ensure real division, not integer divistion plot red_fac_ht(x,0.0) ls 1 with lines title 'height, 0mm ridge ht' \ , red_fac_ht(x,0.1) ls 1 with lines title 'height, 100mm ridge ht' \ , red_fac_ht(x,0.2) ls 2 with lines title 'height, 200mm ridge ht' \ , red_fac_ht(x,0.3) ls 3 with lines title 'height, 300mm ridge ht' \ , 1 exit set xrange [0:0.5] set yrange [-0.1:1.1] set key box bottom right opaque plot red_fac_wd(x,0.1,1.0) ls 4 with lines title '1000mm spacing, 100mm ridge ht' \ , red_fac_wd(x,0.1,0.5) ls 5 with lines title '500mm spacing, 100mm ridge ht' \ , red_fac_wd(x,0.1,0.1) ls 6 with lines title '100mm spacing, 100mm ridge ht' \ , 1 #pause -1