[R] grid(): defaults of nx and ny do not correspond with axis() (PR#2259)

wolfram@fischer-zim.ch wolfram@fischer-zim.ch
Tue, 5 Nov 2002 15:37:31 +0100 (MET)


Problem:
    When tick marks are set by axis(), the default grid() does not always
    correspond with the tick marks, although the manual of grid() says:
    nx,ny: ... When `NULL', as per default, the grid aligns with the
           tick marks on the corresponding axis, when `NA', no grid
           lines are drawn in the corresponding direction.


Example:
    m <- 200; n <- 10; i <- 40
    plot( 1:n, sample( 1:m, n, T ), type='b', yaxt='n' )
    axis( side=2, at = seq( 0, m, i ), col='blue' )
    grid( col='red', lty=2 )


Wolfram Fischer

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._