<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Olá Andre<br>
      <br>
      foi dado duas formas de se fazer: uma usando o forestplot e outra
      uma correção do código que coloquei, segue as duas.<br>
      Um abraço<br>
      Humberto <br>
      <br>
      1- Codigo corrigido<br>
      par(mar=c(2, 8, 0, 0))<br>
      y.axis <- c(length(tableMat1a$or):1)<br>
      plot(tableMat1a$or,y.axis, type = "p", axes = F, xlab = "", ylab =
      "", pch = 19, cex = 1.2,xlim = c(0,1.2), xaxs = "r", main = "")<br>
      segments(tableMat1a$lci, y.axis, tableMat1a$uci, y.axis, lwd = 
      1.5)<br>
      axis(1,at=seq(0,1.2,by=0.1),labels = T,tick =T,cex.axis = 1.2,mgp
      = c(2,.7,0))<br>
      axis(2, at = y.axis, label = tableMat1a$Specie, las = 1, tick = F,
      mgp = c(2,.6,0),cex.axis = 1.2)<br>
      segments(1,1,1,30,lty=1)<br>
      <br>
      2-Forestplot<br>
      <br>
      # d is a data frame with 4 columns<br>
      # d$x gives variable names<br>
      # d$y gives center point<br>
      # d$ylo gives lower limits<br>
      # d$yhi gives upper limits<br>
      forestplot <- function(d, xlab="Odds Ratio", ylab="Study"){<br>
        require(ggplot2)<br>
        p <- ggplot(d, aes(x=x, y=y, ymin=ylo, ymax=yhi)) +<br>
          geom_pointrange() +<br>
          coord_flip() +<br>
          geom_hline(aes(x=0), lty=2) +<br>
          ylab(xlab) +<br>
          xlab(ylab) #switch because of the coord_flip() above<br>
        return(p)<br>
      }<br>
      <br>
      # Create some dummy data.<br>
      d <- data.frame(x = toupper(letters[1:10]),<br>
                      y = rnorm(10, .05, 0.1))<br>
      d <- transform(d, ylo = y-1/10, yhi=y+1/10)<br>
      <br>
      my_theme <-<br>
        theme(<br>
          legend.position = "bottom",<br>
          plot.title = element_text(size = rel(1.5)),<br>
          panel.background =<br>
            element_rect(fill = "white"),<br>
          panel.border =<br>
            element_rect(colour = "black", fill="transparent",
      linetype="solid"),<br>
          panel.grid.major =<br>
            element_line(colour = "darkgrey", linetype = "dashed"),<br>
          panel.grid.minor =<br>
            element_line(colour = "dark grey", linetype = "dotted")<br>
        )<br>
      <br>
      forestplot(d) + my_theme<br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      Em 10/25/2012 9:34 PM, andrebvs escreveu:<br>
    </div>
    <blockquote
      cite="mid:5089cc7bb5ee3_67f8a4c147c2fd@a4-winter17.tmail"
      type="cite">
      <div>E aí Humberto, como ficou o comando finalizado para resolver
        seu problema? Porque, acabou que alguns colegas te ajudaram
        aqui, ficando um pouco espalhado as informações, então, copia e
        cola aqui o resultado final da rotina!<br>
        <br>
      </div>
      <div><em>Att.</em></div>
      <div><em>André</em></div>
      <div> </div>
      <hr style="border-top: 1px solid #ccc;">
      <div>Em 25/10/2012 17:28, <strong>Humberto <
          <a class="moz-txt-link-abbreviated" href="mailto:hghazin@hotmail.com">hghazin@hotmail.com</a> ></strong> escreveu:</div>
      <div class="moz-cite-prefix">Obrigado Heloisa Problema resolvido<br>
        <br>
        abr<br>
        <br>
        Humberto<br>
        <br>
        Em 10/25/2012 5:03 PM, Heloíse Pavanato escreveu:</div>
      <blockquote
cite="mid:CAPw23dFxP57r=6OA7SjbeG3iDBwVoLrKGTGo8QUxRriMfugLNQ@mail.gmail.com">Desculpe...
        <div>É no próprio plot.</div>
        <div><br>
          <span style="color: #222222; font-family: arial,sans-serif;
            font-size: 13px; background-color: #ffffff;">plot(tableMat1a$or,y.axis,
            type = "p", axes = F, xlab = "", ylab = "", pch = 19, cex =
            1.2, </span><br>
          <span style="color: #222222; font-family: arial,sans-serif;
            font-size: 13px; background-color: #ffffff;">     xlim =
            c(0,1.2), xaxs = "r", main = "", </span><span
            style="font-family: arial,sans-serif; font-size: 13px;
            background-color: #ffffff;"><span style="color: #ff0000;">xaxt='n'</span></span><span
            style="color: #222222; font-family: arial,sans-serif;
            font-size: 13px; background-color: #ffffff;">)</span><br>
          <br>
          <div class="gmail_quote">Em 25 de outubro de 2012 16:57,
            Humberto <span dir="ltr"><<a moz-do-not-send="true"
                href="mailto:hghazin@hotmail.com" target="_blank">hghazin@hotmail.com</a>></span>
            escreveu:<br>
            <blockquote class="gmail_quote" style="margin: 0 0 0 .8ex;
              border-left: 1px #ccc solid; padding-left: 1ex;">
              <div>
                <div>Leonard,<br>
                  <br>
                  Muito obrigado pela ajuda mais uma vez!<br>
                  <br>
                  Abr<br>
                  <br>
                  Humberto<br>
                  <br>
                  <br>
                  Em 10/25/2012 2:57 PM, Leonard de Assis escreveu:</div>
                <div>
                  <div class="h5">
                    <blockquote>
                      <div>quanto ao fundo cinza:<br>
                        <br>
                        my_theme <-<br>
                          theme(<br>
                            legend.position = "bottom",<br>
                            plot.title = element_text(size = rel(1.5)),<br>
                            panel.background =<br>
                              element_rect(fill = "white"),<br>
                            panel.border =<br>
                              element_rect(colour = "black",
                        fill="transparent", linetype="solid"),<br>
                            panel.grid.major =<br>
                              element_line(colour = "darkgrey", linetype
                        = "dashed"),<br>
                            panel.grid.minor =<br>
                              element_line(colour = "dark grey",
                        linetype = "dotted")<br>
                          )<br>
                        <br>
                        forestplot(d) + my_theme<br>
                        <br>
                        este my_theme é um tema que eu utilizo em meus
                        gráficos. Basta alterar nos locais certos<br>
                        <br>
                        quanto ao posicionamento da linha vertical,
                        substitua 'aes(x=0)' por 'aes(x=1)'<br>
                        <br>
                        <br>
                        <pre>[]s
Leonard de Assis
assis  leonard  gmail  com
</pre>
                        Em 25/10/2012 13:18, Humberto escreveu:</div>
                      <blockquote>
                        <div>Olá Andre, Ivan e Leonard<br>
                          <br>
                          Muito obrigado pela ajuda! eu consegui dessa
                          forma aqui! Porém no eixo dos x esta
                          aperecendo numeros que se sobrepostos aos
                          nomes das espécies que não estou conseguindo
                          retirar. Alguem poderia me ajudar nesse
                          sentido!<br>
                          <br>
                          Gostei dessa alternativa do forestplot. Como
                          faço para retirar esse background (cinza) do
                          forestplot e adicionar a linha vertical no 1?<br>
                          <br>
                          E mais uma vez obrigado a todos pela ajuda<br>
                          <br>
                          tableMat1a é a tabela abaixo<br>
                          <br>
                          <pre style="font-family: 'Lucida Console'; font-size: 10pt!important; outline-style: none; outline-width: initial; outline-color: initial; border-width: initial; border-color: initial; white-space: pre-wrap!important; line-height: 1.2; border-style: none; margin: 0px;">                   Specie    lci     or   uci
1             Bigeye tuna 0.0952 0.1293 0.176
2          Yellowfin tuna 0.0916 0.1255 0.172
3                Albacore 0.0913 0.1562 0.267
4               Swordfish 0.1311 0.1565 0.187
5                Sailfish 0.0368 0.0923 0.231
6            White marlim 0.1300 0.2161 0.359
7             Blue marlim 0.0738 0.1471 0.293
8              Blue shark 0.1303 0.1653 0.210
9         Crocodile shark 0.1123 0.1792 0.286
10       Pelagic stingray 0.1074 0.2052 0.392
11           Turtle oliva 0.1275 0.3802 1.134
12 Oceanic whitetip shark 0.1658 0.3788 0.866</pre>
                          <br>
                          <br>
                          par(mar=c(2, 8, 0, 0))<br>
                          y.axis plot(tableMat1a$or,y.axis, type = "p",
                          axes = F, xlab = "", ylab = "", pch = 19, cex
                          = 1.2, <br>
                               xlim = c(0,1.2), xaxs = "r", main = "")<br>
                          segments(tableMat1a$lci, y.axis,
                          tableMat1a$uci, y.axis, lwd =  1.5)<br>
                          axis(1, at = seq(0,1.2,by=0.2), labels = NA,
                          tick = T,<br>
                               cex.axis = 1.2, mgp = c(2,.7,0))<br>
                          axis(2, at = y.axis, label =
                          tableMat1a$Specie, las = 1, tick = F, ,mgp =
                          c(2,.6,0),cex.axis = 1.2)<br>
                          segments(1,1,1,30,lty=1)<br>
                          <br>
                          <br>
                          <br>
                          <br>
                          <br>
                          <br>
                          <br>
                          <br>
                          <br>
                          Em 10/25/2012 12:09 AM, Leonard de Assis
                          escreveu:</div>
                        <blockquote>
                          <div>Andre,<br>
                            <br>
                            vi a pouco na lista do ggplot2 um script que
                            pode ser o que voce procura.<br>
                            <br>
                            # d is a data frame with 4 columns<br>
                            # d$x gives variable names<br>
                            # d$y gives center point<br>
                            # d$ylo gives lower limits<br>
                            # d$yhi gives upper limits<br>
                            forestplot   require(ggplot2)<br>
                              p     geom_pointrange() +<br>
                                coord_flip() +<br>
                                geom_hline(aes(x=0), lty=2) +<br>
                                ylab(xlab) +<br>
                                xlab(ylab) #switch because of the
                            coord_flip() above<br>
                              return(p)<br>
                            }<br>
                            <br>
                            # Create some dummy data.<br>
                            d                 y = rnorm(10, .05, 0.1))<br>
                            d <br>
                            forestplot(d)<br>
                            <br>
                            <pre>[]s
Leonard de Assis
assis  leonard  gmail  com
</pre>
                            Em 24/10/2012 23:55, andrebvs escreveu:</div>
                          <blockquote>
                            <div>Olá Humberto!</div>
                            <div> </div>
                            <div>Eu até começei a fazer o que estava
                              querendo, porém, não consegui implementar
                              os intervalos de confianças com as
                              respectivas médias. Segue um script abaixo
                              até onde cheguei, se alguém puder
                              continuar e sanar sua dúvida, seria uma
                              grande ajuda!</div>
                            <div><br>
                              library(fields)<br>
                              plot(xlim=c(0,1.8),5:10,
                              bty='n',type="n",axes=F,xlab="Relative
                              catchability",ylab="")<br>
                              x y u v <br>
                              axis(1,lwd=2,at = x,labels = formatC(x,
                              format="fg"))<br>
                              abline(v = 1, col = "black",lty=1,lwd=2)<br>
                              arrow.plot(x[6],y[6],v,u,arrow.ex=.4,
                              length=.2, col='black', lwd=2) <br>
                              arrow.plot(x[6],y[6],u-360,v-45,arrow.ex=.5,
                              length=.2, col='black', lwd=2) <br>
                              <br>
                              text(0,7,"Bigeye\nYellowfin
                              tuna\nAlbacore\nSwordfish\nSailfish\nWhite
                              marlim\nBlue marlim\nBlue shark\nCrocodile
                              shark\nPelagic stingray\nTurtle
                              oliva\nOceanic whitetip shark",cex =
                              0.8,adj=c(0,0))</div>
                            <div><br>
                              text(1.1,5,"Species\nBigeye
                              tuna\nYellowfin
                              tuna\nAlbacore\nSwordfish\nSailfish\nWhite
                              marlim\nBlue marlim\nBlue shark\nCrocodile
                              shark\nPelagic stingray\nTurtle
                              oliva\nOceanic whitetip shark",cex =
                              0.8,adj=c(0,0))<br>
                              <br>
                            </div>
                            <div><em>Att.</em></div>
                            <div><em>André Barbosa Ventura da Silva</em></div>
                            <div> </div>
                            <div> </div>
                            <hr style="border-top: 1px solid #ccc;">
                            <div>Em 24/10/2012 20:38, <strong>Ivan
                                Bezerra Allaman < <a
                                  moz-do-not-send="true"
                                  href="mailto:ivanalaman@yahoo.com.br"
                                  target="_blank">ivanalaman@yahoo.com.br</a>
                                ></strong> escreveu:</div>
                            <div style="font-size: 12pt; font-family:
                              arial,helvetica,sans-serif;">
                              <div><span>Utilize as funções plot,
                                  segments e par para obter êxito! O
                                  link abaixo será útil também.</span></div>
                              <div style="font-style: normal; font-size:
                                16px; background-color: transparent;
                                font-family:
                                arial,helvetica,sans-serif;"> </div>
                              <div style="font-style: normal; font-size:
                                16px; background-color: transparent;
                                font-family:
                                arial,helvetica,sans-serif;"><span><a
                                    moz-do-not-send="true"
                                    href="http://gallery.r-enthusiasts.com/"
                                    target="_blank">http://gallery.r-enthusiasts.com/</a><br>
                                </span></div>
                              <div style="font-style: normal; font-size:
                                16px; background-color: transparent;
                                font-family:
                                arial,helvetica,sans-serif;"> </div>
                              <div style="font-style: normal; font-size:
                                16px; background-color: transparent;
                                font-family:
                                arial,helvetica,sans-serif;"><span>(S,f,P)<br>
                                </span></div>
                              <div><span>Allaman</span></div>
                              <div> </div>
                              <div style="background-color:
                                transparent;" align="center"><span
                                  style="background-color: transparent;
                                  font-family: comic sans ms; font-size:
                                  small;"><span style="font-size:
                                    xx-small;"><strong> </strong></span></span></div>
                              <div style="text-align: left;
                                background-color: transparent;"
                                align="center"><span
                                  style="background-color: transparent;"><span
                                    style="font-family:
                                    courier,monaco,monospace,sans-serif;
                                    font-size: small;">\begin{signature}</span></span></div>
                              <div style="text-align: left;
                                background-color: transparent;"
                                align="center"><span
                                  style="background-color: transparent;"><span
                                    style="font-family:
                                    courier,monaco,monospace,sans-serif;
                                    font-size: small;"><<>>=</span></span></div>
                              <div style="text-align: left;
                                background-color: transparent;"
                                align="center"><span style="font-family:
                                  courier,monaco,monospace,sans-serif;
                                  font-size: small;">Prof. Dr. Ivan
                                  Bezerra Allaman</span></div>
                              <div style="text-align: left;
                                background-color: transparent;"
                                align="center"><span style="font-family:
                                  courier,monaco,monospace,sans-serif;
                                  font-size: small;">Universidade
                                  Estadual de Santa Cruz</span></div>
                              <div style="text-align: left;
                                background-color: transparent;"
                                align="center"><span style="font-family:
                                  courier,monaco,monospace,sans-serif;
                                  font-size: small;">Departamento de
                                  Ciências Exatas e Tecnológicas</span></div>
                              <div style="text-align: left;
                                background-color: transparent;"
                                align="center"><span style="font-family:
                                  courier,monaco,monospace,sans-serif;
                                  font-size: small;">Ilhéus/BA - Brasil</span></div>
                              <div style="text-align: left;
                                background-color: transparent;"
                                align="center"><span style="font-family:
                                  courier,monaco,monospace,sans-serif;
                                  font-size: small;">Fone: <a
                                    moz-do-not-send="true"
                                    href="tel:%2B55%2073%203680-5596"
                                    target="_blank">+55 73 3680-5596</a></span></div>
                              <div style="text-align: left;
                                background-color: transparent;"
                                align="center"><span style="font-family:
                                  courier,monaco,monospace,sans-serif;
                                  font-size: small;">E-mail: <a
                                    moz-do-not-send="true"
                                    href="mailto:ivanalaman@yahoo.com.br/ivanalaman@gmail.com"
                                    target="_blank">ivanalaman@yahoo.com.br/ivanalaman@gmail.com</a></span></div>
                              <div style="text-align: left;
                                background-color: transparent;"
                                align="center"><span
                                  style="background-color: transparent;"><span
                                    style="font-family:
                                    courier,monaco,monospace,sans-serif;
                                    font-size: small;">@</span></span></div>
                              <div style="text-align: left;
                                background-color: transparent;"
                                align="center"><span
                                  style="background-color: transparent;"><span
                                    style="font-family:
                                    courier,monaco,monospace,sans-serif;
                                    font-size: small;">\end{signature}</span></span></div>
                            </div>
                            <div> </div>
                            <br>
                            <fieldset></fieldset>
                            <br>
                            <pre>_______________________________________________
R-br mailing list
<a moz-do-not-send="true" href="mailto:R-br@listas.c3sl.ufpr.br" target="_blank">R-br@listas.c3sl.ufpr.br</a>
<a moz-do-not-send="true" href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" target="_blank">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a>
Leia o guia de postagem (<a moz-do-not-send="true" href="http://www.leg.ufpr.br/r-br-guia" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.</pre>
                          </blockquote>
                          <br>
                          <br>
                          <fieldset></fieldset>
                          <br>
                          <pre>_______________________________________________
R-br mailing list
<a moz-do-not-send="true" href="mailto:R-br@listas.c3sl.ufpr.br" target="_blank">R-br@listas.c3sl.ufpr.br</a>
<a moz-do-not-send="true" href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" target="_blank">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a>
Leia o guia de postagem (<a moz-do-not-send="true" href="http://www.leg.ufpr.br/r-br-guia" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.</pre>
                        </blockquote>
                        <br>
                        <br>
                        <fieldset></fieldset>
                        <br>
                        <pre>_______________________________________________
R-br mailing list
<a moz-do-not-send="true" href="mailto:R-br@listas.c3sl.ufpr.br" target="_blank">R-br@listas.c3sl.ufpr.br</a>
<a moz-do-not-send="true" href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" target="_blank">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a>
Leia o guia de postagem (<a moz-do-not-send="true" href="http://www.leg.ufpr.br/r-br-guia" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.</pre>
                      </blockquote>
                      <br>
                      <br>
                      <fieldset></fieldset>
                      <br>
                      <pre>_______________________________________________
R-br mailing list
<a moz-do-not-send="true" href="mailto:R-br@listas.c3sl.ufpr.br" target="_blank">R-br@listas.c3sl.ufpr.br</a>
<a moz-do-not-send="true" href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" target="_blank">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a>
Leia o guia de postagem (<a moz-do-not-send="true" href="http://www.leg.ufpr.br/r-br-guia" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.</pre>
                    </blockquote>
                  </div>
                </div>
              </div>
              <br>
              _______________________________________________<br>
              R-br mailing list<br>
              <a moz-do-not-send="true"
                href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br>
              <a moz-do-not-send="true"
                href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br"
                target="_blank">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br>
              Leia o guia de postagem (<a moz-do-not-send="true"
                href="http://www.leg.ufpr.br/r-br-guia" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>)
              e forneça código mínimo reproduzível.</blockquote>
          </div>
        </div>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre>_______________________________________________
R-br mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="../../../undefined//compose?to=R-br@listas.c3sl.ufpr.br" target="_blank">R-br@listas.c3sl.ufpr.br</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" target="_blank">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a>
Leia o guia de postagem (<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.leg.ufpr.br/r-br-guia" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.</pre>
      </blockquote>
      <div><br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
R-br mailing list
<a class="moz-txt-link-abbreviated" href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a>
<a class="moz-txt-link-freetext" href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a>
Leia o guia de postagem (<a class="moz-txt-link-freetext" 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.</pre>
    </blockquote>
    <br>
  </body>
</html>