The triplot function in the TeachingDemos package (I don't know about the one in klaR, or the others mentioned) honors the type='l' argument and passes it on to points. So if you know where you want the contours drawn, you can use triplot to draw the lines (it also has an add argument that could be used to add labels after plotting the lines).
You can also look at the source code to see how the plotting is done and modify it to do the plot you are interested in. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Robin Hankin > Sent: Monday, June 18, 2007 6:12 AM > To: R program > Subject: [R] triangle contour plots > > Suppose I have three numbers p1, p2, p3 with 0 <= p1,p2,p3 <= > 1 and p1+p2+p3=1, > and a function f=f(p1,p2,p3) = f(p1,p2,1-p1-p2). > > How to draw a contour plot of f() on the p1+p2+p3=1 plane, > that is, an equilateral triangle? > > Functions triplot(), triangle.plot(), and ternaryplot() give > only scatterplots, AFAICS > > > > > > -- > Robin Hankin > Uncertainty Analyst > National Oceanography Centre, Southampton European Way, > Southampton SO14 3ZH, UK > tel 023-8059-7743 > > ______________________________________________ > 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 > and provide commented, minimal, self-contained, reproducible code. > ______________________________________________ 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 and provide commented, minimal, self-contained, reproducible code.