How to set a log scale plot of axis under task nfit1d
xiaocong213 wrote on Jul 22, 2008
Using "nfit1d" task in package of stsdas.analysis.fitting, when the graphic shows, I tried to set the x and y axises to logscale but failed, form the help of ncfit, we can see that, there is an option to set the axis to logscale:
both of x and y axis are failed to be set to logscal, but it is strange that for yaxis, the "mag" option can work.
I wonder is there any way to fix this problem? Thanks very much!
I use IRAF V2.12 , stsdas V3.0 , tables V3.0
I updated stsdas to V3.8 and the problem remains.
:xaxis [value]
Show or set the independent variable axis. Possible values:
"linear, "log". Notice that only the plot changes; internal
data and function coefficients are kept in their original units.
:yaxis [value]
Show or set the dependent variable axis. Possible values:
"linear, "log", "mag". Notice that only the plot changes;
internal data and function coefficients are kept in their
original units.
both of x and y axis are failed to be set to logscal, but it is strange that for yaxis, the "mag" option can work.
I wonder is there any way to fix this problem? Thanks very much!
I use IRAF V2.12 , stsdas V3.0 , tables V3.0
I updated stsdas to V3.8 and the problem remains.
xiaocong213 wrote on Jul 22, 2008
here is my example:
file test containes the data of belows, and I use powerlaw function to fit under task "nfit1d"
# cat test
1 2
2 4
3 9
4 16
5 25
6 36
7 49
8 64
9 81
10 100
11 121
12 144
15 225
20 400
30 900
40 1600
50 2500
the option of "log" for both x and y axises are remain the same with the option "linear", it dosen't work at all, here is the pic in computer
[img:35cb1fb4fd]http://www.xinglong-naoc.org/forum/upload/7321.jpg[/img:35cb1fb4fd]
But it is strange that option "mag" works, see below
[img:35cb1fb4fd]http://www.xinglong-naoc.org/forum/upload/7322.jpg[/img:35cb1fb4fd]
Please help, many thanks.
file test containes the data of belows, and I use powerlaw function to fit under task "nfit1d"
# cat test
1 2
2 4
3 9
4 16
5 25
6 36
7 49
8 64
9 81
10 100
11 121
12 144
15 225
20 400
30 900
40 1600
50 2500
the option of "log" for both x and y axises are remain the same with the option "linear", it dosen't work at all, here is the pic in computer
[img:35cb1fb4fd]http://www.xinglong-naoc.org/forum/upload/7321.jpg[/img:35cb1fb4fd]
But it is strange that option "mag" works, see below
[img:35cb1fb4fd]http://www.xinglong-naoc.org/forum/upload/7322.jpg[/img:35cb1fb4fd]
Please help, many thanks.
Francisco Valdes wrote on Jul 22, 2008
I am not sure how this task is implemented. However, you can get the log format in two steps.
The / commands are document either with "help gtools" or ":/help" in graphics mode.
Yours,
Frank Valdes
:yaxis log
:/ytrans log
[now cause a new fit or redraw]
The / commands are document either with "help gtools" or ":/help" in graphics mode.
Yours,
Frank Valdes
xiaocong213 wrote on Jul 22, 2008
Hi, thanks very much for your help!
I tried, it works, both of two steps are needed to chand the scale to log, first ":yaxis log" and after ":/ytrans log", but only one step in needed to change back to linear.
I tried, it works, both of two steps are needed to chand the scale to log, first ":yaxis log" and after ":/ytrans log", but only one step in needed to change back to linear.
Last post on Jul 22, 2008