[Rd] plot.times error -- missing or illegal tck parameter (PR#601)

maechler@stat.math.ethz.ch maechler@stat.math.ethz.ch
Wed, 12 Jul 2000 08:19:10 +0200 (MET DST)


>>>>> "JMd" == john maindonald <john.maindonald@anu.edu.au> writes:

    JMd> There seems no default setting for tck, causing problems
    JMd> for plot.times()

    >> library(chron)
    >> dts <- dates(c("02/27/92", "02/27/92", "01/14/92",
       +                "02/28/92", "02/01/92"))
    >> y<-chron(dts,out.format=c("dmy","h:m:s"))
    >> y
       [1] 270292 270292 140192 280292 010292
    >> plot(y,1:5)
         Error in axis(n, at = at.x, labels = labels, ...) : 
         invalid value specified for graphics parameter "tck".
    >> plot(y,1:5,tck=0.01)
    >> traceback()
         [1] "axis(n, at = at.x, labels = labels, ...)"                     
         [2] "axis.times(1, x, simplify = simplify, labels = T, adj = adj, "
         [3] "    col = col, cex = cex, font = font, las = las, lab = lab, "
         [4] "    mgp = mgp, tck = tck)"                                    
         [5] "plot.times(y, 1:5)"                                           
         [6] "plot(y, 1:5)"                                                 
    >> par()$tck
         [1] NA

Well, the default must be NA since   ?par says

 help_par>     tck: The length of tick marks as a fraction of the smaller of the
 help_par>          width or height of the plotting region. If `tck=1', grid
 help_par>          lines are drawn. The default setting is to use `tcl=-0.5'
 help_par>          (see below).
 help_par> 
 help_par>     tcl: The length of tick marks as a fraction of the height of a
 help_par>          line of text.  The default value is `-0.5'.

which is different than other dialects of S on purpose!

So the bug is really in  plot.times only  which hasn't properly been
ported from S-PLUS to R.

Martin

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._