On 4/12/07, Brian Riordan <[EMAIL PROTECTED]> wrote:
> I'm having trouble getting a black and white plot using the trellis device.
> I have color graphics, but I'd like to use b&w for a paper.  For example,
>
> trellis.device(color=F)
> d <- read.table(textConnection("
> A,B
> 0,1
> 1,2"), header=T, sep=",")
> xyplot(A ~ B, data=d, type="o", lty=c(1:2), col=2, pch=19:20)
> dev.off()
>
> gives me a red line even though I specify color=F.

Yes, the 'color' argument controls the default settings. If you don't
want a non-default color, don't specify a color. You can't expect to
say "draw these points in red" and then be surprised when the points
are really drawn in red.

If you expected that somehow col=2 would become a black and white
color, then look at ?palette. For example, you can set the palette to
shades of grey using

palette(grey.colors(5))

-Deepayan

______________________________________________
[EMAIL PROTECTED] 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