Last modified: December 2023

URL: https://cxc.cfa.harvard.edu/sherpa/ahelp/get_model_plot_prefs.html
AHELP for CIAO 4.16 Sherpa

get_model_plot_prefs

Context: plotting

Synopsis

Return the preferences for plot_model.

Syntax

get_model_plot_prefs(id=None)

id - int or str, optional

Description

The plot preferences may depend on the data set, so it is now an optional argument.


Example

After these commands, any model plot will use a green line to display the model:

>>> prefs = get_model_plot_prefs()
>>> prefs['color'] = 'green'

PARAMETERS

The parameter for this function is:

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

Return value

The return value from this function is:

prefs -- Changing the values of this dictionary will change any new model plots. This dictionary will be empty if no plot backend is available.

Notes

The meaning of the fields depend on the chosen plot backend. A value of none means 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 as `plot_fit` , `plot_fit_resid` , and `plot_bkg_fit` .

The preferences recognized by the matplotlib backend are the same as for `get_data_plot_prefs` .

Changes in CIAO

Changed in CIAO 4.13

The id argument has been given.


Bugs

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

See Also

plotting
get_plot_prefs, plot_model