diff --git a/modules/aeolus/aeolus_amv.py b/modules/aeolus/aeolus_amv.py index dcb9dbdf8a095cb88c1e2a6b957e797badfc7e7b..bd0aca0936af0e581838a0eb5b9458e5a5b559a9 100644 --- a/modules/aeolus/aeolus_amv.py +++ b/modules/aeolus/aeolus_amv.py @@ -1141,7 +1141,7 @@ def compare_amvs_bestfit(amvs, bfs, bin_size=200): return bin_ranges, bin_pres, bin_spd, bin_dir -def make_plot(bin_ranges, bin_values): +def make_plot(bin_ranges, bin_values, title='ACHA - RAOB BestFit', colors=['blue', 'red', 'black'], line_labels=['ICE', 'NOT ICE', 'ALL']): bin_vals_r = bin_values[0] bin_vals_g = bin_values[1] @@ -1191,17 +1191,16 @@ def make_plot(bin_ranges, bin_values): bias.append(np.average(bin_vals[i])) std.append(np.std(bin_vals[i])) - title='ACHA - RAOB BestFit' x_axis_label = 'STD (deg)' - do_plot(x_values, [std_r, std_g, std], ['ICE', 'NOT ICE', 'ALL'], ['blue', 'red', 'black'], title=title, x_axis_label=x_axis_label, y_axis_label='hPa', invert=True, flip=True) + do_plot(x_values, [std_r, std_g, std], line_labels, colors, title=title, x_axis_label=x_axis_label, y_axis_label='hPa', invert=True, flip=True) x_axis_label = 'BIAS (deg)' - do_plot(x_values, [bias_r, bias_g, bias], ['ICE', 'NOT ICE', 'ALL'], ['blue', 'red', 'black'], title=title, x_axis_label=x_axis_label, y_axis_label='hPa', invert=True, flip=True) + do_plot(x_values, [bias_r, bias_g, bias], line_labels, colors, title=title, x_axis_label=x_axis_label, y_axis_label='hPa', invert=True, flip=True) x_axis_label = 'MAD (deg)' - do_plot(x_values, [mad_r, mad_g, mad], ['ICE', 'NOT ICE', 'ALL'], ['blue', 'red', 'black'], title=title, x_axis_label=x_axis_label, y_axis_label='hPa', invert=True, flip=True) + do_plot(x_values, [mad_r, mad_g, mad], line_labels, colors, title=title, x_axis_label=x_axis_label, y_axis_label='hPa', invert=True, flip=True) - do_plot(x_values, [num_vals_r, num_vals_g, num_vals], ['ICE: '+str(num_r), 'NOT ICE: '+str(num_g), 'ALL: '+str(num)], ['blue', 'red', 'black'], title=title, x_axis_label='log(Count)', y_axis_label='hPa', invert=True, flip=True) + do_plot(x_values, [num_vals_r, num_vals_g, num_vals], ['ICE: '+str(num_r), 'NOT ICE: '+str(num_g), 'ALL: '+str(num)], colors, title=title, x_axis_label='log(Count)', y_axis_label='hPa', invert=True, flip=True) def make_plot2(bin_pres_r, bin_ranges):