<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:18pt"><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; "><span>Bom dia senhores!<br></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; "><span></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; "><span>Estou tentando plotar dois tipos de gráficos em uma mesma janela gráfica, mais tá difícil. Não sei até onde vale a pena o 'tempo/benefício' em se usar a lattice. Segue abaixo o CMR.</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; "><span><br></span></div><div><span><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><div style="border-top-color: rgb(204, 204,
204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); font-family: arial, helvetica, sans-serif; font-size: 18pt; "><span class="Apple-style-span" style="font-size: 24px; ">require(plotrix)</span><br></div><div style="border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); font-family: arial, helvetica, sans-serif; font-size: 18pt; "><span class="Apple-style-span" style="font-size: 24px; ">jet.colors <- colorRampPalette( c("blue", "green") ) </span><br></div><div style="border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204);
border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5">x <- seq(-1.95, 1.95, length=30)</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5">y <- seq(-1.95, 1.95, length=35)</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5">da <- expand.grid(x=x, y=y)</font></div><div style="font-family: arial, helvetica, sans-serif;
font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5">da$z <- with(da, x*y^2)</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5"><br></font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica,
sans-serif" size="5">require(lattice)</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5">panel.3d.contour <-</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5"> function(x, y, z, rot.mat, distance,</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color:
rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5"> nlevels = 20, zlim.scaled, ...)</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5"> {</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5"> add.line <- trellis.par.get("add.line")</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt;
border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5"> panel.3dwire(x, y, z, rot.mat, distance,</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5"> zlim.scaled = zlim.scaled, ...)</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font
class="Apple-style-span" face="arial, helvetica, sans-serif" size="5"> clines <-</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5"> contourLines(x, y, matrix(z, nrow = length(x), byrow = TRUE),</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5"> nlevels = nlevels)</font></div><div style="font-family: arial, helvetica,
sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5"> for (ll in clines) {</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5"> m <- ltransform3dto3d(rbind(ll$x, ll$y, zlim.scaled[1]),</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font
class="Apple-style-span" face="arial, helvetica, sans-serif" size="5"> rot.mat, distance)</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5"> panel.lines(m[1,], m[2,], col = add.line$col,</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5"> </font></div><div
style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5"> lty = add.line$lty, lwd = add.line$lwd)</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5"> }</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font
class="Apple-style-span" face="arial, helvetica, sans-serif" size="5"> }</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5"><br></font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="5">g1 <- wireframe(z~x+y, da, drape=TRUE, scales=list(arrows=FALSE),col.regions=jet.colors(100),panel.3d.wireframe="panel.3d.contour")</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color:
rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica,
sans-serif" size="5"><br></font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica,
sans-serif" size="5">g2 <- contourplot(z ~ x+y,da) </font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica,
sans-serif" size="5"><br></font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" face="arial, helvetica,
sans-serif" size="5">library(grid)</font></div><div style="font-family: arial, helvetica, sans-serif; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" size="5">pushViewport(viewport(layout=grid.layout(2,1)))</font></div><div style="font-family: arial, helvetica, sans-serif; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" size="5">print(g1,vp=viewport(layout.pos.row=1,layout.pos.col=1))</font></div><div style="font-family: arial, helvetica, sans-serif; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" size="5"><meta
http-equiv="content-type" content="text/html; charset=utf-8">print(g2,vp=viewport(layout.pos.row=2,layout.pos.col=1))</font></div><div style="font-family: arial, helvetica, sans-serif; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" size="5"><br></font></div><div style="font-family: arial, helvetica, sans-serif; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" size="5">Este último comando não plota os dois gráficos em uma mesma janela gráfica. Eu gostaria de um comando equivalente ao par(mfrow). </font></div><div style="font-family: arial, helvetica, sans-serif; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color:
rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" size="5"><br></font></div><div style="font-family: arial, helvetica, sans-serif; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" size="5">Desde já agradeço novamente a atenção de todos.</font></div><div style="font-family: arial, helvetica, sans-serif; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" size="5"><br></font></div><div style="font-family: arial, helvetica, sans-serif; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span"
size="5">Allaman</font></div><div style="font-family: arial, helvetica, sans-serif; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); "><font class="Apple-style-span" size="5">(S,f,P)</font></div></div></span></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; "> </div><div style="font-family: arial, helvetica, sans-serif; font-size: 18pt; background-color: transparent; color: rgb(115, 115, 115); " align="center"><b>M.Sc Ivan Bezerra Allaman</b> <br>Zootecnista<br><font style="background-color:transparent;" face="comic sans ms" size="2"><font style="background-color:transparent;">Doutorando em Produção Animal/Aquicultura - UFLA</font> <br></font><font size="2"><i><strong></strong></i></font><font style="background-color:transparent;" face="comic sans ms" size="2">email e msn - ivanalaman@yahoo.com.br
<br><font size="1">Tel: (35)3826-6608/9900-2924</font></font></div></div></body></html>