get_model_plot_prefs¶
- sherpa.astro.ui.get_model_plot_prefs(id=None)¶
Return the preferences for plot_model.
The plot preferences may depend on the data set, so it is now an optional argument.
Changed in version 4.12.2: The id argument has been given.
- 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.- Returns
prefs – Changing the values of this dictionary will change any new model plots. This dictionary will be empty if no plot backend is available.
- Return type
See also
plot_modelPlot the model for a data set.
set_xlinearNew plots will display a linear X axis.
set_xlogNew plots will display a logarithmically-scaled X axis.
set_ylinearNew plots will display a linear Y axis.
set_ylogNew plots will display a logarithmically-scaled Y axis.
Notes
The meaning of the fields depend on the chosen plot backend. A value of
Nonemeans to use the default value for that attribute, unless indicated otherwise. These preferences are used by the following commands:plot_model,plot_ratio,plot_bkg_model, and the “fit” variants, such asplot_fit,plot_fit_resid, andplot_bkg_fit.The preferences recognized by the matplotlib backend are the same as for
get_data_plot_prefs.Examples
After these commands, any model plot will use a green line to display the model:
>>> prefs = get_model_plot_prefs() >>> prefs['color'] = 'green'