From c4cad38409e9246a40b83d7a5e6df7d3170f9277 Mon Sep 17 00:00:00 2001 From: Fontrodona Nicolas <nicolas.fontrodona@ens-lyon.fr> Date: Tue, 12 Jan 2021 15:32:18 +0100 Subject: [PATCH] src/find_interaction_cluster/community_figures/fig_functions.py: closing figures after their creation --- .../community_figures/fig_functions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/find_interaction_cluster/community_figures/fig_functions.py b/src/find_interaction_cluster/community_figures/fig_functions.py index e2a09988..15083450 100644 --- a/src/find_interaction_cluster/community_figures/fig_functions.py +++ b/src/find_interaction_cluster/community_figures/fig_functions.py @@ -15,6 +15,7 @@ from statsmodels.stats.multitest import multipletests import numpy as np from ..radomization_test_ppi import get_pvalue import seaborn as sns +import matplotlib.pyplot as plt def get_community_table(communities: List[List[str]], @@ -358,6 +359,7 @@ def make_barplot(df_bar: pd.DataFrame, outfile: Path, ha='center', va='center', xytext=(0, 10), fontsize=12, textcoords='offset points') g.savefig(outfile) + plt.close() def make_barplot_perm(df_bar: pd.DataFrame, outfile: Path, @@ -415,6 +417,7 @@ def make_barplot_perm(df_bar: pd.DataFrame, outfile: Path, ha='center', va='center', xytext=(0, 10), fontsize=12, textcoords='offset points') g.savefig(outfile) + plt.close() def barplot_creation(df_bar: pd.DataFrame, outfig: Path, -- GitLab