From Thomas Vogels <tov@ece.cmu.edu>  Wed Jan 31 01:25:53 2001
From: Thomas Vogels <tov@ece.cmu.edu> (Thomas Vogels)
Date: 30 Jan 2001 20:25:53 -0500
Subject: [Rd] Disappearing x axis in plot.factor (PR#830)
In-Reply-To: Peter Dalgaard BSA's message of "30 Jan 2001 16:32:30 +0100"
References: <200101300527.GAA28423@pubhealth.ku.dk>
 <x28znt5a41.fsf@blueberry.kubism.ku.dk>
Message-ID: <px1ytkwlzy.fsf@infiniti.ece.cmu.edu>


Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> writes:

> tov@ece.cmu.edu writes:

snip

> > Something funky is going on with axisnames or args in plot.factor that
> > I can't figure out.  The situation can be remedied with
> > > plot.factor(factor(1:3), col="red", axes=TRUE)
> > 
> > alas, why do you need "axes=TRUE"?
> 
> Because of the logic of
> 
>         axisnames <- if (length(dargs <- list(...)) > 0) {
>             nam <- names(dargs)
>             ((any("axes" == nam) && dargs$axes) || (any("xaxt" == 
>                 nam) && dargs$xaxt != "n"))
>         }
> 
> gives FALSE if there are any "..." arguments, and neither of axes= and
> xaxt= are given.
> 
> I think the first part of plot.factor wants to be 
> 
>      if (missing(y) || is.factor(y)) {
> 	dargs <- list(...)
>         axisnames <- if (!is.null(dargs$axes)) dargs$axes
> 	    else if (!is.null(dargs$xaxt)) dargs$xaxt != "n"
>             else TRUE
>     }
> 
> Anyone know better?


This works for me at least.  Thank you very much,

  -tom


-- 
mailto:tov@ece.cmu.edu (Tom Vogels)   Tel: (412) 268-6638   FAX: -3204
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] Disappearing x axis in plot.factor (PR#830)
Thomas Vogels