plot_data¶
-
sherpa.astro.ui.
plot_data
(id=None, **kwargs)¶ Plot the data values.
Parameters: - id (int or str, optional) – The data set that provides the data. If not given then the default identifier is used, as returned by get_default_id.
- replot (bool, optional) – Set to
True
to use the values calculated by the last call to plot_data. The default isFalse
. - overplot (bool, optional) – If
True
then add the data to an exsiting plot, otherwise create a new plot. The default isFalse
.
See also
get_data_plot()
- Return the data used by plot_data.
get_data_plot_prefs()
- Return the preferences for plot_data.
get_default_id()
- Return the default data set identifier.
plot()
- Create one or more plot types.
sherpa.astro.ui.set_analysis()
- Set the units used when fitting and displaying spectral data.
set_xlinear()
- New plots will display a linear X axis.
set_xlog()
- New plots will display a logarithmically-scaled X axis.
set_ylinear()
- New plots will display a linear Y axis.
set_ylog()
- New plots will display a logarithmically-scaled Y axis.
Examples
Plot the data from the default data set:
>>> plot_data()
Plot the data from data set 1:
>>> plot_data(1)
Plot the data from data set labelled “jet” and then overplot the “core” data set. The set_xlog command is used to select a logarithmic scale for the X axis.
>>> set_xlog("data") >>> plot_data("jet") >>> plot_data("core", overplot=True)