From 4e5ccf921babbbd3a60beb9c9a74231df32ea01b Mon Sep 17 00:00:00 2001 From: leo-blc Date: Mon, 2 Dec 2024 11:54:59 +0100 Subject: [PATCH] adding coco_archive_plot --- code-preprocessing/.DS_Store | Bin 0 -> 6148 bytes .../archive-update/archive_plot.py | 160 ++++++++++++++++++ .../python/archive_load_data.py | 2 +- 3 files changed, 161 insertions(+), 1 deletion(-) create mode 100644 code-preprocessing/.DS_Store create mode 100644 code-preprocessing/archive-update/archive_plot.py diff --git a/code-preprocessing/.DS_Store b/code-preprocessing/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 0) + average_archive_size = np.nan_to_num(average_archive_size) + + eval_points = np.arange(1, len(average_archive_size)) + + plt.plot(eval_points, average_archive_size[1:], color=color, label=function_name) + + plt.legend(title="Function", loc="center left", bbox_to_anchor=(1.0, 0.5), fontsize="small", framealpha=0.5) + plt.grid(True, which="both", linestyle="--", linewidth=0.5) + + plot_filename = f"average_archive_size_{dimension}.png" + plt.savefig(os.path.join(output_dir, plot_filename), bbox_inches="tight") + plt.close() + print(f"Average plot for dimension {dimension} saved as {plot_filename}") + +if __name__ == "__main__": + plot_archive_size_by_dimension() + plot_average_archive_size_by_dimension() diff --git a/code-preprocessing/archive-update/python/archive_load_data.py b/code-preprocessing/archive-update/python/archive_load_data.py index 537745c..c9077c1 100755 --- a/code-preprocessing/archive-update/python/archive_load_data.py +++ b/code-preprocessing/archive-update/python/archive_load_data.py @@ -11,7 +11,7 @@ from itertools import groupby from operator import itemgetter -from .archive_exceptions import PreprocessingWarning, PreprocessingException +from archive_exceptions import PreprocessingWarning, PreprocessingException def get_file_name_list(paths, ending=None):