From 51babd69782c7282e92420dd5279a99a49f55b92 Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Sun, 13 Nov 2016 21:54:12 -0500 Subject: [PATCH 1/2] Minor ylabel changes --- openmc/plotter.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/openmc/plotter.py b/openmc/plotter.py index 09b7b1bf8..31fb57f5e 100644 --- a/openmc/plotter.py +++ b/openmc/plotter.py @@ -61,7 +61,7 @@ PLOT_TYPES_OP = {'total': (np.add,), 'capture': (), 'nu-fission': (), 'nu-scatter': (np.add,) * (len(PLOT_TYPES_MT['nu-scatter']) - 1), 'unity': (), - 'slowing-down power': + 'slowing-down power': (np.add,) * (len(PLOT_TYPES_MT['slowing-down power']) - 2) + (np.multiply,), 'damage': ()} @@ -197,9 +197,20 @@ def plot_xs(this, types, divisor_types=None, temperature=294., axis=None, ax.set_xlabel('Energy [eV]') if divisor_types: - ax.set_ylabel('Data') + if data_type == 'nuclide': + ylabel = 'Nuclidic Microscopic Data' + elif data_type == 'element': + ylabel = 'Elemental Microscopic Data' + elif data_type == 'material': + ylabel = 'Macroscopic Data' else: - ax.set_ylabel('Cross Section [b]') + if data_type == 'nuclide': + ylabel = 'Microscopic Cross Section [b]' + elif data_type == 'element': + ylabel = 'Elemental Cross Section [b]' + elif data_type == 'material': + ylabel = 'Macroscopic Cross Section [1/cm]' + ax.set_ylabel(ylabel) ax.legend(loc='best') ax.set_xlim(energy_range) if this.name is not None: From a428ccb2315ba6b362475890ef8f838f5d0077f9 Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Sun, 13 Nov 2016 21:54:36 -0500 Subject: [PATCH 2/2] And one minor editorial :-( --- openmc/plotter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmc/plotter.py b/openmc/plotter.py index 31fb57f5e..b8eda28e6 100644 --- a/openmc/plotter.py +++ b/openmc/plotter.py @@ -5,7 +5,7 @@ import numpy as np import openmc.checkvalue as cv import openmc.data -# Supported keywords for material xs plotting +# Supported keywords for xs plotting PLOT_TYPES = ['total', 'scatter', 'elastic', 'inelastic', 'fission', 'absorption', 'capture', 'nu-fission', 'nu-scatter', 'unity', 'slowing-down power', 'damage']