<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px">Isso mesmo, usa o ggplot2<br><div id="yui_3_16_0_ym19_1_1465237665528_2841"><br><span></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1465237665528_2974"><span id="yui_3_16_0_ym19_1_1465237665528_2977"><a id="yui_3_16_0_ym19_1_1465237665528_2975" href="http://www.ceb-institute.org/bbs/wp-content/uploads/2011/09/handout_ggplot2.pdf">http://www.ceb-institute.org/bbs/wp-content/uploads/2011/09/handout_ggplot2.pdf</a></span></div> <div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 13px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font face="Arial" size="2"> Em Segunda-feira, 6 de Junho de 2016 14:41, Augusto Ribas <ribas.aca@gmail.com> escreveu:<br></font></div> <br><br> <div class="y_msg_container"><div id="yiv5975541254"><div><div dir="ltr"><div>Usando o ggplot2, eu achei relativamente mais fácil fazer gráficos circulares que com outros pacotes, como o circ e o circular. Basta você fazer um gráfico normal e depois adicionar <span style="color:rgb(0,136,0);">+</span> coord_polar<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,136,0);">)<br clear="none"></span></div><div>Segue uns exemplos que eu estava testando, talvez você ache interessante.<br clear="none"></div><div><pre class="yiv5975541254" style="font-family:monospace;"><span style="color:rgb(0,0,255);font-weight:bold;">library</span><span style="color:rgb(0,136,0);">(</span><span style="color:rgb(255,0,0);">"ggplot2"</span><span style="color:rgb(0,136,0);">)</span>
dados<span style="color:rgb(0,136,0);"><-</span><span style="color:rgb(0,0,255);font-weight:bold;">data.<span style="">frame</span></span><span style="color:rgb(0,136,0);">(</span>preditor<span style="color:rgb(0,136,0);">=</span><span style="color:rgb(255,0,0);">1</span><span style="color:rgb(0,136,0);">:</span><span style="color:rgb(255,0,0);">20</span>,resposta<span style="color:rgb(0,136,0);">=</span><span style="color:rgb(0,0,255);font-weight:bold;">runif</span><span style="color:rgb(0,136,0);">(</span><span style="color:rgb(255,0,0);">20</span>,<span style="color:rgb(255,0,0);">5</span>,<span style="color:rgb(255,0,0);">10</span><span style="color:rgb(0,136,0);">)</span>,grupo<span style="color:rgb(0,136,0);">=</span><span style="color:rgb(0,0,255);font-weight:bold;">rep</span><span style="color:rgb(0,136,0);">(</span><span style="color:rgb(255,0,0);">1</span><span style="color:rgb(0,136,0);">:</span><span style="color:rgb(255,0,0);">4</span>,each<span style="color:rgb(0,136,0);">=</span><span style="color:rgb(255,0,0);">5</span><span style="color:rgb(0,136,0);">)</span>,linha<span style="color:rgb(0,136,0);">=</span><span style="color:rgb(0,0,255);font-weight:bold;">runif</span><span style="color:rgb(0,136,0);">(</span><span style="color:rgb(255,0,0);">20</span>,<span style="color:rgb(255,0,0);">8</span>,<span style="color:rgb(255,0,0);">12</span><span style="color:rgb(0,136,0);">)</span><span style="color:rgb(0,136,0);">)</span>
<span style="color:rgb(0,0,255);font-weight:bold;">head</span><span style="color:rgb(0,136,0);">(</span>dados<span style="color:rgb(0,136,0);">)</span>
<span style="color:rgb(34,139,34);">## Gráfico de barras</span>
ggplot<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,0,255);font-weight:bold;">data</span><span style="color:rgb(0,136,0);">=</span>dados, aes<span style="color:rgb(0,136,0);">(</span>x<span style="color:rgb(0,136,0);">=</span>preditor, y<span style="color:rgb(0,136,0);">=</span>resposta<span style="color:rgb(0,136,0);">)</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> geom_bar<span style="color:rgb(0,136,0);">(</span>stat<span style="color:rgb(0,136,0);">=</span><span style="color:rgb(255,0,0);">"identity"</span><span style="color:rgb(0,136,0);">)</span>
<span style="color:rgb(34,139,34);">## Separando por grupos</span>
ggplot<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,0,255);font-weight:bold;">data</span><span style="color:rgb(0,136,0);">=</span>dados, aes<span style="color:rgb(0,136,0);">(</span>x<span style="color:rgb(0,136,0);">=</span>preditor, y<span style="color:rgb(0,136,0);">=</span>resposta,fill<span style="color:rgb(0,136,0);">=</span>grupo<span style="color:rgb(0,136,0);">)</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> geom_bar<span style="color:rgb(0,136,0);">(</span>stat<span style="color:rgb(0,136,0);">=</span><span style="color:rgb(255,0,0);">"identity"</span><span style="color:rgb(0,136,0);">)</span>
<span style="color:rgb(34,139,34);">##ggplot(data=dados, aes(x=preditor, y=resposta)) + geom_bar(aes(fill=grupo),stat="identity")</span>
<span style="color:rgb(34,139,34);">## Adicionando um contorno preto, e retirando a legenda</span>
ggplot<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,0,255);font-weight:bold;">data</span><span style="color:rgb(0,136,0);">=</span>dados, aes<span style="color:rgb(0,136,0);">(</span>x<span style="color:rgb(0,136,0);">=</span>preditor, y<span style="color:rgb(0,136,0);">=</span>resposta,fill<span style="color:rgb(0,136,0);">=</span>grupo<span style="color:rgb(0,136,0);">)</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> geom_bar<span style="color:rgb(0,136,0);">(</span>colour<span style="color:rgb(0,136,0);">=</span><span style="color:rgb(255,0,0);">"black"</span>,stat<span style="color:rgb(0,136,0);">=</span><span style="color:rgb(255,0,0);">"identity"</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> guides<span style="color:rgb(0,136,0);">(</span>fill<span style="color:rgb(0,136,0);">=</span>FALSE<span style="color:rgb(0,136,0);">)</span>
<span style="color:rgb(34,139,34);">##Gráfico de linhas</span>
ggplot<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,0,255);font-weight:bold;">data</span><span style="color:rgb(0,136,0);">=</span>dados, aes<span style="color:rgb(0,136,0);">(</span>x<span style="color:rgb(0,136,0);">=</span>preditor, y<span style="color:rgb(0,136,0);">=</span>linha<span style="color:rgb(0,136,0);">)</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> geom_line<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> guides<span style="color:rgb(0,136,0);">(</span>fill<span style="color:rgb(0,136,0);">=</span>FALSE<span style="color:rgb(0,136,0);">)</span>
ggplot<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,0,255);font-weight:bold;">data</span><span style="color:rgb(0,136,0);">=</span>dados, aes<span style="color:rgb(0,136,0);">(</span>x<span style="color:rgb(0,136,0);">=</span>preditor, y<span style="color:rgb(0,136,0);">=</span>linha<span style="color:rgb(0,136,0);">)</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> geom_line<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> geom_point<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> guides<span style="color:rgb(0,136,0);">(</span>fill<span style="color:rgb(0,136,0);">=</span>FALSE<span style="color:rgb(0,136,0);">)</span>
<span style="color:rgb(34,139,34);">##Combinando os dois</span>
ggplot<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,0,255);font-weight:bold;">data</span><span style="color:rgb(0,136,0);">=</span>dados, aes<span style="color:rgb(0,136,0);">(</span>x<span style="color:rgb(0,136,0);">=</span>preditor, y<span style="color:rgb(0,136,0);">=</span>resposta,fill<span style="color:rgb(0,136,0);">=</span>grupo<span style="color:rgb(0,136,0);">)</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> geom_bar<span style="color:rgb(0,136,0);">(</span>colour<span style="color:rgb(0,136,0);">=</span><span style="color:rgb(255,0,0);">"black"</span>,stat<span style="color:rgb(0,136,0);">=</span><span style="color:rgb(255,0,0);">"identity"</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> guides<span style="color:rgb(0,136,0);">(</span>fill<span style="color:rgb(0,136,0);">=</span>FALSE<span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span>
geom_line<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,0,255);font-weight:bold;">data</span><span style="color:rgb(0,136,0);">=</span>dados, aes<span style="color:rgb(0,136,0);">(</span>x<span style="color:rgb(0,136,0);">=</span>preditor, y<span style="color:rgb(0,136,0);">=</span>linha<span style="color:rgb(0,136,0);">)</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> geom_point<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,0,255);font-weight:bold;">data</span><span style="color:rgb(0,136,0);">=</span>dados, aes<span style="color:rgb(0,136,0);">(</span>x<span style="color:rgb(0,136,0);">=</span>preditor, y<span style="color:rgb(0,136,0);">=</span>linha<span style="color:rgb(0,136,0);">)</span><span style="color:rgb(0,136,0);">)</span>
<span style="color:rgb(34,139,34);">##Transformando em uma figura circular</span>
ggplot<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,0,255);font-weight:bold;">data</span><span style="color:rgb(0,136,0);">=</span>dados, aes<span style="color:rgb(0,136,0);">(</span>x<span style="color:rgb(0,136,0);">=</span>preditor, y<span style="color:rgb(0,136,0);">=</span>resposta,fill<span style="color:rgb(0,136,0);">=</span>grupo<span style="color:rgb(0,136,0);">)</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> geom_bar<span style="color:rgb(0,136,0);">(</span>colour<span style="color:rgb(0,136,0);">=</span><span style="color:rgb(255,0,0);">"black"</span>,stat<span style="color:rgb(0,136,0);">=</span><span style="color:rgb(255,0,0);">"identity"</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> guides<span style="color:rgb(0,136,0);">(</span>fill<span style="color:rgb(0,136,0);">=</span>FALSE<span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span>
geom_line<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,0,255);font-weight:bold;">data</span><span style="color:rgb(0,136,0);">=</span>dados, aes<span style="color:rgb(0,136,0);">(</span>x<span style="color:rgb(0,136,0);">=</span>preditor, y<span style="color:rgb(0,136,0);">=</span>linha<span style="color:rgb(0,136,0);">)</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> geom_point<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,0,255);font-weight:bold;">data</span><span style="color:rgb(0,136,0);">=</span>dados, aes<span style="color:rgb(0,136,0);">(</span>x<span style="color:rgb(0,136,0);">=</span>preditor, y<span style="color:rgb(0,136,0);">=</span>linha<span style="color:rgb(0,136,0);">)</span><span style="color:rgb(0,136,0);">)</span><span style="color:rgb(0,136,0);">+</span>coord_polar<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,136,0);">)</span>
ggplot<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,0,255);font-weight:bold;">data</span><span style="color:rgb(0,136,0);">=</span>dados, aes<span style="color:rgb(0,136,0);">(</span>x<span style="color:rgb(0,136,0);">=</span>preditor, y<span style="color:rgb(0,136,0);">=</span>linha<span style="color:rgb(0,136,0);">)</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> geom_line<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> geom_point<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> guides<span style="color:rgb(0,136,0);">(</span>fill<span style="color:rgb(0,136,0);">=</span>FALSE<span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> coord_polar<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,136,0);">)</span>
ggplot<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,0,255);font-weight:bold;">data</span><span style="color:rgb(0,136,0);">=</span>dados, aes<span style="color:rgb(0,136,0);">(</span>x<span style="color:rgb(0,136,0);">=</span>preditor, y<span style="color:rgb(0,136,0);">=</span>linha<span style="color:rgb(0,136,0);">)</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> geom_line<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> geom_point<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> guides<span style="color:rgb(0,136,0);">(</span>fill<span style="color:rgb(0,136,0);">=</span>FALSE<span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> coord_polar<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(0,136,0);">)</span> <span style="color:rgb(0,136,0);">+</span> ylim<span style="color:rgb(0,136,0);">(</span><span style="color:rgb(255,0,0);">0</span>,<span style="color:rgb(255,0,0);">12</span><span style="color:rgb(0,136,0);">)</span><span style="color:rgb(0,136,0);"></span></pre><br clear="none"></div><span style="color:rgb(0,136,0);"></span></div><div class="yiv5975541254gmail_extra"><br clear="none"><div class="yiv5975541254gmail_quote">Em 6 de junho de 2016 12:56, Cassiano <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:cassianosr@gmail.com" target="_blank" href="mailto:cassianosr@gmail.com">cassianosr@gmail.com</a>></span> escreveu:<br clear="none"><blockquote class="yiv5975541254gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv5975541254yqt3903784837" id="yiv5975541254yqt24330"><div dir="ltr"><span style="font-size:12.8px;">Prezados,</span><div style="font-size:12.8px;"><br clear="none"></div><div style="font-size:12.8px;">Tenho uns dados coletados durante o ano e fiz análise <span>circular</span>.</div><div style="font-size:12.8px;">Quanto à análise, está tranquilo, mas não consigo plotar no gráfico a variação em torno da média.</div><div style="font-size:12.8px;">Com o "arrows.<span>circular</span>" eu consegui inserir a média no gráfico, mas não encontrei nada para incluir a variação em torno da média. </div><div style="font-size:12.8px;"><br clear="none"></div><div style="font-size:12.8px;"><br clear="none"></div><div style="font-size:12.8px;">Desde já agradeço.</div><div style="font-size:12.8px;">cassiano</div><div class="yiv5975541254gmail_extra"><div class="yiv5975541254gmail_quote"><blockquote class="yiv5975541254gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex;"><br clear="none"></blockquote></div>-- <br clear="none"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="color:rgb(255,0,0);"><span style="color:rgb(0,0,0);">=======================================</span></div>Cassiano S. Rosa<div><div style="font-family:arial;font-size:small;">CRBio: 104117/04-D</div><div style="font-family:arial;font-size:small;"><br clear="none"></div><div dir="ltr" style="font-family:arial;font-size:small;"><div style="font-family:arial, sans-serif;font-size:12.8px;line-height:21.3px;color:rgb(68,68,68);"><span style="line-height:22.72px;text-align:center;"><font style="line-height:normal;"></font></span><div style="line-height:21.3px;display:inline!important;"><span style="line-height:22.72px;"><font style="line-height:normal;" face="trebuchet ms, sans-serif"></font></span><div style="line-height:21.3px;display:inline!important;">Universidade Federal do Triângulo Mineiro (UFTM), </div></div></div><div style="font-family:arial, sans-serif;font-size:12.8px;line-height:21.3px;color:rgb(68,68,68);"><span style="line-height:22.72px;text-align:center;"><font style="line-height:normal;"></font></span><div style="line-height:21.3px;display:inline!important;"><span style="line-height:22.72px;"><font style="line-height:normal;" face="trebuchet ms, sans-serif"></font></span><div style="line-height:21.3px;display:inline!important;"><i>campus</i> Iturama-MG</div></div></div><div style="font-family:arial, sans-serif;font-size:12.8px;line-height:21.3px;color:rgb(68,68,68);text-align:center;"><font face="trebuchet ms, sans-serif"><span style="line-height:22.72px;"><font style="line-height:normal;"></font></span></font><div style="text-align:left;line-height:21.3px;"><span style="line-height:21.3px;font-size:12.8px;">Avenida Rio Paranaíba, 1241, Centro, 38280-000</span><br clear="none"></div><div style="text-align:left;line-height:21.3px;"><span style="line-height:21.3px;font-size:12.8px;">Tel: (34)3415-2512</span></div></div></div><div style="text-align:justify;text-indent:30px;"><font color="#000000" face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size:11.8182px;"><br clear="none"></span></font></div><div><div><div><span style="font-family:Arial, Helvetica, sans-serif;"><span style="text-align:left;color:rgb(102,102,102);vertical-align:top;"><a rel="nofollow" shape="rect" target="_blank" href="http://lattes.cnpq.br/3030825329622014"><font size="2">Lattes</font></a></span></span></div><div><a rel="nofollow" shape="rect" target="_blank" href="http://scholar.google.com/citations?user=JmELzOMAAAAJ"><font size="2">Scholar Google</font></a></div></div><div><font size="2"><a rel="nofollow" shape="rect" target="_blank" href="https://uftm.academia.edu/CassianoRosa">Academia.edu</a></font><br clear="none"></div><div><a rel="nofollow" shape="rect" target="_blank" href="https://www.researchgate.net/profile/Cassiano_Rosa">Researchgate</a><br clear="none"></div><div><div><br clear="none">=======================================<br clear="none"></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div></div>
<br clear="none">_______________________________________________<br clear="none">
R-br mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:R-br@listas.c3sl.ufpr.br" target="_blank" href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br clear="none">
<a rel="nofollow" shape="rect" target="_blank" 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 clear="none">
Leia o guia de postagem (<a rel="nofollow" shape="rect" target="_blank" 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 clear="none"></blockquote></div><br clear="none"><br clear="all"><br clear="none">-- <br clear="none"><div class="yiv5975541254gmail_signature"><div dir="ltr"><div>Grato<br clear="none">Augusto C. A. Ribas</div>
<div> </div>
<div>Site Pessoal: <a rel="nofollow" shape="rect" target="_blank" href="http://recologia.com.br/">http://recologia.com.br/</a><a rel="nofollow" shape="rect" target="_blank" href="http://augustoribas.heliohost.org/"></a></div><div>Github: <a rel="nofollow" shape="rect" target="_blank" href="https://github.com/Squiercg">https://github.com/Squiercg</a></div>
<div>Lattes: <a rel="nofollow" shape="rect" target="_blank" href="http://lattes.cnpq.br/7355685961127056">http://lattes.cnpq.br/7355685961127056</a><br clear="none"></div></div></div>
</div></div></div><br><div class="yqt3903784837" id="yqt74432">_______________________________________________<br clear="none">R-br mailing list<br clear="none"><a shape="rect" ymailto="mailto:R-br@listas.c3sl.ufpr.br" href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br clear="none"><a shape="rect" 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 clear="none">Leia o guia de postagem (<a shape="rect" href="http://www.leg.ufpr.br/r-br-guia" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forne� c�igo m�imo reproduz�el.</div><br><br></div> </div> </div> </div></div></body></html>