Hi All,

I'm having trouble with the colors on my screen getting translated to the colors in the outputted .pdf document.

Here is a caricature of my problem:

par(mfrow=c(1,1))
x1 = rnorm(1000)
x2 = rnorm(1000)+10
y1 = rnorm(1000)+10
y2 = rnorm(1000)+10
palette(rainbow(6))
plot(x=x1,y=y1,col=y1,xlim=c(-10,20))

palette(heat.colors(6))
points(x=x2,y=y2,col=y2)

    dev.copy2pdf(file = "broke.pdf", height = 8, width = 8)

I plot the two normal blobs in two different color palettes, and it looks fine on the screen. I go to look at the PDF, and they are BOTH in heat map.

How would I render both palettes on the pdf?

Many thanks,
Andrew

______________________________________________
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