[R] unexpected behavior in plot
Arditi, Aries
aarditi at lighthouse.org
Tue Mar 30 18:12:59 CEST 2004
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
More information about the R-help
mailing list