diff --git a/wasm/test/script.py b/wasm/test/script.py index 5f783d9d6..30218c63e 100755 --- a/wasm/test/script.py +++ b/wasm/test/script.py @@ -21,15 +21,16 @@ data[benchmark_name] = (commands, means) # Prepare the plot -fig, ax = plt.subplots(figsize=(10, 6)) +fig, ax = plt.subplots(figsize=(12, 6)) benchmarks = list(data.keys()) commands = data[benchmarks[0]][0] # Get the list of tools from the first benchmark num_benchmarks = len(benchmarks) num_commands = len(commands) -# Set bar width and positions -bar_width = 0.2 -x = np.arange(num_benchmarks) +# Set bar width and positions with additional space between groups +bar_width = 0.15 +group_gap = 0.4 # Gap between benchmark groups +x = np.arange(num_benchmarks) * (num_commands * bar_width + group_gap) # Plot bars for each command for i, command in enumerate(commands): @@ -42,7 +43,7 @@ ax.set_xticklabels(benchmarks, rotation=45, ha='right') ax.set_ylabel('Execution Time (s)') ax.legend(title="Tool") -plt.title("Benchmark Execution Times for Various Tools") +plt.title("Benchmark Execution Times for Various OCaml compilers") plt.tight_layout() # Save as SVG