Re: [R] triangle contour plots

From: Greg Snow <Greg.Snow_at_intermountainmail.org>
Date: Mon, 18 Jun 2007 09:02:25 -0600


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
greg.snow_at_intermountainmail.org
(801) 408-8111
 
 


> -----Original Message-----
> From: r-help-bounces_at_stat.math.ethz.ch
> [mailto:r-help-bounces_at_stat.math.ethz.ch] 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_at_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_at_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.
Received on Mon 18 Jun 2007 - 15:20:42 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 18 Jun 2007 - 15:32:14 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.