<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Segue uma outra sugestão, bem próxima do código original:<div><br></div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(6, 37, 153); "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(6, 37, 153); ">set.seed(<span style="color: #065218">1234</span>)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(6, 37, 153); "><span style="color: #000000">x1 </span><-<span style="color: #000000"> </span>abs(rnorm(<span style="color: #065218">10</span>))</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(6, 37, 153); "><span style="color: #000000">x2 </span><-<span style="color: #000000"> </span>abs(rnorm(<span style="color: #065218">10</span>))<span style="color: #000000"> </span>+<span style="color: #000000"> </span><span style="color: #065218">100</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; min-height: 13px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(6, 37, 153); ">par(<span style="color: #000000">mar</span>=c(<span style="color: #065218">5</span>,<span style="color: #065218">5</span>,<span style="color: #065218">4</span>,<span style="color: #065218">5</span>))</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">bp <span style="color: #062599"><-</span> <span style="color: #062599">barplot(</span>x1<span style="color: #062599">,</span> xlim<span style="color: #062599">=c(</span><span style="color: #065218">0</span><span style="color: #062599">,</span><span style="color: #065218">12</span><span style="color: #062599">),</span> ylim<span style="color: #062599">=c(</span><span style="color: #065218">0</span><span style="color: #062599">,</span><span style="color: #065218">3</span><span style="color: #062599">),</span> xlab<span style="color: #062599">=</span><span style="color: #b01406">''</span><span style="color: #062599">,</span> ylab<span style="color: #062599">=</span><span style="color: #b01406">'VAR 01'</span><span style="color: #062599">,</span> xaxt<span style="color: #062599">=</span><span style="color: #b01406">'n'</span><span style="color: #062599">)</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(6, 37, 153); ">par(<span style="color: #000000">new</span>=<span style="color: #c38816">T</span>)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span style="color: #062599">plot(</span>bp<span style="color: #062599">,</span> x2<span style="color: #062599">,</span> t<span style="color: #062599">=</span><span style="color: #b01406">'b'</span><span style="color: #062599">,</span> xlim<span style="color: #062599">=c(</span><span style="color: #065218">0</span><span style="color: #062599">,</span><span style="color: #065218">12</span><span style="color: #062599">),</span> xlab<span style="color: #062599">=</span><span style="color: #b01406">''</span><span style="color: #062599">,</span> ylab<span style="color: #062599">=</span><span style="color: #b01406">''</span><span style="color: #062599">,</span> xaxt<span style="color: #062599">=</span><span style="color: #b01406">'n'</span><span style="color: #062599">,</span> yaxt<span style="color: #062599">=</span><span style="color: #b01406">'n'</span><span style="color: #062599">,</span> bty<span style="color: #062599">=</span><span style="color: #b01406">'n'</span><span style="color: #062599">,</span> ylim<span style="color: #062599">=c(</span><span style="color: #065218">100</span><span style="color: #062599">,</span><span style="color: #065218">103</span><span style="color: #062599">),</span> yaxs<span style="color: #062599">=</span><span style="color: #b01406">'i'</span><span style="color: #062599">)</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(6, 37, 153); ">axis(<span style="color: #065218">4</span>)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(6, 37, 153); ">mtext(<span style="color: #b01406">'VAR 02'</span>,<span style="color: #000000"> side</span>=<span style="color: #065218">4</span>,<span style="color: #000000"> line</span>=<span style="color: #065218">3</span>)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(6, 37, 153); ">grid(<span style="color: #c38816">NA</span>,<span style="color: #000000"> </span><span style="color: #065218">6</span>)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(176, 20, 6); "><span style="color: #062599">abline(</span><span style="color: #000000">v</span><span style="color: #062599">=</span><span style="color: #000000">bp</span><span style="color: #062599">[,</span><span style="color: #065218">1</span><span style="color: #062599">],</span><span style="color: #000000"> col</span><span style="color: #062599">=</span>'lightgray'<span style="color: #062599">,</span><span style="color: #000000"> lty</span><span style="color: #062599">=</span>'dotted'<span style="color: #062599">)</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span style="color: #062599">axis(</span><span style="color: #065218">1</span><span style="color: #062599">,</span> at<span style="color: #062599">=</span>bp<span style="color: #062599">,</span> labels<span style="color: #062599">=</span>letters<span style="color: #062599">[</span><span style="color: #065218">1</span><span style="color: #062599">:</span><span style="color: #065218">10</span><span style="color: #062599">])</span></div><div><span style="color: #062599"><br></span></div></div><div><span style="color: #062599"><br></span></div><div><span style="color: #062599">Att.</span></div><div><span style="color: #062599"><br></span></div><div><span style="color: #062599">Alexandre</span></div><div><span style="color: #062599"><br></span></div><div><span style="color: #062599"><br></span></div><div><div>On Feb 20, 2012, at 10:06 PM, Paulo J Ribeiro Jr wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Cleber<br><br>me parece que a solucao para "customização" completa seria voce fazer o<br>gráfico sem eixos (axis=F) e depois usar o axis(1, ...), axis(2, ...)<br>etc<br><br><br><br>Em Seg, 2012-02-20 às 21:39 -0200, Cleber N.Borges escreveu:<br><blockquote type="cite">Consegui obter o visual desejado do gráfico com o seguinte código:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">#######################################<br></blockquote><blockquote type="cite">set.seed(1234)<br></blockquote><blockquote type="cite">x1 <- abs(rnorm(10))<br></blockquote><blockquote type="cite">x2 <- abs(rnorm(10)) + 100<br></blockquote><blockquote type="cite">### Primeira Camada<br></blockquote><blockquote type="cite">par(mar=c(4.5,4,4,4.5), yaxs='i')<br></blockquote><blockquote type="cite">plot( bp[,1], x2, xlim=c(0,12), xlab='', ylab='', xaxt='n', yaxt='n', <br></blockquote><blockquote type="cite">bty='n', ylim=c(100,103), t='n'  )<br></blockquote><blockquote type="cite">axis(4)<br></blockquote><blockquote type="cite">mtext('VAR 02', side=4, padj=4.5)<br></blockquote><blockquote type="cite">grid()<br></blockquote><blockquote type="cite">### Segunda Camada<br></blockquote><blockquote type="cite">par( new=T, yaxs='i' )<br></blockquote><blockquote type="cite">bp <- barplot( x1, xlim=c(0,12), ylim=c(0,3), xlab='', ylab='VAR 01', <br></blockquote><blockquote type="cite">names.arg=letters[1:10] )<br></blockquote><blockquote type="cite">### Terceira Camada<br></blockquote><blockquote type="cite">par( new=T, yaxs='i' )<br></blockquote><blockquote type="cite">plot( bp[,1], x2, t='b', xlim=c(0,12), xlab='', ylab='', xaxt='n', <br></blockquote><blockquote type="cite">yaxt='n', bty='n', ylim=c(100,103) )<br></blockquote><blockquote type="cite">#######################################<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Porém gostaria de saber o modo mais correto de se fazer a mesma coisa e<br></blockquote><blockquote type="cite">também de como retirar as configurações do XLAB='VAR 01' e<br></blockquote><blockquote type="cite">repassar para o segundo eixo de forma idêntica!<br></blockquote><blockquote type="cite">O código acima assusta de tão horrível! :-(<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Cleber<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Em 20/02/2012 16:02, Cleber N.Borges escreveu:<br></blockquote><blockquote type="cite"><blockquote type="cite">Olá a todos,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Gostaria de ajustar um segundo eixo Y (VAR 01), de acordo com o <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">primeiro eixo Y (VAR 02).<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">o que eu não consegui:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">1 - ajustar o 'zero' do primeiro com o 'zero' do segundo eixo Y<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">2 - colocar o nome do segundo eixo (um ylab='VAR 02')<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Imagino que vendo o que eu quero, fica mais fácil entender, então <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">segue um código exemplo junto.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Agradeço antecipadamente por qualquer ajuda.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Cleber<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">#############<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">set.seed(1234)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">x1 <- abs(rnorm(10))<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">x2 <- abs(rnorm(10)) + 100<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">par(mar=c(5,4,4,5))<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">bp <- barplot( x1, xlim=c(0,12), ylim=c(0,3), xlab='', ylab='VAR 01', <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">xaxt='n')<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">par( new=T )<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">plot( bp[,1], x2, t='b', xlim=c(0,12), xlab='', ylab='', xaxt='n', <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">yaxt='n', bty='n', ylim=c(100,103) )<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">axis(4, ylab='VAR 02')<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">grid()<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">axis(1, at=bp[,1], labels=letters[1:10])<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">R-br mailing list<br></blockquote><blockquote type="cite"><a href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br></blockquote><blockquote type="cite"><a href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br></blockquote><blockquote type="cite">Leia o guia de postagem (<a href="http://www.leg.ufpr.br/r-br-guia">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br></blockquote><br><br>_______________________________________________<br>R-br mailing list<br><a href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br>https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br<br>Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça código mínimo reproduzível.<br></div></blockquote></div><br></div></body></html>