Hi jim, Tks for your advice. I got it.
1) > abline(v=c(1,2,3,4), h=c(10,20), toothgrowth) The output of following command is the same. > abline(v=c(1,2), h=c(10,20), toothgrowth) 2) Afterwards can I add further abline? B.R. Stephen L ________________________________ From: jim holtman <jholt...@gmail.com> Cc: r-help@r-project.org Sent: Sat, November 27, 2010 2:07:41 PM Subject: Re: [R] How to add multiple ablines just add more 'abline' calls, or pass multiple values; e.g., abline(v=c(1,2,3,4), h=c(10,20)) > Hi folks > > Run; >> ToothGrowth >> attach(ToothGrowth) >> toothgrowth=lm(len~dose) > > adding abline: >> abline(toothgrowth) > > I got it done adding single abline. > > > How to add more ablines on the same diagram? > > I found following thread, applying "mapply" command; > > Plotting multiple ablines > http://www.mail-archive.com/r-help@r-project.org/msg51543.html > > mapply(abline, > (converge$kY + tan((90-converge$kT) * pi / 180)*(-converge$kX)), > tan((90-converge$kT) * pi / 180)) > > But couldn't resolve it. Substituting "converge" with toothgrowth" didn't >work? > I also look at ?mapply. Pls help. > > I don't have parameter of other ablines to be added. This is only a learning > example. Any data can fit to them. > > TIA > > B.R. > Stephen L > > > [[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. > -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve? [[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.