diff --git a/nr_wg_mtu_finder/plot.py b/nr_wg_mtu_finder/plot.py index efbc8b4..1c7ae50 100644 --- a/nr_wg_mtu_finder/plot.py +++ b/nr_wg_mtu_finder/plot.py @@ -9,22 +9,18 @@ def create_heatmap_from_log(log_filepath, heatmap_filepath): df = pd.read_csv(log_filepath) ax = axes[0, 0] - dfx = df.pivot( - index="server_mtu", - columns="peer_mtu", - values="upload_rcv_mbps", - ) + dfx = df.pivot(index="server_mtu", columns="peer_mtu", values="upload_rcv_mbps") sns.heatmap( dfx.values, linewidth=0.5, ax=ax, cmap="Greens_r", - xticklabels=list(dfx.index), - yticklabels=list(dfx.columns), + xticklabels=list(dfx.columns), + yticklabels=list(dfx.index), ) ax.tick_params(axis="x", rotation=45) ax.tick_params(axis="y", rotation=0) - ax.set(xlabel="Server MTU", ylabel="Peer MTU") + ax.set(ylabel="Server MTU", xlabel="Peer MTU") ax.set_title("Upload Rcv Bandwidth (Mbps)") ax.invert_yaxis() @@ -35,12 +31,12 @@ def create_heatmap_from_log(log_filepath, heatmap_filepath): linewidth=0.5, ax=ax, cmap="Greens_r", - xticklabels=list(dfx.index), - yticklabels=list(dfx.columns), + xticklabels=list(dfx.columns), + yticklabels=list(dfx.index), ) ax.tick_params(axis="x", rotation=45) ax.tick_params(axis="y", rotation=0) - ax.set(xlabel="Server MTU", ylabel="Peer MTU") + ax.set(ylabel="Server MTU", xlabel="Peer MTU") ax.set_title("Upload Send Bandwidth (Mbps)") ax.invert_yaxis() @@ -51,12 +47,12 @@ def create_heatmap_from_log(log_filepath, heatmap_filepath): linewidth=0.5, ax=ax, cmap="Greens_r", - xticklabels=list(dfx.index), - yticklabels=list(dfx.columns), + xticklabels=list(dfx.columns), + yticklabels=list(dfx.index), ) ax.tick_params(axis="x", rotation=45) ax.tick_params(axis="y", rotation=0) - ax.set(xlabel="Server MTU", ylabel="Peer MTU") + ax.set(ylabel="Server MTU", xlabel="Peer MTU") ax.set_title("Download Rcv Bandwidth (Mbps)") ax.invert_yaxis() @@ -67,12 +63,12 @@ def create_heatmap_from_log(log_filepath, heatmap_filepath): linewidth=0.5, ax=ax, cmap="Greens_r", - xticklabels=list(dfx.index), - yticklabels=list(dfx.columns), + xticklabels=list(dfx.columns), + yticklabels=list(dfx.index), ) ax.tick_params(axis="x", rotation=45) ax.tick_params(axis="y", rotation=0) - ax.set(xlabel="Server MTU", ylabel="Peer MTU") + ax.set(ylabel="Server MTU", xlabel="Peer MTU") ax.set_title("Download Send Bandwidth (Mbps)") ax.invert_yaxis()