Hi,

I wanted to plot two different density profiles. My code looks like:


x1 <- rnorm(100,mean=0,sd=1)
x2 <- rnorm(100,mean=1,sd=1)

plot(density(x1),xlab="",col="red",main="")
par(new=T)
plot(density(x2),xlab="",col="blue",main="")


However, the x-axis values don't match up for the two plots. Is there a way
I can fix the axis so that the two plots are comparable? Similarly for the
y-axis...

thanks!

        [[alternative HTML version deleted]]

______________________________________________
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