<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">variable.name</a> = "county", <a href="http://value.name">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 class="" style="white-space:pre"> </span>"Santiago","Sao Borja","Sao Gabriel",</div><div><span class="" style="white-space:pre"> </span>"S.L. Gonzaga","S. Livramento",</div><div><span class="" style="white-space:pre"> </span>"St.V. Palmar","Santa Maria","Torres",</div><div><span class="" style="white-space:pre"> </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><div><div><br></div>-- <br><div class="gmail_signature"><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></div>