Skip to content

Commit

Permalink
more tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Feb 22, 2024
1 parent cafa622 commit 7e37f5b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Exec/science/massive_star/analysis/massive_star_multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ 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()
extra = ""
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__":
Expand Down
10 changes: 5 additions & 5 deletions Exec/science/massive_star/analysis/massive_star_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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")
Expand All @@ -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__":
Expand All @@ -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)

Expand Down

0 comments on commit 7e37f5b

Please sign in to comment.