1
Fork 0

Default figsize for max fig in animate

This commit is contained in:
Edgar P. Burkhart 2022-05-09 13:21:11 +02:00
parent 69b1f378e9
commit 5d47812d4f
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -61,7 +61,7 @@ AW[:, iz0[idz0], ix0[idx0]] = model.fields["alpha.water"]
U = np.full((model.t.size, *X.shape), np.nan) U = np.full((model.t.size, *X.shape), np.nan)
U[:, iz0[idz0], ix0[idx0]] = np.linalg.norm(model.fields["U"], axis=1) U[:, iz0[idz0], ix0[idx0]] = np.linalg.norm(model.fields["U"], axis=1)
fig = plt.figure(figsize=(19.2, 10.8), dpi=100) fig = plt.figure()
gs = GridSpec(3, 1, figure=fig, height_ratios=[1, 0.05, 0.05]) gs = GridSpec(3, 1, figure=fig, height_ratios=[1, 0.05, 0.05])
ax = fig.add_subplot(gs[0]) ax = fig.add_subplot(gs[0])
cax1 = fig.add_subplot(gs[1]) cax1 = fig.add_subplot(gs[1])
@ -92,7 +92,7 @@ ax.set(xlabel="x (m)", ylabel="z (m)", aspect="equal", facecolor="#000000")
ax.grid(c="k", alpha=0.2) ax.grid(c="k", alpha=0.2)
figU = plt.figure(figsize=(19.2, 10.8), dpi=100) figU = plt.figure()
gsU = GridSpec( gsU = GridSpec(
2 if args.max else 3, 2 if args.max else 3,
1, 1,
@ -138,6 +138,9 @@ if args.max:
fig.savefig(out.joinpath("max_aw.pdf")) fig.savefig(out.joinpath("max_aw.pdf"))
figU.savefig(out.joinpath("max_U.pdf")) figU.savefig(out.joinpath("max_U.pdf"))
else: else:
fig.set(figwidth=19.2, figheight=10.8, dpi=100)
figU.set(figwidth=19.2, figheight=10.8, dpi=100)
figU.colorbar(ur_m, label=r"$U_a$", cax=caxu2, shrink=0.6, orientation="horizontal") figU.colorbar(ur_m, label=r"$U_a$", cax=caxu2, shrink=0.6, orientation="horizontal")
tit = ax.text( tit = ax.text(