Hello,

Or with base R only,

smooth <- colorRampPalette(c('white', 'darkgrey'))
segments(rep(0,100),seq(-4.5,0,length.out=200),rep(14,200),
 seq(0,4.5,length.out=200), col = smooth(200), lwd = 2)


Hope this helps,

Rui Barradas

Em 18-02-2013 23:30, Jim Lemon escreveu:
On 02/19/2013 09:50 AM, Jim Lemon wrote:
Hi Elisabeth,
For a quick hack, try this:

segments(rep(0,100),seq(-4.5,0,length.out=200),rep(14,200),
seq(0,4.5,length.out=200),
col=rgb(seq(0.8,0.5,length.out=200),seq(0.8,0.5,length.out=200),
seq(0.8,0.5,length.out=200)),lwd=2)

and even easier:

library(plotrix)
segments(rep(0,100),seq(-4.5,0,length.out=200),rep(14,200),
  seq(0,4.5,length.out=200),col=smoothColors("white",198,"darkgray"))

Jim

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to