Switch off the drawing of error bars in Sherpa plots
set_erroff
set_xerroff
set_yerroff
These commands allow a user to turn off the drawing of error bars in
all Sherpa plots. A plotting command LPLOT needs to be
issued in order for these commands to take effect.
Errors bars can be turned on or off in plots (from LPLOT) by setting
the x_errorbars and y_errorbars fields in the corresponding Sherpa
configuration variable (also called "state object") sherpa.plot,
sherpa.dataplot, sherpa.fitplot,
or sherpa.resplot.
The functions set_erroff, set_xerroff,
and set_yerroff allow you to
change these fields in all the configuration variables
(sherpa.plot, sherpa.dataplot,
sherpa.fitplot, sherpa.resplot) in one go
as shown in the following table:
set_erroff
|
Set x_errorbars = 0 and y_errorbars = 0
|
set_xerroff
|
Set x_errorbars = 0
|
set_yerroff
|
Set y_errorbars = 0
|
This turns off the drawing of errorbars (both in x and
y directions) in all Sherpa plots.
This turns off the drawing of errorbars in only the x
direction in all Sherpa plots.
sherpa> set_yerroff
sherpa> print(sherpa.fitplot.y_errorbars)
0
sherpa> lplot 2 fit delchi
The first command (set_yerroff)
turns off the drawing of errorbars in only the y
direction in all Sherpa plots.
The second command prints out the value of the
y_errorbars field of the sherpa.fitplot variable;
it is set to 0 because of the set_yerroff command. The third command plots fit and delchi without y errorbars.
sherpa> set_yerroff
sherpa> sherpa.fitplot.y_errorbars = 1
sherpa> lplot fit
The first command (set_yerroff)
turns off the drawing of errorbars in only the y
direction in all Sherpa plots.
The second command changes the sherpa.fitplot variable so that
its y_errorbars field is set to 1 which means that
"LPLOT FIT" will include y error bars. The third command
plots fit with y errorbars.
|