Commit c62e748e authored by Philippe SWARTVAGHER's avatar Philippe SWARTVAGHER
Browse files

plot_model.py: put legend below stacked plots

parent 9fc16ae9
......@@ -235,11 +235,14 @@ for numa_comp in range(topo.nb_numa_nodes_total):
plt.plot(real_x_values, comp_values_model, "+", color=next(colors), label="Computations (with communications) - model")
plt.plot(real_x_values, [sum(x) for x in zip(comp_values_model, comm_values_model)], "+", color=next(colors), label="Communications (with computations) - model")
plt.plot(real_x_values, total_model, "+", color=next(colors), label="Total - model")
ax.legend()
handles, labels = ax.get_legend_handles_labels()
legend_order = [1, 2, 0]
ax.legend([handles[i] for i in legend_order], [labels[i] for i in legend_order], loc="upper center", bbox_to_anchor=(0.5, -0.15), ncol=2)
ax.grid(axis='y')
ax.xaxis.set_major_locator(MaxNLocator(integer=True))
ax.set_axisbelow(True)
ax.set(title=f"Comp {numa_comp} Comm {numa_comm}", xlabel="Number of computing Cores", ylabel="Memory Bandwidth (MB/s)")
plt.subplots_adjust(bottom=0.22)
plt.savefig(f"{cli_args.comp_kernel}/comp_{numa_comp}_comm_{numa_comm}_stacked{picture_file_suffix}")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment