From 9b7e626a8a0dc128b3b40a6c5bfd4511e5d77d4b Mon Sep 17 00:00:00 2001 From: Yuka Ikarashi Date: Thu, 7 Nov 2024 12:41:22 -0500 Subject: [PATCH] Adjust the width of level 2 p10 plots --- analytics_tools/graphing/graph.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/analytics_tools/graphing/graph.py b/analytics_tools/graphing/graph.py index 4b635bd..8620ede 100644 --- a/analytics_tools/graphing/graph.py +++ b/analytics_tools/graphing/graph.py @@ -291,12 +291,12 @@ def to_superscript(n): def plot_geomean_heatmap(level, bench_type, lib, heatmap_data): print(f"{level}, {bench_type}, {lib} ") + islevel2 = False if bench_type.name.find("skinny") != -1: plt.figure(figsize=(8 * (3.33 / 6), 3.9 * (3.33 / 6))) plt.subplots_adjust(bottom=0.22, left=0.17) elif bench_type.name.find("level_2") != -1: - plt.figure(figsize=(8 * (3.33 / 6), 13 * (3.33 / 6))) - plt.subplots_adjust(left=0.17, bottom=0.05, top=0.95) + islevel2 = True def aggregate(data): data = np.array(data) @@ -308,6 +308,14 @@ def aggregate(data): p10_ranges = powers_list(10, 9) for p, ranges in ((4, p4_ranges), (10, p10_ranges)): + if islevel2: + if p == 4: + plt.figure(figsize=(8 * (3.33 / 6), 13 * (3.33 / 6))) + plt.subplots_adjust(left=0.17, bottom=0.05, top=0.95) + else: + plt.figure(figsize=(6 * (3.33 / 6), 13 * (3.33 / 6))) + plt.subplots_adjust(left=0.24, bottom=0.05, top=0.95) + plt.clf() agg_heatmap_data = discretize_and_aggregate(heatmap_data, ranges, aggregate) data, sub_kernels, ranges = prepare_heatmap_data(agg_heatmap_data)