Switch plotting axis to linear scale in Sherpa plots
set_lin
set_xlin
set_ylin
These commands allow a user to switch x- and y-axis to linear scale
in all Sherpa plots. A plotting command LPLOT needs to be
issued in order for these commands to take effect.
A user can control log and linear scale of the x and y-axis
created with the LPLOT command by setting the x_log and
y_log in the corresponding Sherpa
configuration variable (also called "state object") sherpa.plot,
sherpa.dataplot, sherpa.fitplot,
or sherpa.resplot.
The functions set_lin, set_xlin,
and set_ylin allow you to
change these fields in all the configuration variables
(sherpa.plot, sherpa.dataplot,
sherpa.fitplot, sherpa.resplot) at once
as shown in the following table:
set_lin
|
Set x_log = 0 and y_log = 0
|
set_xlin
|
Set x_log = 0
|
set_ylin
|
Set y_log = 0
|
This sets plot axis (both in x and y ) to linear scale
in all Sherpa plots.
This sets plot axis to linear scale for only the x-axis
in all Sherpa plots.
sherpa> set_ylin
sherpa> print(sherpa.fitplot.y_log)
0
sherpa> lplot fit
The first command (set_ylog)
sets y-axis to linear scale in all
Sherpa plots.
The second command prints out the value of the
y_log field of the sherpa.fitplot variable;
it is set to 0 (false) because
of the set_ylin command. The third
command displays fit in linear scale
|