Skip to content
Prev 140 / 63424 Next

R-alpha: plot, axis & log

The following commands crash:
zsh: segmentation fault  R

Lines 35-37 of axis():

35:        else {
36:                ind <- (usr[1] <= at & at <= usr[2])
37:        }

should be replaced by

        else {
                if (log)
                        ind <- (10^usr[1] <= at & at <= 10^usr[2])
                else ind <- (usr[1] <= at & at <= usr[2])
        }

Moreover, there should be a check if length(at) equals zero before calling
the internal axis command.

But wait, there's more:
The second call of plot produces an empty plot. The following sequence
works:
Why does R have the graphical parameters "xlog" and "ylog"? They do not
seem to work for me and are not used by S-Plus.

Arne