openmc.plot_xs(this, types, divisor_types=None, temperature=294.0, data_type=None, axis=None, sab_name=None, ce_cross_sections=None, mg_cross_sections=None, enrichment=None, plot_CE=True, orders=None, divisor_orders=None, **kwargs)[source]

Creates a figure of continuous-energy cross sections for this item.

  • this (str or openmc.Material) – Object to source data from

  • types (Iterable of values of PLOT_TYPES) – The type of cross sections to include in the plot.

  • divisor_types (Iterable of values of PLOT_TYPES, optional) – Cross section types which will divide those produced by types before plotting. A type of ‘unity’ can be used to effectively not divide some types.

  • temperature (float, optional) – Temperature in Kelvin to plot. If not specified, a default temperature of 294K will be plotted. Note that the nearest temperature in the library for each nuclide will be used as opposed to using any interpolation.

  • data_type ({'nuclide', 'element', 'material', 'macroscopic'}, optional) – Type of object to plot. If not specified, a guess is made based on the this argument.

  • axis (matplotlib.axes, optional) – A previously generated axis to use for plotting. If not specified, a new axis and figure will be generated.

  • sab_name (str, optional) – Name of S(a,b) library to apply to MT=2 data when applicable; only used for items which are instances of openmc.Element or openmc.Nuclide

  • ce_cross_sections (str, optional) – Location of cross_sections.xml file. Default is None.

  • mg_cross_sections (str, optional) – Location of MGXS HDF5 Library file. Default is None.

  • enrichment (float, optional) – Enrichment for U235 in weight percent. For example, input 4.95 for 4.95 weight percent enriched U. Default is None. This is only used for items which are instances of openmc.Element

  • plot_CE (bool, optional) – Denotes whether or not continuous-energy will be plotted. Defaults to plotting the continuous-energy data.

  • orders (Iterable of Integral, optional) – The scattering order or delayed group index to use for the corresponding entry in types. Defaults to the 0th order for scattering and the total delayed neutron data. This only applies to plots of multi-group data.

  • divisor_orders (Iterable of Integral, optional) – Same as orders, but for divisor_types

  • **kwargs – All keyword arguments are passed to matplotlib.pyplot.figure().


fig – If axis is None, then a Matplotlib Figure of the generated cross section will be returned. Otherwise, a value of None will be returned as the figure and axes have already been generated.

Return type