Thanks Henrique, that appeared to work, but now I have another issue.

If I add a ylim to the plot then when I plot another line it gets plotted on
the wrong scale.

#this works as expected
plot(iris[,1],col="red",ylim=c(-10,10)) #plot1
lines(iris[,4],col="black") 


#this does not
par(mfrow=c(2,1))

plot(iris[,1],col="red",ylim=c(-10,10)) #plot1
plot(iris[,3],col="blue") #plot2

#goes on plot2
par(mfg = c(2, 1))
lines(iris[,2],col="pink")

#goes on plot 1
par(mfg = c(1, 1))
lines(iris[,4],col="black") 
-- 
View this message in context: 
http://r.789695.n4.nabble.com/plot-focus-tp2272699p2274541.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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