Dear R-listers, I would like to ask if it is possible to create ternary diagrams with contours. I want to plot a property that depends on a ternary mixture composition, so I think this would be the best way. I found a similar question in a past R-help list message but there was no answer. In case it is not possible to create ternary plots with contours, can anyone suggest an alternative way to plot a property that depends on mixture composition? Even suggestions for alternative, preferably free, software are wellcome. Thank you very much in advance. Regards, Kyriakos.
Dear R-listers, I would like to ask if it is possible to create ternary diagrams with contours. I want to plot a property that depends on a ternary mixture composition, so I think this would be the best way. I found a similar question in a past R-help list message but there was no answer. In case it is not possible to create ternary plots with contours, can anyone suggest an alternative way to plot a property that depends on mixture composition? Even suggestions for alternative, preferably free, software are wellcome. Thank you very much in advance. Regards, Kyriakos.
Dear R-listers, I would like to ask if it is possible to create ternary diagrams with contours. I want to plot a property that depends on a ternary mixture composition, so I think this would be the best way. I found a similar question in a past R-help list message but there was no answer. In case it is not possible to create ternary plots with contours, can anyone suggest an alternative way to plot a property that depends on mixture composition? Even suggestions for alternative, preferably free, software are wellcome. Thank you very much in advance. Regards, Kyriakos.
On Sat, 17 Jan 2004, Kyriakos Kachrimanis wrote:> I would like to ask if it is possible to create ternary diagrams with > contours. I want to plot a property that depends on a ternary mixture > composition, so I think this would be the best way. I found a similar > question in a past R-help list message but there was no answer.It is possible. Just produce a suitable matrix of values, set parts outside the triangle to NA and call contour. I have done it several times. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
> Please stop sending the same message repeatedly: this is the *third* copy.I am sorry for the repeated messages and the unnecessary mail trafic in the list. It was not done deliberately. Outlook Express repeatedly crashed when I tried to send the message and, while I thought it was not sent, I was surprised to see that there were three copies in my "sent items" folder. Thank you very much for the reply.
Hi with help.search("ternary") I have got "ternaryplot" in package "vcd" and below is some code for ternary diagram which was in help post several years ago. I do not know if and how it works, I have not tried it a long time. #---------------------------------------------------------------------------- ----- # funkce pro kresleni ternarniho diagramu # Colin Farrow # Computing Service, University of Glasgow, Glasgow G12 8QQ # c.farrow at compserv.gla.ac.uk tri<- function(a, f, m, symb = 2, grid = F, ...) { ta <- paste(substitute(a)) tf <- paste(substitute(f)) tm <- paste(substitute(m)) tot <- 100/(a + f +m) b <- f * tot y <- b * .878 x <- m * tot + b/2 par(pty = "s") oldcol <- par("col") plot(x, y, axes = F, xlab = "", ylab = "", xlim = c(-10, 110), ylim = c(-10, 110), type = "n", ...) points(x,y,pch=symb) par(col = oldcol) trigrid(grid) text(-5, -5, ta) text(105, -5, tm) text(50, 93, tf) par(pty = "m") invisible() } "trigrid"<- function(grid = F) { lines(c(0, 50, 100, 0), c(0, 87.8, 0, 0)) #draw frame if(!grid) { for(i in 1:4 * 20) { lines(c(i, i - 1), c(0, 2 * .878)) #side a-c (base) lines(c(i, i + 1), c(0, 2 * .878)) T.j <- i/2 #side a-b (left) lines(c(T.j, T.j + 2), c(i * .878, i * .878)) lines(c(T.j, T.j + 1), c(i * .878, (i - 2) * .878)) T.j <- 100 - i/2 #side b-c (right) lines(c(T.j, T.j - 2), c(i * .878, i * .878)) lines(c(T.j, T.j - 1), c(i * .878, (i - 2) * .878)) } } else { for(i in 1:4 * 20) { # draw dotted grid lines(c(i, i/2), c(0, i * .878), lty = 4, col = 3) # lines(c(i, (50 + i/2)), c(0, .878 * (100 - i)), lty = 4, col = 3) # / lines(c(i/2, (100 - i/2)), c(i * .878, i * .878), lty = 4, col = 3) # - } par(lty = 1, col = 1) } } Petr Pikal petr.pikal at precheza.cz