<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div class="" style="">Benilton,</div><div class="" style=""><br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class="">Obrigado pela dica. Eu já havia tentado tanto a RdBu quanto a RdYlBu no meu notebook (Windows), e ambas tinha ficado terríveis. Até aquele ponto, a Blues era a que oferecia o melhor resultado.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><span style="background-color: transparent;" class=""><br class="" style=""></span></div><div style="color:
rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><span style="background-color: transparent;" class="">Porém, acabei de rodar o código aqui no Mac do trabalho e a figura ficou perfeita com o </span><span style="font-size: 12pt;" class="">RdBu</span><span style="background-color: transparent;" class="">. Aprendi a lição de que a qualidade de uma figura criada pelo x11 depende fortemente da plataforma utilizada.</span></div><div class="" style=""></div><div class="" style=""> </div><div class="" style="">Saudações,<br class="" style="">--<br class="" style="">Thiago V. dos Santos<br class="" style="">PhD student<br class="" style="">Land and Atmospheric Science<br class="" style="">University of Minnesota<br class=""
style="">http://www.laas.umn.edu/CurrentStudents/MeettheStudents/ThiagodosSantos/index.htm<br class="" style="">Phone: (612) 323 9898</div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;" class=""> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;" class=""> <div dir="ltr" class="" style=""> <font size="2" face="Arial" class="" style=""> On Thursday, September 18, 2014 10:31 AM, Benilton Carvalho <beniltoncarvalho@gmail.com> wrote:<br class="" style=""> </font> </div> <br class="" style=""><br class="" style=""> <div class="" style=""><div id="yiv1052750480" class="" style=""><div class="" style=""><div dir="ltr" class="" style="">mude<div class="" style=""><br clear="none" class="" style=""></div><div class=""
style="">brewer.pal(9,"Blues")<br clear="none" class="" style=""></div><div class="" style=""><br clear="none" class="" style=""></div><div class="" style="">para</div><div class="" style=""><br clear="none" class="" style=""></div><div class="" style="">rev(brewer.pal(9,"RdBu"))<br clear="none" class="" style=""></div><div class="" style=""><br clear="none" class="" style=""></div><div class="" style="">b</div></div><div class="" style=""><br clear="none" class="" style=""><div class="" style="">Em 18 de setembro de 2014 12:00, Thiago V. dos Santos <span dir="ltr" class="" style=""><<a rel="nofollow" shape="rect" ymailto="mailto:thi_veloso@yahoo.com.br" target="_blank" href="mailto:thi_veloso@yahoo.com.br" class="" style="">thi_veloso@yahoo.com.br</a>></span> escreveu:<br clear="none" class="" style=""><blockquote class="" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="" id="yiv1052750480yqt48338" style=""><div
class="" style=""><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;" class=""><div class="" style=""><span class="" style="">Caro Wenceslau,</span></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;font-style:normal;background-color:transparent;" class=""><span class="" style=""><br clear="none" class="" style=""></span></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;font-style:normal;background-color:transparent;" class="">Também estou buscando mudar a escala de cores para algo mais didático, mas ainda não acertei totalmente as configurações. Por enquanto, o que estou fazendo é:</div><div class="" style=""><br clear="none" class="" style=""></div><div
style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;font-style:normal;background-color:transparent;" class=""># criar uma escala de azul usando o RColorBrewer.</div><div style="background-color:transparent;" class=""># digite display.brewer.all() para ver as paletas disponíveis</div><div style="background-color:transparent;" class="">cols <- colorRampPalette(brewer.pal(9,"Blues"))(200)</div><div class="" style=""><br clear="none" class="" style=""></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;font-style:normal;background-color:transparent;" class=""># plotar o perfil especificando a paleta no argumento "cols"</div><div style="background-color:transparent;" class="">plot <- filled.contour(x= date, </div><div style="background-color:transparent;" class="">
y= sort(-(as.numeric(names(depths)))), </div><div style="background-color:transparent;" class=""> z= t(soil_data[11:1,]),</div><div style="background-color:transparent;" class=""> zlim= c(0,1),</div><div style="background-color:transparent;" class=""> ylab= expression(theta(m^3~~m^-3)),</div><div style="background-color:transparent;" class=""> col=cols,</div><div style="background-color:transparent;" class=""> nlevels= 100)</div><div class="" style=""><br clear="none" class=""
style=""></div><div class="" style=""></div><div class="" style="">Ainda não é o ideal, mas pelo menos uma escala azul torna mais fácil a interpretação de diferentes quantidades de umidade no solo.</div><div class="" style=""><br clear="none" class="" style=""></div><div class="" style="">Saudações,<br clear="none" class="" style="">--<br clear="none" class="" style="">Thiago V. dos Santos<br clear="none" class="" style="">PhD student<br clear="none" class="" style="">Land and Atmospheric Science<br clear="none" class="" style="">University of Minnesota<br clear="none" class="" style=""><a rel="nofollow" shape="rect" target="_blank" href="http://www.laas.umn.edu/CurrentStudents/MeettheStudents/ThiagodosSantos/index.htm" class="" style="">http://www.laas.umn.edu/CurrentStudents/MeettheStudents/ThiagodosSantos/index.htm</a><br clear="none" class="" style="">Phone: (612) 323 9898</div> <div class="" style=""><br clear="none" class="" style=""><br
clear="none" class="" style=""></div><div style="display:block;" class=""> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;" class=""> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;" class=""><div class="" style=""><div class="" style=""> <div dir="ltr" class="" style=""> <font face="Arial" class="" style=""> On Thursday, September 18, 2014 9:46 AM, Wenceslau Teixeira <<a rel="nofollow" shape="rect" ymailto="mailto:wgt007@gmail.com" target="_blank" href="mailto:wgt007@gmail.com" class="" style="">wgt007@gmail.com</a>> wrote:<br clear="none" class="" style=""> </font> </div> <br clear="none" class="" style=""><br clear="none" class="" style=""> </div></div><div class="" style=""><div class="" style=""><div class="" style=""><div class="" style=""><div dir="ltr" class="" style=""><div class="" style="">Caros colegas
do R,<br clear="none" class="" style=""><br clear="none" class="" style="">muito bacana o script disponibilizado para traçar os perfis de umidade do solo. <br clear="none" class="" style="">Será útil para nós. Só gostaria de trocar as cores, com valores mais alto (umido) para azul e valores mais baixos (solo seco)<br clear="none" class="" style="">para vermelho, assim o gráfico fica mais cognitivo. <br clear="none" class="" style="">Alguém sabe como mudar as
cores ?<br clear="none" class="" style=""><br clear="none" class="" style=""></div>Cordialmente,<br clear="none" class="" style=""><br clear="none" class="" style="">Wenceslau Teixeira<br clear="none" class="" style="">Embrapa Solos<br clear="none" class="" style=""><br clear="none" class="" style=""><div class="" style=""><div class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style="">library(repmis) # reads text data directly from dropbox - no need to download any file<br clear="none" class="" style=""># read data<br clear="none" class="" style="">url <- '<a rel="nofollow" shape="rect" target="_blank" href="https://dl.dropboxusercontent.com/u/27700634/precip.txt" class="" style="">https://dl.dropboxusercontent.com/u/27700634/precip.txt</a>'<br clear="none" class="" style="">tmp <- repmis::source_data(url, sep = '', header = TRUE)<br clear="none" class="" style=""><br clear="none" class="" style=""># convert julian
day to date<br clear="none" class="" style="">date <- as.Date(tmp$julian, origin='2011-12-31')<br clear="none" class="" style="">data <- cbind(date, tmp)<br clear="none" class="" style="">head(data)<br clear="none" class="" style=""># define
vector with depth of soil layers<br clear="none" class="" style="">depths <- c(0.05,0.10,0.20,0.30,<br clear="none" class="" style=""> 0.40,0.60,0.80,1.00,<br clear="none" class="" style=""> 1.50,2.00,2.50)<br clear="none" class="" style=""><br clear="none" class="" style=""># teste com lattice<br clear="none" class="" style="">cols <- ncol(data):4<br clear="none" class="" style="">levelplot(as.matrix(data[, cols]),<br clear="none" class="" style=""> aspect = "fill", xlab = "date", ylab = "soil Moist.",<br clear="none" class="" style=""> scales = list(x = list(at = which(date %in% pretty(date)),<br clear="none" class=""
style=""> labels = pretty(date)),<br clear="none" class="" style=""> y = list(at = length(cols):1, labels = depths)),<br clear="none" class="" style=""> contour = T)<br clear="none" class="" style=""><br clear="none" class="" style=""># Plot soil moisture profile<br clear="none" class="" style=""><br clear="none" class="" style=""># como são profundidades (abaixo da superfície) use a convenção de z negativo<br clear="none" class="" style=""># acrescentei a chuva, precisa ajustar ylabels, mtext() resolve<br clear="none" class="" style=""><br clear="none" class=""
style="">x11()<br clear="none" class="" style="">op <- par(mar = c(3,4,12,3))<br clear="none" class="" style="">plot <- filled.contour(date,
sort(-depths), as.matrix(data[, cols]), ylab = expression(theta(m^3~~m^-3)))<br clear="none" class="" style="">par(new=T,mar=c(23,4,1,8))<br clear="none" class="" style="">with(data,<br clear="none" class="" style=""> plot(date, precip, type = "h", xaxt = "n", xpd = T, xaxs="i", ylab = "Precip (mm)", xlab = ""))<br clear="none" class="" style="">par(op)<br clear="none" class="" style=""><br clear="all" class="" style=""><br clear="none" class="" style="">-- <br clear="none" class="" style=""><div dir="ltr" class="" style=""><br clear="none" class="" style="">Wenceslau Teixeira<br clear="none" class="" style=""><br clear="none" class="" style=""><a rel="nofollow" shape="rect" ymailto="mailto:wgt007@gmail.com" target="_blank" href="mailto:wgt007@gmail.com" class="" style="">wgt007@gmail.com</a><br clear="none" class="" style="">skype: wgt007<br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none"
class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""><br clear="none" class="" style=""></div>
</div></div></div></div><br clear="none" class="" style=""></div></div>_______________________________________________<br clear="none" class="" style="">R-br mailing list<br clear="none" class="" style=""><a rel="nofollow" shape="rect" ymailto="mailto:R-br@listas.c3sl.ufpr.br" target="_blank" href="mailto:R-br@listas.c3sl.ufpr.br" class="" style="">R-br@listas.c3sl.ufpr.br</a><br clear="none" class="" style=""><a rel="nofollow" shape="rect" target="_blank" href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" class="" style="">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br clear="none" class="" style="">Leia o guia de postagem (<a rel="nofollow" shape="rect" target="_blank" href="http://www.leg.ufpr.br/r-br-guia" class="" style="">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br clear="none" class="" style=""><br clear="none" class="" style=""></div> </div> </div> </div> </div></div></div><br
clear="none" class="" style="">_______________________________________________<br clear="none" class="" style="">
R-br mailing list<br clear="none" class="" style="">
<a rel="nofollow" shape="rect" ymailto="mailto:R-br@listas.c3sl.ufpr.br" target="_blank" href="mailto:R-br@listas.c3sl.ufpr.br" class="" style="">R-br@listas.c3sl.ufpr.br</a><br clear="none" class="" style="">
<a rel="nofollow" shape="rect" target="_blank" href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" class="" style="">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br clear="none" class="" style="">
Leia o guia de postagem (<a rel="nofollow" shape="rect" target="_blank" href="http://www.leg.ufpr.br/r-br-guia" class="" style="">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br clear="none" class="" style=""></blockquote></div><br clear="none" class="" style=""></div></div></div><br class="" style=""><br class="" style=""></div> </div> </div> </div> </div></body></html>