From 3593f2ecd92800489022666682271d9409da051b Mon Sep 17 00:00:00 2001 From: Felix Blanke Date: Tue, 29 Aug 2023 10:12:04 +0200 Subject: [PATCH] Close figures --- wsgi.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wsgi.py b/wsgi.py index b2c4dab..31f9295 100644 --- a/wsgi.py +++ b/wsgi.py @@ -277,6 +277,8 @@ def tables( annotate_current=annotate_current, landesbez_str=landesbez_strs, ) + svg_string = convert_fig_to_svg(fig) + plt.close() _print_as_html(df_state) _print_as_html(df) @@ -285,7 +287,7 @@ def tables( "base.html", tables="\n".join(output_str), timestamp=timestamp, - image=convert_fig_to_svg(fig), + image=svg_string, )