From b278f8be216d2dfaa8ea3a0fc2b00cc1d6607bcd Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Mon, 5 Sep 2022 12:25:01 +0100 Subject: [PATCH 1/2] using units for dynamic axis --- openmc_depletion_plotter/results.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openmc_depletion_plotter/results.py b/openmc_depletion_plotter/results.py index cf77a2d..ed46818 100644 --- a/openmc_depletion_plotter/results.py +++ b/openmc_depletion_plotter/results.py @@ -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", @@ -59,7 +59,7 @@ 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}, ) if threshold: From 9dd5d360d11dc06fac333e49d6104c8c75af2fbc Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Mon, 5 Sep 2022 12:33:27 +0100 Subject: [PATCH 2/2] using exponentformat e --- openmc_depletion_plotter/results.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/openmc_depletion_plotter/results.py b/openmc_depletion_plotter/results.py index ed46818..954eb4c 100644 --- a/openmc_depletion_plotter/results.py +++ b/openmc_depletion_plotter/results.py @@ -59,7 +59,11 @@ def plot_activity_vs_time( figure.update_layout( title=title, xaxis={"title": x_axis_title, "type": x_scale}, - yaxis={"title": f"Activity [{units}]", "type": y_scale}, + yaxis={ + "title": f"Activity [{units}]", + "type": y_scale, + "exponentformat": 'e' + }, ) if threshold: @@ -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 = (