Skip to content

Commit

Permalink
fix plot
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Jan 4, 2025
1 parent 9a631f7 commit 02478f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Binary file modified Docs/source/state.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions unit_test/burn_cell/plot_burn_cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ def doit(state_file, xmin, n_plot, outfile):
fig , (ax1, ax2) = plt.subplots(2, 1, sharex=True)

ax1.plot(data["Time"], data["Temperature"])
ax1.set_xscale("log")

# the first time point is t = 0, which doesn't work well
# on a logscale for x, so we use symlog to transition
# to log at the second time point
ax1.set_xscale("symlog", linthresh=data["Time"][1])
ax1.grid(ls=":")

ax1.set_ylabel("temperature [K]")
Expand All @@ -31,7 +35,7 @@ def doit(state_file, xmin, n_plot, outfile):
for n in range(n_plot):
ax2.plot(data["Time"], data[abundant[n]], label=abundant[n])

ax2.set_xscale("log")
ax2.set_xscale("symlog", linthresh=data["Time"][1])
ax2.set_yscale("log")
ax2.set_ylim(xmin, 1.5)
ax2.grid(ls=":")
Expand Down

0 comments on commit 02478f9

Please sign in to comment.