[R] unexpected behavior in plot

About this list Date view Thread view Subject view Author view Attachment view

From: Arditi, Aries (aarditi@lighthouse.org)
Date: Wed 31 Mar 2004 - 02:12:59 EST


Message-id: <7300144209720B45B0773007B0E33F1E18C7F1@USJRAEXCH01.Lighthouse.PRI>


I'm having difficulty getting plot to work with type="n", when either the x or y variables is a factor.

For example,

x <- 1:10
y <- 1:10

plot(x, as.factor(y), type="n")
plot(as.factor(x),y, type="n")
plot(y ~ as.factor(x), type="n")

produce plots with data plotted, whereas

plot(x,y, type="n")
plot(y ~ x, type = "n")

produce the expected dataless plots

I am running R1.8.1 on Windows (xp), with the windows graphics device.

I have a friend who has tried this on a Mac (OS 10.3.3. with quartz() and x11() devices) and gets erratic behavior, i.e. sometimes plots works as expected, and sometimes not.

Does anyone have any clues on this?

Thanks in advance,

Aries Arditi, Ph.D.
Senior Fellow in Vision Science
Arlene R. Gordon Research Institute
Lighthouse International
111 East 59th Street
New York, NY 10022

Tel: +1 212 821 9500 (direct)
Fax: +1 212 751 9667
http://www.lighthouse.org/research_staff_arditi.htm

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Fri 23 Apr 2004 - 18:36:44 EST