Message-ID: <8975119BCD0AC5419D61A9CF1A923E9503008448@iahce2ksrv1.iah.bbsrc.ac.uk>
Date: 2006-02-28T09:37:46Z
From: michael watson (IAH-C)
Subject: lines() and recycled colours
Hi
Lines behaves as the help() says it does:
plot(0:1,0:1,type="n")
lines(runif(11),runif(11),col=c("red","green"), type="h")
Mick
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Robin Hankin
Sent: 28 February 2006 09:31
To: RHelp
Subject: [R] lines() and recycled colours
Hi
?lines says
For 'type = "h"', 'col' can be a vector and will be recycled as
needed.
Why doesn't lines() recycle colours for other types?
If I type
> plot(0:1,0:1,type="n")
> lines(runif(11),runif(11),col=c("red","green"))
>
then all ten lines are red, with no warning given. Is there a reason
why colour recycling would be a bad idea in this case?
Also, it would be nice if arguments such as lwd were recycled if
needed too.
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton European Way, Southampton SO14
3ZH, UK
tel 023-8059-7743
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html