From 7e37f5bca1fae303e8483f4cb75f54f1969ab3e8 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Thu, 22 Feb 2024 14:37:18 -0800 Subject: [PATCH] more tweaks --- .../massive_star/analysis/massive_star_multi.py | 4 ++-- .../massive_star/analysis/massive_star_sequence.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Exec/science/massive_star/analysis/massive_star_multi.py b/Exec/science/massive_star/analysis/massive_star_multi.py index 3d58ee29cb..9d19fad4c5 100755 --- a/Exec/science/massive_star/analysis/massive_star_multi.py +++ b/Exec/science/massive_star/analysis/massive_star_multi.py @@ -87,7 +87,7 @@ def make_plot(plotfile, prefix="plot", width_frac=0.1, cbar_location=cbar_location, cbar_pad="2%") fig.subplots_adjust(left=0.05, right=0.95, bottom=0.025, top=0.975) - fig.text(0.02, 0.02, f"$t - \\tau_\\mathrm{{drive}}$ = {float(ds.current_time) - t_drive:8.2f} s", + fig.text(0.02, 0.02, f"$t - \\tau_\\mathrm{{drive}}$ = {float(ds.current_time) - t_drive:6.1f} s", transform=fig.transFigure) fig.set_size_inches(size) fig.tight_layout() @@ -95,7 +95,7 @@ def make_plot(plotfile, prefix="plot", width_frac=0.1, if layout[0] >= layout[1]: extra = "_vertical" - fig.savefig(f"{prefix}_{os.path.basename(plotfile)}_w{width_frac:04.2f}{extra}.pdf", pad_inches=0) + fig.savefig(f"{prefix}_{os.path.basename(plotfile)}_w{width_frac:04.2f}{extra}.pdf", pad_inches=0.1, bbox_inches="tight") if __name__ == "__main__": diff --git a/Exec/science/massive_star/analysis/massive_star_sequence.py b/Exec/science/massive_star/analysis/massive_star_sequence.py index 97d83fdcaa..8d430975e6 100755 --- a/Exec/science/massive_star/analysis/massive_star_sequence.py +++ b/Exec/science/massive_star/analysis/massive_star_sequence.py @@ -51,7 +51,7 @@ def make_plot(field, pfiles, *, ncols = len(pfiles) grid = ImageGrid(fig, 111, nrows_ncols=(nrows, ncols), - axes_pad=0.3, cbar_pad=0.05, + axes_pad=0.2, cbar_pad=0.05, label_mode="L", cbar_mode="single") # get some metadata @@ -78,7 +78,7 @@ def make_plot(field, pfiles, *, f = field - if f == "Temp": + if f == "Temp" or f == "abar": text_color = "white" else: text_color = "black" @@ -130,7 +130,7 @@ def make_plot(field, pfiles, *, if f == "enuc": # now do a contour of NSE if ("boxlib", "in_nse") in ds.derived_field_list: - sp.annotate_contour("in_nse", ncont=1, clim=(0.5, 0.5), take_log=False, + sp.annotate_contour("in_nse", levels=1, clim=(0.5, 0.5), take_log=False, plot_args={"colors": "k", "linewidths": 2}) sp.set_axes_unit("cm") @@ -150,7 +150,7 @@ def make_plot(field, pfiles, *, fig.tight_layout() extra = "" - fig.savefig(f"massive_star_{f}_w{width_frac:04.2f}.pdf", pad_inches=0) + fig.savefig(f"massive_star_{f}_w{width_frac:04.2f}.pdf", pad_inches=0.1, bbox_inches="tight") if __name__ == "__main__": @@ -168,7 +168,7 @@ def make_plot(field, pfiles, *, args = p.parse_args() if args.vertical: - size = (7.5, 11.0) + size = (7.5, 8.5) else: size = (19.2, 8.5)