From eac7769abf1ea05d78c525d38f15613d93fae925 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Mon, 10 Jun 2019 15:38:17 +0200 Subject: Improve plot output --- codegen_lbm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codegen_lbm.py b/codegen_lbm.py index 8e7b0a7..29c2dad 100644 --- a/codegen_lbm.py +++ b/codegen_lbm.py @@ -189,8 +189,9 @@ class D2Q9_BGK_Lattice: for x in range(1,self.nX-1): density[y-1,x-1] = self.np_moments[0,self.idx(x,y)] + plt.figure(figsize=(10, 10)) plt.imshow(density, vmin=0.2, vmax=2.0, cmap=plt.get_cmap("seismic")) - plt.savefig("result/density_" + str(i) + ".png") + plt.savefig("result/density_" + str(i) + ".png", bbox_inches='tight', pad_inches=0) def MLUPS(cells, steps, time): -- cgit v1.2.3