plot_order

sherpa.astro.ui.plot_order(id: IdType | IdTypes | None = None, orders=None, replot: bool = False, overplot: bool = False, clearwindow: bool = True, **kwargs) None

Plot the model for a data set convolved by the given response.

Some data sets - such as grating PHA data - can have multiple responses. The plot_order function acts like plot_model, in that it displays the model after passing through a response, but allows the user to select which response to use.

Changed in version 4.18.0: Multiple data sets can be displayed by using a list of identifiers. Per-plot options can now be given by using a list of values.

Parameters:
idint, str, sequence of int or str, or None, optional

The data set that provides the data. If not given then the default identifier is used, as returned by get_default_id.

ordersoptional

Which response to use. The argument can be a scalar or array, in which case multiple curves will be displayed. The default is to use all orders.

replotbool, optional

Set to True to use the values calculated by the last call to plot_model. The default is False.

overplotbool, optional

If True then add the data to an existing plot, otherwise create a new plot. The default is False.

clearwindowbool, optional

Should the existing plot area be cleared before creating this new plot (e.g. for multi-panel plots)?

See also

get_order_plot

Return the data used by plot_order.

plot

Create one or more plot types.

plot_model

Plot the model for a data set.

Examples

Display the source model convolved by the first response for the default data set:

>>> plot_order(orders=1)

Plot the source convolved through the first and second responses for the second data set (separate curves for each response):

>>> plot_order(2, orders=[1, 2])

Add the orders plot to a model plot:

>>> plot_model()
>>> plot_order(orders=[2, 3], overplot=True)