Hello R, According to: g <- expand.grid(x = 1:10, y = 5:15, gr = 1:2) g$z <- log((g$x^g$g + g$y^2) * g$gr) wireframe(z ~ x * y, data = g, groups = gr, scales = list(arrows = FALSE), drape = TRUE, colorkey = TRUE, screen = list(z = 30, x = -60)) i have two wireframes in one plot. How could i change the color of the top - one to transparent (or only the grid). I want to give insight to the lower layer. Could one make an if-statment like (if gr==1 do drape=F or color=none) if gr=2 do drape=T, colorkey=T) Thanks for your help Marc -- Psssst! Schon vom neuen GMX MultiMessenger geh?rt? Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
Frede Aakmann Tøgersen
2007-Sep-27 09:29 UTC
[R] different colors for two wireframes in same plot
You can obtain some transparency setting the alpha transparency. This is device dependent though. Using the pdf device you can do this obtaining transparency of both surfaces (the version must be at least 1.4 for semitransparent output to be understood): pdf("test.pdf",version="1.4") wireframe(z ~ x * y, data = g, groups = gr, scales = list(arrows = FALSE), drape = TRUE, colorkey = TRUE, screen = list(z = 30, x = -60), par.settings = list(regions=list(alpha=0.75))) dev.off() See ?wireframe for the "at, col.regions, alpha.regions" arguments. Does this suffice? Med venlig hilsen Frede Aakmann T?gersen> -----Oprindelig meddelelse----- > Fra: r-help-bounces at r-project.org > [mailto:r-help-bounces at r-project.org] P? vegne af marcg > Sendt: 27. september 2007 09:22 > Til: r-help at stat.math.ethz.ch > Emne: [R] different colors for two wireframes in same plot > > Hello R, > > According to: > > g <- expand.grid(x = 1:10, y = 5:15, gr = 1:2) g$z <- > log((g$x^g$g + g$y^2) * g$gr) wireframe(z ~ x * y, data = g, > groups = gr, > scales = list(arrows = FALSE), > drape = TRUE, colorkey = TRUE, > screen = list(z = 30, x = -60)) > > i have two wireframes in one plot. > > How could i change the color of the top - one to transparent > (or only the grid). I want to give insight to the lower layer. > > Could one make an if-statment like (if gr==1 do drape=F or > color=none) if gr=2 do drape=T, colorkey=T) > > Thanks for your help > > Marc > > -- > Psssst! Schon vom neuen GMX MultiMessenger geh?rt? > Der kanns mit allen: http://www.gmx.net/de/go/multimessenger > > ______________________________________________ > R-help at 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. >
Hi, I am trying to use AlgDesign and am partially successful Two lines of code are taken from the help file 1. Line 1 (below) works fine> dat<-gen.factorial(levels=3,nVars=3,varNames=c("A","B","C"))2. Line 2 (below) does not work fine> desD<-optFederov(~quad(A,B,C),dat,nTrials=14,eval=TRUE)Here is the result I get Error in optFederov(~quad(A, B, C), dat, nTrials = 14, eval = TRUE) : object ".Random.seed" not found What do i need to do, to introduce this object into the process? Thanks in advance Paul ----- Original Message ----- From: "marcg" <mdgi at gmx.ch> To: <r-help at stat.math.ethz.ch> Sent: Thursday, September 27, 2007 5:21 PM Subject: [R] different colors for two wireframes in same plot> Hello R, > > According to: > > g <- expand.grid(x = 1:10, y = 5:15, gr = 1:2) > g$z <- log((g$x^g$g + g$y^2) * g$gr) > wireframe(z ~ x * y, data = g, groups = gr, > scales = list(arrows = FALSE), > drape = TRUE, colorkey = TRUE, > screen = list(z = 30, x = -60)) > > i have two wireframes in one plot. > > How could i change the color of the top - one to transparent (or only the > grid). I want to give insight to the lower layer. > > Could one make an if-statment like (if gr==1 do drape=F or color=none) if > gr=2 do drape=T, colorkey=T) > > Thanks for your help > > Marc > > -- > Psssst! Schon vom neuen GMX MultiMessenger geh?rt? > Der kanns mit allen: http://www.gmx.net/de/go/multimessenger > > ______________________________________________ > R-help at 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. > >
Thanks a lot This already looks nice and I already checked the ?wireframe, but with no examples and as newcommer its hard to find out a correct code. If we set drape=F in the example: g <- expand.grid(x = 1:10, y = 5:15, gr = 1:2) g$z <- log((g$x^g$g + g$y^2) * g$gr) wireframe(z ~ x * y, data = g, groups = gr, scales = list(arrows = FALSE), drape = F, colorkey = TRUE, screen = list(z = 30, x = -60)) you get a two color pic of these layers - and what I'm actually looking for is making just the UPPER (toplayer) transparent. Thanks for further help marc -------- Original-Nachricht --------> Datum: Thu, 27 Sep 2007 11:29:19 +0200 > Von: "Frede Aakmann T?gersen" <FredeA.Togersen at agrsci.dk> > An: "marcg" <mdgi at gmx.ch>, r-help at stat.math.ethz.ch > Betreff: SV: [R] different colors for two wireframes in same plot> You can obtain some transparency setting the alpha transparency. This is > device dependent though. Using the pdf device you can do this obtaining > transparency of both surfaces (the version must be at least 1.4 for > semitransparent output to be understood): > > > pdf("test.pdf",version="1.4") > wireframe(z ~ x * y, data = g, groups = gr, > scales = list(arrows = FALSE), > drape = TRUE, colorkey = TRUE, > screen = list(z = 30, x = -60), > par.settings = list(regions=list(alpha=0.75))) > dev.off() > > See ?wireframe for the "at, col.regions, alpha.regions" arguments. > > Does this suffice? > > > Med venlig hilsen > Frede Aakmann T?gersen > > > > > > -----Oprindelig meddelelse----- > > Fra: r-help-bounces at r-project.org > > [mailto:r-help-bounces at r-project.org] P? vegne af marcg > > Sendt: 27. september 2007 09:22 > > Til: r-help at stat.math.ethz.ch > > Emne: [R] different colors for two wireframes in same plot > > > > Hello R, > > > > According to: > > > > g <- expand.grid(x = 1:10, y = 5:15, gr = 1:2) g$z <- > > log((g$x^g$g + g$y^2) * g$gr) wireframe(z ~ x * y, data = g, > > groups = gr, > > scales = list(arrows = FALSE), > > drape = TRUE, colorkey = TRUE, > > screen = list(z = 30, x = -60)) > > > > i have two wireframes in one plot. > > > > How could i change the color of the top - one to transparent > > (or only the grid). I want to give insight to the lower layer. > > > > Could one make an if-statment like (if gr==1 do drape=F or > > color=none) if gr=2 do drape=T, colorkey=T) > > > > Thanks for your help > > > > Marc > > > > -- > > Psssst! Schon vom neuen GMX MultiMessenger geh?rt? > > Der kanns mit allen: http://www.gmx.net/de/go/multimessenger > > > > ______________________________________________ > > R-help at 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. > >-- ______________________________________________ R-help at 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. --