import matplotlib.pyplot as plt import numpy as np # Data categories = ['Negligible Local Waveguide Delay', 'With Local Waveguide Delay'] no_input_reuse_time = [3452965, 6839776] no_input_reuse_throughput = [740960/3452965, 740960/6839776] input_reuse_time = [1814173, 3380300] input_reuse_throughput = [558872/1814173, 558872/3380300] x = np.arange(len(categories)) # the label locations fig, axes = plt.subplots(2, 2, figsize=(12, 10)) # Graph 1: No Input Reuse - Time axes[0, 0].bar(categories, no_input_reuse_time, color='blue') axes[0, 0].set_title("No Input Reuse - Time") axes[0, 0].set_ylabel("Time (ns)") # Graph 2: No Input Reuse - Throughput axes[0, 1].bar(categories, [val * 1e6 for val in no_input_reuse_throughput], color='lightblue') axes[0, 1].set_title("No Input Reuse - Throughput") axes[0, 1].set_ylabel("Throughput (scaled *10^6)") # Graph 3: Input Reuse - Time axes[1, 0].bar(categories, input_reuse_time, color='green') axes[1, 0].set_title("Input Reuse - Time") axes[1, 0].set_ylabel("Time (ns)") # Graph 4: Input Reuse - Throughput axes[1, 1].bar(categories, [val * 1e6 for val in input_reuse_throughput], color='lightgreen') axes[1, 1].set_title("Input Reuse - Throughput") axes[1, 1].set_ylabel("Throughput (scaled *10^6)") plt.tight_layout() plt.show()