get_order_plot
- sherpa.astro.ui.get_order_plot(id: IdType | None = None, orders=None, recalc: bool = True, copy: bool = True)
Return the data used by plot_order.
Changed in version 4.19.0: The plot object is now copied by default. To get the previous behaviour set the
copyattribute toFalse.- Parameters:
- id
int,str,orNone,optional The data set that provides the data. If not given then the default identifier is used, as returned by
get_default_id.- orders
optional 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.
- recalcbool,
optional If
Falsethen the results from the last call toplot_order(orget_order_plot) are returned, otherwise the data is re-generated.- copybool,
optional Is the plot object copied before being returned? If so then the plot attributes will not be changed by multiple calls to this routine.
- id
- Returns:
- data
asherpa.astro.plot.OrderPlotinstance An object representing the data used to create the plot by
plot_order.
- data
See also
get_default_idReturn the default data set identifier.
plot_orderPlot the model for a data set convolved by the given response.
Examples
Retrieve the plot information for order 1 of the default data set and then display it:
>>> oplot = get_order_plot(orders=1) >>> print(oplot)
Return the plot data for orders 1 and 2 of data set ‘jet’, plot the first and then overplot the second:
>>> plots = get_order_plot('jet', orders=[1, 2]) >>> plots[0].plot() >>> plots[1].overplot()