---Oleg Kobchenko wrote:
> > From: Alfonso Salazar <[EMAIL PROTECTED]>
> >
> > I wish graph V in logarithmic scale but gives error.
> >
> > V=:30 70 100 300 500 1000 2000 5000 22000 33000
> >
> > 'ylog 1' plot V
> > |NaN error: getaxis1
> > | Div=.zero(Int -Min)%Max-Min
> >
> > How I do it?
>
> If you open Debugger and run this sentence, after the
> stop see the value of Min, it is __ neg infinity, which
> causes the NaN error.
> So you need to look up the code and/or place breakpoint
> earlier to see where and why Min becomes __ .
Interestingly the sentence executes successfully in J6.01 but produces an
incorrect plot, whereas the NaN error in J6.02 is produced because the result
of __ - __ is no longer indeterminate. This is probably an improvement over
J6.01 as it at least highlights that there is an issue.
Hopefully the following will help track down the problem:
The issue seems to occur when (in English):
The range of the Y values exceeds 10 to the power of 1 more than the digits in
the minimum.
(in J):
min=: <./
range=: >./ - min
ndigits=: 1 + 10&(<[EMAIL PROTECTED])
(range Y) > ([: 10&^ >:@ndigits)@min Y
'ylog 1' plot 9 96 104 109
|NaN error: getaxis1
| Div=.zero(Int -Min)%Max-Min
'ylog 1' plot 9 96 104 108 NB. Success
'ylog 1' plot 4 50 96 104
|NaN error: getaxis1
| Div=.zero(Int -Min)%Max-Min
'ylog 1' plot 4 50 96 103 NB. Success
'ylog 1' plot 11 96 104 1011
|NaN error: getaxis1
| Div=.zero(Int -Min)%Max-Min
'ylog 1' plot 11 96 104 1010 NB. Success
'ylog 1' plot 30 70 100 300 500 1030
|NaN error: getaxis1
| Div=.zero(Int -Min)%Max-Min
'ylog 1' plot 30 70 100 300 500 1029 NB. Success
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm