diff --git a/openmc/plotter.py b/openmc/plotter.py index e53b885f6db..b69224b7038 100644 --- a/openmc/plotter.py +++ b/openmc/plotter.py @@ -1,5 +1,6 @@ from itertools import chain from numbers import Integral, Real +from typing import Dict, Iterable, List import numpy as np @@ -120,10 +121,21 @@ def _get_title(reactions): return 'Cross Section Plot' -def plot_xs(reactions, divisor_types=None, temperature=294., axis=None, - sab_name=None, ce_cross_sections=None, mg_cross_sections=None, - enrichment=None, plot_CE=True, orders=None, divisor_orders=None, - energy_axis_units="eV", **kwargs): +def plot_xs( + reactions: Dict[str, openmc.Material | List[str]], + divisor_types: Iterable[str] | None = None, + temperature: float = 294.0, + axis: "plt.Axes" | None = None, + sab_name: str | None = None, + ce_cross_sections: str | None = None, + mg_cross_sections: str | None = None, + enrichment: float | None = None, + plot_CE: bool = True, + orders: Iterable[int] | None = None, + divisor_orders: Iterable[int] | None = None, + energy_axis_units: str = "eV", + **kwargs, +) -> "plt.Figure": """Creates a figure of continuous-energy cross sections for this item. Parameters