iccsa-21-wind

Wind Simulation Using High-Frequency Velocity Component Measurements
git clone https://git.igankevich.com/iccsa-21-wind.git
Log | Files | Refs

direction-dist.gnuplot (1939B)


      1 load "build/gnuplot/direction_rmse.gnuplot"
      2 set terminal svg size 450,450/2 font 'Free Serif, 10' enhanced round dynamic
      3 set xtics nomirror out offset 0,0.25
      4 set ytics nomirror out offset 0.5,0
      5 set border 1+2 back
      6 unset key
      7 set output 'build/gnuplot/direction-dist.svg'
      8 set xlabel 'θ' offset 0,1.0
      9 set xrange [-180:180]
     10 set xtics -180,90
     11 set yrange [0:2]
     12 set rmargin 1.5
     13 set tmargin 2
     14 set title offset 0,-1
     15 set multiplot layout 1,2
     16 positive(x) = x<0 ? (1/0) : x
     17 negative(x) = x>0 ? (1/0) : x
     18 round(x) = floor(x+0.5)
     19 rad2deg(rad) = (rad * 180) / pi
     20 
     21 filename = sprintf('build/direction/vonmises/%d', direction_rmse_max_timestamp)
     22 set lmargin 5
     23 set title sprintf("%s–%s\nNRMSE = %.0f%%, mean speed = %.1fm/s", \
     24         strftime('%F %H:%M', direction_rmse_max_timestamp),\
     25         strftime('%H:%M', direction_rmse_max_timestamp+2*60*60),\
     26         round(direction_rmse_max*100), direction_rmse_max_speed)
     27 plot \
     28 filename index 0 using (rad2deg($1)):2 every 5 with points pt 6 lc '#404040' title 'Observed PDF of υ_x',\
     29 '' index 0 using (positive(rad2deg($1))):3 with lines lw 2 lc '#c04040' title 'Estimated PDF of positive υ_x',\
     30 '' index 0 using (negative(rad2deg($1))):3 with lines lw 2 lc '#4040c0' title 'Estimated PDF of negative υ_x'
     31 
     32 filename = sprintf('build/direction/vonmises/%d', direction_rmse_min_timestamp)
     33 set lmargin 5
     34 set title sprintf("%s–%s\nNRMSE = %.0f%%, mean speed = %.1fm/s", \
     35         strftime('%F %H:%M', direction_rmse_min_timestamp),\
     36         strftime('%H:%M', direction_rmse_min_timestamp+2*60*60),\
     37         round(direction_rmse_min*100), direction_rmse_min_speed)
     38 plot \
     39 filename index 0 using (rad2deg($1)):2 every 5 with points pt 6 lc '#404040' title 'Observed PDF of υ_x',\
     40 '' index 0 using (positive(rad2deg($1))):3 with lines lw 2 lc '#c04040' title 'Estimated PDF of positive υ_x',\
     41 '' index 0 using (negative(rad2deg($1))):3 with lines lw 2 lc '#4040c0' title 'Estimated PDF of negative υ_x'