get_data_plot_prefs
- sherpa.astro.ui.get_data_plot_prefs(id: IdType | None = None) PrefsType
Return the preferences for plot_data.
The plot preferences may depend on the data set, so it is now an optional argument. The
get_plot_prefsroutine should be used instead.Changed in version 4.12.2: The id argument has been given.
- 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.
- id
- Returns:
- prefs
dict Changing the values of this dictionary will change any new data plots. This dictionary will be empty if no plot backend is available.
- prefs
See also
Notes
These preferences are used by the following commands:
plot_data,plot_bkg,plot_ratio, 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_plot_prefs.Examples
After these commands, any data plot will use a green symbol and not display Y error bars.
>>> prefs = get_data_plot_prefs() >>> prefs['color'] = 'green' >>> prefs['yerrorbars'] = False