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 set xlabel 'Angle to Wind' set ylabel 'Ridge Spacing Parallel to Wind (mm)' set angles degrees # calc. ridge spacing parallel the wind sina(angle) = ismax(0.1,abs(sin(angle))) sxprg(angle, asxrgs, asxdks) = (asxdks > asxrgs/3.)?ismin(asxrgs/sina(angle),asxdks):asxrgs/sina(angle) # equation with no dikes sxprgnd(angle, asxrgs) = asxrgs/sina(angle) set xrange [0:90] #set yrange [0:1] set key top #plot sxprg(x,400,3000) ls 1 with lines title '400 mm spacing' \ # , sxprg(x,600,3000) ls 2 with lines title '600 mm spacing' \ # , sxprg(x,800,3000) ls 3 with lines title '800 mm spacing' \ # , sxprg(x,1000,3000) ls 4 with lines title '1000 mm spacing' \ # , sxprg(x,1200,3000) ls 5 with lines title '1200 mm spacing' \ # , sxprg(x,1500,3000) ls 6 with lines title '1500 mm spacing' plot sxprg(x,400,3000) ls 1 with lines title '400 mm spacing' \ , sxprgnd(x,400) ls 2 with lines title '400 mm no dikes' \ , sxprg(x,600,3000) ls 3 with lines title '600 mm spacing' \ , sxprgnd(x,600) ls 4 with lines title '600 mm no dikes' \ , sxprg(x,800,3000) ls 5 with lines title '800 mm spacing' \ , sxprgnd(x,800) ls 6 with lines title '800 mm no dikes' #pause -1