aboutsummaryrefslogtreecommitdiff
path: root/plotter
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2023-10-19 00:35:43 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2023-10-19 00:35:43 +0200
commit5f323cf19217d4860d2aab4fd77c9a538b594747 (patch)
tree28405859539072999eb89a80d8e7ce99e3ce71f8 /plotter
parentc8bea45ab34ea2b488112b73b5a00e2c81bcfd8e (diff)
downloadmeteo_toolbox-5f323cf19217d4860d2aab4fd77c9a538b594747.tar.gz
horizontal close plots
Diffstat (limited to 'plotter')
-rwxr-xr-xplotter/horizontal.py3
1 files changed, 3 insertions, 0 deletions
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(
{