hello, i make here my suggeestion of a Ternary Plot as a RSM. cleber
################################################ trimage <- function(f){ [[elided Yahoo spam]] t1 = length(x) im = aux = numeric(0) for( i in seq( 1, t1, by = 2 ) ){ #idx = seq( t1**2, i*t1, by = -t1 ) - ((t1 - i):0) idx = seq( i*t1, t1**2, by = t1 ) - (i-1) im = c(im, aux, idx, aux ) aux = c(aux, NA) } z = outer(X=x, Y=y, FUN=f) return( matrix(z[im],nr=t1) ) } ############################################## # dataset of mail: Francesco --- june,4 a <- c(0.1, 0.5, 0.5, 0.6, 0.2, 0, 0, 0.004166667, 0.45) b <- c(0.75,0.5,0,0.1,0.2,0.951612903,0.918103448,0.7875,0.45) c <- c(0.15,0,0.5,0.3,0.6,0.048387097,0.081896552,0.208333333,0.1) d <- c(500,2324.90,2551.44,1244.50, 551.22,-644.20,-377.17,-100, 2493.04) df<- data.frame (a, b, c, d) reg <- lm( d ~ -1 + a*b*c ) mod <- gsub(":","*", paste( coef(reg), '*', names(coef(reg)), collapse=' + ')) spf <- function( a,b,c ){eval(parse(text=mod))} f1 <- function(a,b){ c=1-a-b; return( spf(a,b,c) ) } zmat <- trimage(f1) windows(w=4.5, h=4.5) par(mar=c(0,0,0,0), pty='s', xaxt='n', yaxt='n', bty='n' ) image(zmat) Em 19/12/2013 13:38, Nicholas Hamilton escreveu: > Dear Walmes, > > I wanted to mention that I have just published on CRAN, a package for R, > for the plotting of ternary diagrams. > > It is based off ggplot2, which is highly regarded, and, my website can be > viewed at www.ggtern.com, including many examples, specifically including a > case study at the following address: > > http://ggtern.com/case-study-zirconia-alumina-silica/ > > Hope you find it of value. > > Best Regards, > > Nicholas Hamilton > School of Materials Science and Engineering > Univesity of New South Wales > Sydney Australia > > [[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.