[R] Solid and dotted lines saving an xyplot

From: Camarda, Carlo Giovanni <Camarda_at_demogr.mpg.de>
Date: Wed 19 Oct 2005 - 04:03:09 EST

Dear R-users,
I would a small problem saving a graph with postscript after using xyplot.
Whereas in the R-screen the two lines are solid, once the image is saved as .eps file the second lines (blue in the following example) is dotted. Here there is a simple example.
Thanks in advance for your help,
Carlo Giovanni Camarda

# creating data

a1 <- sort(runif(10))
a2 <- sort(runif(10))
a3 <- sort(runif(10))
a4 <- sort(runif(10))

a <- c(a1,a2,a3,a4)
b1 <- sort(runif(10))
b2 <- sort(runif(10))
b3 <- sort(runif(10))
b4 <- sort(runif(10))
b <- c(b1,b2,b3,b4)

c <- rep(1:10,4)
d <- rep(1:4, each=10)
# creating a dataset

df <- data.frame("a"=a,"b"=b,"c"=c,"d"=d)
# plotting in R (look the solid lines)

xyplot(a + b ~ c | d, data = df, col=c("red", "blue"), type="l", layout=c(2,2))
# saving somewhere (one solid and one dotted line)
xyplot(a + b ~ c | d, data = df, col=c("red", "blue"), type="l", layout=c(2,2))

This mail has been sent through the MPI for Demographic Rese...{{dropped}}

R-help@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 Received on Wed Oct 19 04:11:50 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:45 EST