On Jan 14, 2013, at 3:32 PM, Lily Arias Chauca wrote:

> 
> I want to add a line that represents the relationship between x and y to a 
> strip chart, I've tried the following functions:
> par(new=TRUE)
> points(x,y)
> lines(x,y)
> 
> but nothing works, I get the strip chart but line doesn't show up. Here is my 
> function:
> 
> stripchart(hydfin$exp ~ hydfin$alt, vert = TRUE, pch = 1, method = "jitter", 
> jit = 0.05, xlab = "Elevation", ylab = expression(paste(delta^{2}, "H")))
> points(1:3, hydfin.M, pch = 16, cex = 1.5)
> arrows(1:3, hydfin.M, 1:3, hydfin.M + hydfin.se, lwd = 1.5, angle = 90, 
> length = 0.1)
> arrows(1:3, hydfin.M, 1:3, hydfin.M - hydfin.se, lwd = 1.5, angle = 90, 
> length = 0.1)
> par(new=TRUE)
> lines(hydfin$exp, hydfin$alt,type="l",col="red")

You are probably not plotting to the right coordinates. (You are reversing the 
x and y roles.)  Please include the output of dput(head(hydfin))


-- 
David Winsemius
Alameda, CA, USA

______________________________________________
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