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

#Raupach 1992 data
#brcd	wz0/h
#0.0110812818	0.0085952794
#0.022403713	0.0223604222
#0.0452949725	0.0335698963
#0.0898028252	0.0541452047
#0.1815611814	0.0624956803
#0.2341137923	0.1442679963
#0.4641592396	0.0832568547
#0.8025250549	0.1007998765
#1.6872366479	0.0503987773
#2.8053238244	0.0503987773
#3.0934706506	0.0297885936
#4.313402642	0.0610196904
#4.7564397512	0.0305091424

ismin(x,y) = (x>y)?y:x
ismax(x,y) = (x>y)?x:y

set xlabel 'Effective Biomass Drag Coefficient'
set ylabel 'Aerodynamic Roughness/Biomass Height'

wzovh(brcd)=1./(17.27-(1.254*log(brcd)/brcd)-(3.714/brcd))

set log x
set log y
set xrange [0.01:5]
#set yrange [0:3100]
set key bottom

# using decimal in numbers to ensure real division, not integer divistion
plot wzovh(x) ls 1 with lines title 'Hagen and Armbrust (1994)' \
   , '-' using 1:2 title 'Raupach (1992)' with points
 0.0110812818	0.0085952794
 0.022403713	0.0223604222
 0.0452949725	0.0335698963
 0.0898028252	0.0541452047
 0.1815611814	0.0624956803
 0.2341137923	0.1442679963
 0.4641592396	0.0832568547
 0.8025250549	0.1007998765
 1.6872366479	0.0503987773
 2.8053238244	0.0503987773
 3.0934706506	0.0297885936
 4.313402642	0.0610196904
 4.7564397512	0.0305091424
EOF

#pause -1