Skip to content

Commit

Permalink
Merge pull request #24 from fusion-energy/unit_fix_for_axis
Browse files Browse the repository at this point in the history
Unit fix for axis
  • Loading branch information
shimwell committed Sep 5, 2022
2 parents bcfb99e + 9dd5d36 commit 109d3a2
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions openmc_depletion_plotter/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def plot_activity_vs_time(
x_scale="log",
y_scale="log",
title="Activity of nuclides in material",
x_axis_title=None, # defaults to time with time units
x_axis_title=None, # defaults to time with time units
horizontal_lines=[],
plotting_backend="plotly",
units="Bq/g",
Expand Down Expand Up @@ -59,7 +59,11 @@ def plot_activity_vs_time(
figure.update_layout(
title=title,
xaxis={"title": x_axis_title, "type": x_scale},
yaxis={"title": "Activity [Bq/g]", "type": y_scale},
yaxis={
"title": f"Activity [{units}]",
"type": y_scale,
"exponentformat": 'e'
},
)

if threshold:
Expand Down Expand Up @@ -158,7 +162,11 @@ def plot_atoms_vs_time(
figure.update_layout(
title=title,
xaxis={"title": x_axis_title, "type": x_scale},
yaxis={"title": "Number of atoms", "type": y_scale},
yaxis={
"title": "Number of atoms",
"type": y_scale,
"exponentformat": 'e'
},
)
if threshold:
total = (
Expand Down

0 comments on commit 109d3a2

Please sign in to comment.