<div dir="ltr">Oi João,<div><br></div><div>Você deveria usar 'Indice' ao invés de 'value' em <span style="font-size:12.8px">aes(x = value*10, y = modelos)). Além disso, te sugiro trocar 'Indice c' por 'Indice_c' ou algo assim para que o argumento funcione corretamente.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Em scale_x_continuous você pode usar:</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">scale_x_continuous(breaks = c(0, 0.5, 1), labels = c(0, 0.6, 0.9), limits = c(0,1)) +</span><br></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">para definir o limite dos seus plots.</span></div><div><span style="font-size:12.8px">Não entendi porque se multiplicou o value (Indice) por 10, com esta escala não precisaria.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"># Ficaria assim:</span></div><div><span style="font-size:12.8px"><br></span></div><div><div><span style="font-size:12.8px">p <- ggplot(my_data_long, aes(x = Indice_c, y = modelos)) +</span></div><div><span style="font-size:12.8px"> geom_point() +</span></div><div><span style="font-size:12.8px"> facet_wrap(~ county, ncol = 4)+</span></div><div><span style="font-size:12.8px"> scale_x_continuous(breaks = c(0, 0.5, 1), labels = c(0, 0.6, 0.9), limits = c(0,1)) +</span></div><div><span style="font-size:12.8px"> labs(x = "Indice de concordancia", y = NULL)+</span></div><div><span style="font-size:12.8px"> ggtitle("Indice de concordancia c") +</span></div><div><span style="font-size:12.8px"> theme_bw()+</span></div><div><span style="font-size:12.8px"> theme(panel.grid.major.y = element_line(colour = "grey60"),</span></div><div><span style="font-size:12.8px"> panel.grid.major.x = element_blank(),</span></div><div><span style="font-size:12.8px"> panel.grid.minor = element_blank(),</span></div><div><span style="font-size:12.8px"> panel.margin = unit(0, "lines"),</span></div><div><span style="font-size:12.8px"> plot.title = element_text(size = rel(1.1), face = "bold", vjust = 2),</span></div><div><span style="font-size:12.8px"> strip.background = element_rect(fill = "grey80"),</span></div><div><span style="font-size:12.8px"> axis.ticks.y = element_blank())</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">p</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">ggsave(paste(this_base, ".png"),</span></div><div><span style="font-size:12.8px"> p, width = 6, height = 8)</span></div></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Abraço,</span></div><div><span style="font-size:12.8px">Heloise.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-16 0:51 GMT-02:00 joão Rodrigo Castro <span dir="ltr"><<a href="mailto:joaorodrigo2005@gmail.com" target="_blank">joaorodrigo2005@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Pessoal,<div><br></div><div>Um erro que acredito ser no scale_x_continuous está gerando um erro no gráfico. Ao reproduzirem o script, vejam que os valores no gráfico não correspondem aos valores referentes aos fatores county e value.</div><div><br></div><div>Script:</div><div><br></div><div>############</div><div>library(ggplot2)</div><div>library(reshape2)</div><div>library(grid)</div><div><br></div><div>this_base = "Indice de concordancia"</div><div><br></div><div>my_data = data.frame(</div><div> modelos = c("BC", "CD", "DB", "HG1", "HG2"),</div><div> Alegrete = c(0.75,0.77,0.76,0.72,0.78),</div><div> Bage = c(0.80,0.82,0.79,0.76,0.81),</div><div> Camaqua = c(0.72,0.76,0.73,0.78,0.77),</div><div> Cangucu = c(0.68,0.70,0.68,0.76,0.73),</div><div> Dom_Pedrito = c(0.812,0.829,0.812,0.845,0.831),</div><div> Enc._do_Sul = c(0.457,0.751,0.741,0.785,0.749),</div><div> Jaguarao = c(0.742,0.775,0.722,0.815,0.821),</div><div> Mostardas = c(0.510,0.423,0.135,0.590,0.506),</div><div> Pelotas = c(0.739,0.760,0.745,0.773,0.741),</div><div> Porto_Alegre = c(0.778,0.801,0.773,0.808,0.800),</div><div> Quarai = c(0.8008,0.8205,0.8052,0.8210,0.8095),</div><div> Rio_Grande = c(0.591,0.598,0.382,0.725,0.734),</div><div> Rio_Pardo = c(0.803,0.818,0.780,0.830,0.805),</div><div> Santiago= c(0.779,0.778,0.763,0.800,0.760),</div><div> Sao_Borja= c(0.755,0.777,0.756,0.804,0.782),</div><div> Sao_Gabriel= c(0.812,0.829,0.811,0.849,0.831),</div><div> Sao_Luiz_Gonzaga= c(0.770,0.778,0.766,0.805,0.756),</div><div> Sant._Livramento= c(0.803,0.805,0.801,0.817,0.777),</div><div> Santa_V_Palmar= c(0.619,0.588,0.385,0.710,0.702),</div><div> Santa_Maria= c(0.721,0.753,0.685,0.775,0.764),</div><div> Torres= c(0.544,0.595,0.306,0.603,0.621),</div><div> Tramandai= c(0.461,0.483,0.111,0.561,0.544),</div><div> Uruguaiana= c(0.801,0.811,0.782,0.818,0.795))</div><div> </div><div>my_data_long = melt(my_data, id = "modelos",</div><div> <a href="http://variable.name" target="_blank">variable.name</a> = "county", <a href="http://value.name" target="_blank">value.name</a> = "Indice c")</div><div><br></div><div>my_data_long$county = factor( </div><div> c("Alegrete", "Bage", "Camaqua", "Cangucu", "Dom Pedrito",</div><div> "Enc. do Sul", "Jaguarao", "Mostardas", "Pelotas",</div><div> "Porto Alegre", "Quarai", "Rio Grande","Rio Pardo",</div><div><span style="white-space:pre-wrap"> </span>"Santiago","Sao Borja","Sao Gabriel",</div><div><span style="white-space:pre-wrap"> </span>"S.L. Gonzaga","S. Livramento",</div><div><span style="white-space:pre-wrap"> </span>"St.V. Palmar","Santa Maria","Torres",</div><div><span style="white-space:pre-wrap"> </span>"Tramandai","Uruguaiana"))</div><div><br></div><div>my_data_long$modelos =</div><div> factor(my_data_long$modelos,</div><div> rev(c("BC", "CD", "DB", "HG1", "HG2")))</div><div><br></div><div>p <- ggplot(my_data_long, aes(x = value*10, y = modelos)) +</div><div> geom_point() +</div><div> facet_wrap(~ county, ncol = 4) </div><div> #scale_x_continuous(breaks = c(0,0.5,1),labels = c( 0,0.6,0.9)) +</div><div> labs(x = "Indice de concordancia", y = NULL) </div><div> ggtitle("Indice de concordancia c") +</div><div> theme_bw() </div><div> theme(panel.grid.major.y = element_line(colour = "grey60"),</div><div> panel.grid.major.x = element_blank(),</div><div> panel.grid.minor = element_blank(),</div><div> panel.margin = unit(0, "lines"),</div><div> plot.title = element_text(size = rel(1.1), face = "bold", vjust = 2),</div><div> strip.background = element_rect(fill = "grey80"),</div><div> axis.ticks.y = element_blank())</div><div><br></div><div>p</div><div><br></div><div>ggsave(paste(this_base, ".png"),</div><div> p, width = 6, height = 8) </div><div><br></div><div>################</div><div><br></div><div>Acredito que seja no argumento break, sinceramente não consegui desenvolver..</div><div>sds</div><span class="HOEnZb"><font color="#888888"><div><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><font color="#666666">João Rodrigo de Castro</font><div><font color="#666666">Programa de Pós-Graduação em Meteorologia</font></div><div><font color="#666666">Bolsista Laboratório de Agrometeorologia - Embrapa Clima Temperado</font></div><div><font color="#666666">Universidade Federal de Pelotas</font></div></div></div></div></div>
</div></font></span></div>
<br>_______________________________________________<br>
R-br mailing list<br>
<a href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br>
<a href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" rel="noreferrer" target="_blank">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br>
Leia o guia de postagem (<a href="http://www.leg.ufpr.br/r-br-guia" rel="noreferrer" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br></blockquote></div><br></div>