diff --git a/integration_tests/utils/compute_mse.jl b/integration_tests/utils/compute_mse.jl index c75d34c4c9..3aa28585d3 100644 --- a/integration_tests/utils/compute_mse.jl +++ b/integration_tests/utils/compute_mse.jl @@ -302,11 +302,11 @@ function compute_mse( end width_to_height_ratio = have_tc_main ? 15 / 10 : 15 / 10 - fig_height = 900 + fig_height = 1500 plot_attr[true]["contour_1_kwargs"] = ( bottom_margin = 0 * Plots.PlotMeasures.px, - left_margin = 30 * Plots.PlotMeasures.px, + left_margin = 40 * Plots.PlotMeasures.px, right_margin = 0 * Plots.PlotMeasures.px, top_margin = 0 * Plots.PlotMeasures.px, xticks = false, @@ -327,6 +327,7 @@ function compute_mse( plot_attr[true]["contour_3_kwargs"] = ( bottom_margin = 0 * Plots.PlotMeasures.px, left_margin = 0 * Plots.PlotMeasures.px, + right_margin = -20 * Plots.PlotMeasures.px, top_margin = 0 * Plots.PlotMeasures.px, xticks = false, yticks = false, @@ -395,7 +396,7 @@ function compute_mse( push!(table_best_mse, best_mse[tc_var]) end - save_plots(plot_dir, plots_dict; group_figs = group_figs, have_tc_main = have_tc_main, fig_height = fig_height) + save_plots(plot_dir, plots_dict; group_figs, have_tc_main, fig_height, case_name) # Tabulate output header = [ @@ -431,7 +432,7 @@ function compute_mse( return mse end -function save_plots(plot_dir, plots_dict; group_figs = true, have_tc_main, fig_height) +function save_plots(plot_dir, plots_dict; group_figs = true, have_tc_main, fig_height, case_name) vars_to_skip = [ "thetal_mean", "updraft_thetal", @@ -455,7 +456,24 @@ function save_plots(plot_dir, plots_dict; group_figs = true, have_tc_main, fig_h n_cols = 1 n_rows = ceil(Int, n_plots / n_cols) @info " Saving $(joinpath(plot_dir, "contours.png"))" - Plots.plot(all_contours...; layout = (n_rows, n_cols), framestyle = :box, margin = 20 * Plots.PlotMeasures.px) + title = Plots.plot( + title = case_name, + grid = false, + showaxis = false, + xticks = false, + yticks = false, + bottom_margin = -20 * Plots.PlotMeasures.px, + ) + layout = Plots.@layout [a{0.01h}; Plots.grid(n_rows, n_cols)] + + Plots.plot( + title, + all_contours...; + layout = layout, + framestyle = :box, + margin = 20 * Plots.PlotMeasures.px, + dpi = 200, + ) Plots.savefig(joinpath(plot_dir, "contours.png")) width_to_height_ratio = 15 / 10 @@ -470,14 +488,15 @@ function save_plots(plot_dir, plots_dict; group_figs = true, have_tc_main, fig_h for (k, I) in enumerate(CartesianIndices((1:n_cols, 1:n_rows))) k > length(all_profiles) && continue j, i = (Tuple(I)...,) - if j == 1 + if j == 1 # left plots Plots.plot!( all_profiles[k], + left_margin = 50 * Plots.PlotMeasures.px, bottom_margin = -2 * Plots.PlotMeasures.px, right_margin = -2 * Plots.PlotMeasures.px, top_margin = -2 * Plots.PlotMeasures.px, ) - elseif j == n_cols + elseif j == n_cols # right plots Plots.plot!( all_profiles[k], yticks = false, @@ -487,7 +506,7 @@ function save_plots(plot_dir, plots_dict; group_figs = true, have_tc_main, fig_h right_margin = -2 * Plots.PlotMeasures.px, top_margin = -2 * Plots.PlotMeasures.px, ) - else # middle plot + else # middle plots Plots.plot!( all_profiles[k], yticks = false, @@ -499,12 +518,23 @@ function save_plots(plot_dir, plots_dict; group_figs = true, have_tc_main, fig_h ) end end + title = Plots.plot( + title = case_name, + grid = false, + showaxis = false, + xticks = false, + yticks = false, + bottom_margin = -20 * Plots.PlotMeasures.px, + ) + layout = Plots.@layout [a{0.01h}; Plots.grid(n_rows, n_cols)] Plots.plot( + title, all_profiles...; - layout = Plots.grid(n_rows, n_cols), + layout = layout, size = (width_to_height_ratio * fig_height, fig_height), framestyle = :box, margin = 20 * Plots.PlotMeasures.px, + dpi = 200, ) Plots.savefig(joinpath(plot_dir, "profiles.png")) else