From f8503e4f0a04212f27c23863d2bc344a684aff19 Mon Sep 17 00:00:00 2001 From: Andreas Tsouchlos Date: Mon, 5 Dec 2022 16:43:49 +0100 Subject: [PATCH] Deleted plot_heatmaps.py --- sw/plot_heatmaps.py | 79 --------------------------------------------- 1 file changed, 79 deletions(-) delete mode 100644 sw/plot_heatmaps.py diff --git a/sw/plot_heatmaps.py b/sw/plot_heatmaps.py deleted file mode 100644 index ead72ea..0000000 --- a/sw/plot_heatmaps.py +++ /dev/null @@ -1,79 +0,0 @@ -from itertools import chain -import seaborn as sns -import matplotlib.pyplot as plt -import pandas as pd -import numpy as np -from matplotlib.ticker import FormatStrFormatter - - -def format_yticks(previous_yticks): - result = [] - - for tick in previous_yticks: - result.append(f"{float(tick.get_text()):.2e}") - - return result - - -def main(): - sns.set_theme() - - # titles = [ - # "$n=7$, $m=4$", - # "$n=31$, $m=20$", - # "$n=31$, $m=5$", - # "$n=96$, $m=48$", - # "$n=204$, $m=102$", - # "$n=408$, $m=204$", - # ] - # - # filenames = [ - # "sim_results/2d_dec_fails_w_log_k_lin_bch_7_4alist.csv", - # "sim_results/2d_dec_fails_w_log_k_lin_bch_31_11alist.csv", - # "sim_results/2d_dec_fails_w_log_k_lin_bch_31_26alist.csv", - # "sim_results/2d_dec_fails_w_log_k_lin_963965alist.csv", - # "sim_results/2d_dec_fails_w_log_k_lin_20433486alist.csv", - # "sim_results/2d_dec_fails_w_log_k_lin_40833844alist.csv", - # ] - - titles = [ - "$n=7$, $m=4$", - "$n=31$, $m=20$", - "$n=31$, $m=5$", - "$n=96$, $m=48$" - ] - - filenames = [ - "sim_results/2d_dec_fails_w_log_k_lin_zoomed_in_bch_7_4alist.csv", - "sim_results/2d_dec_fails_w_log_k_lin_zoomed_in_bch_31_11alist.csv", - "sim_results/2d_dec_fails_w_log_k_lin_zoomed_in_bch_31_26alist.csv", - "sim_results/2d_dec_fails_w_log_k_lin_zoomed_in_963965alist.csv", - ] - - - fig, axes = plt.subplots(2, 2, squeeze=False) - - fig.suptitle("SNR = 3dB") - - fig.subplots_adjust(left=0.1, - bottom=0.1, - right=0.9, - top=0.9, - wspace=0.3, - hspace=0.4) - - axes = list(chain.from_iterable(axes))[ - :len(filenames)] # Flatten the 2d axes array - - for axis, title, filename in zip(axes, titles, filenames): - df = pd.read_csv(filename, index_col=0) - - sns.heatmap(ax=axis, data=df) - axis.set_yticklabels(format_yticks(axis.get_yticklabels())) - axis.set_title(title) - - plt.show() - - -if __name__ == "__main__": - main()