From 5f323cf19217d4860d2aab4fd77c9a538b594747 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Thu, 19 Oct 2023 00:35:43 +0200 Subject: horizontal close plots --- plotter/horizontal.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plotter/horizontal.py') diff --git a/plotter/horizontal.py b/plotter/horizontal.py index fa5f9df..8f84cbb 100755 --- a/plotter/horizontal.py +++ b/plotter/horizontal.py @@ -5,6 +5,7 @@ import json import xarray as xr import numpy as np +import matplotlib.pyplot as plt from metpy.plots import MapPanel, PanelContainer, RasterPlot, ContourPlot import misc @@ -72,11 +73,13 @@ def _plot(data, output, name, layers, area = None): pc = PanelContainer() pc.size = (12.8, 9.6) + #pc.figure.layout='constrained' pc.panels = [panel] pc.draw() #pc.show() outname = f'{name}_{init_for_filename}+{hours_since_init_str}.png' pc.save(os.path.join(output, outname)) + plt.close('all') index.append( { -- cgit v1.2.3