get_model_plot_prefs¶
-
sherpa.ui.
get_model_plot_prefs
()¶ Return the preferences for plot_model.
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: dict See also
plot_model()
- Plot the model for a data set.
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.
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.errcolor
- The color to draw error bars. The default is
None
. errstyle
- How to draw errors. The default is
None
. errthickness
- What thickness of line to draw error bars. The default is
None
. linecolor
- What color to use for the line connecting the data points.
The default is
red
. linestyle
- How should the line connecting the data points be drawn.
The default is
1
, which means a solid line is drawn. linethickness
- What thickness should be used to draw the line connecting
the data points. The default is
3
. ratioline
- Should a horizontal line be drawn at y=1? The default is
False
. symbolcolor
- What color to draw the symbol representing the data points.
The default is
None
. symbolfill
- Should the symbol be drawn filled? The default is
True
. symbolsize
- What size is the symbol drawn. The default is
None
. symbolstyle
- What style is used for the symbols. The default is
0
, which means no symbol is used. xaxis
- The default is
False
xerrorbars
- Should error bars be drawn for the X axis. The default is
False
. xlog
- Should the X axis be drawn with a logarithmic scale? The
default is
False
. This field can also be changed with the set_xlog and set_xlinear functions. yerrorbars
- Should error bars be drawn for the Y axis. The default is
False
. ylog
- Should the Y axis be drawn with a logarithmic scale? The
default is
False
. This field can also be changed with the set_ylog and set_ylinear functions.
Examples
After these commands, any model plot will use a green line to display the model:
>>> prefs = get_model_plot_prefs() >>> prefs['linecolor'] = 'green'