# set terminal pngcairo  transparent enhanced font "arial,10" fontscale 1.0 size 500, 350 
# set output 'stats.2.png'
set key inside left top vertical Left noreverse enhanced autotitles nobox
set label 1 "min" at 2.07944, graph 0.1, 0 centre norotate back nopoint offset character 0, -1, 0
set label 2 "max" at 2.30259, graph 0.9, 0 centre norotate back nopoint offset character 0, 1, 0
set arrow 1 from 2.07944, graph 0.1, 0 to 2.07944, 2.20087, 0 head back filled linetype -1 linewidth 1.000
set arrow 2 from 2.30259, graph 0.9, 0 to 2.30259, 3.13972, 0 head back filled linetype -1 linewidth 1.000
set offsets 0, 0, 0.5, 0.5
set style data lines
set title "Use of stats command to find min/max/mean before plotting\nTwo data columns" 
f(x) = log(1+x)
A_records = 20.0
A_invalid = 0.0
A_blank = 1.0
A_blocks = 1.0
A_outofrange = 0.0
A_mean = 2.54077965
A_stddev = 0.222745079388135
A_sum = 50.815593
A_sumsq = 130.103532004915
A_min = 2.20087
A_max = 3.139718
A_median = 2.4609945
A_lo_quartile = 2.3865975
A_up_quartile = 2.6562155
A_index_min = 7.0
A_index_max = 9.0
GPFUN_f = "f(x) = log(1+x)"
B_records = 20.0
B_invalid = 0.0
B_blank = 1.0
B_blocks = 1.0
B_outofrange = 0.0
B_mean_x = 2.11678082303767
B_stddev_x = 0.792134394132666
B_sum_x = 42.3356164607535
B_sumsq_x = 102.16475902296
B_min_x = 0.0
B_max_x = 2.99573227355399
B_median_x = 2.35024018289621
B_lo_quartile_x = 1.70059869083108
B_up_quartile_x = 2.740319461671
B_index_min_x = 0.0
B_index_max_x = 19.0
B_mean_y = 2.54077965
B_stddev_y = 0.222745079388135
B_sum_y = 50.815593
B_sumsq_y = 130.103532004915
B_min_y = 2.20087
B_max_y = 3.139718
B_median_y = 2.4609945
B_lo_quartile_y = 2.3865975
B_up_quartile_y = 2.6562155
B_index_min_y = 7.0
B_index_max_y = 9.0
B_slope = -0.0669436711639173
B_intercept = 2.68248472934352
B_correlation = -0.23806759073696
B_sumxy = 106.725360630742
B_pos_min_y = 2.07944154167984
B_pos_max_y = 2.30258509299405
plot 'orbital_elements.dat' index 1 using (f($0)):2 title "  Data" lw 2,      B_mean_y title "  Mean",      B_slope * x + B_intercept title "Linear fit"