<div dir="ltr"><div dir="ltr"><div dir="ltr"><div></div><span style="font-size:12.8px">Olá lista!</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Alguém saberia como incluir dois gradientes de cores no mesmo conjunto de dados?</div><div style="font-size:12.8px">No ggplot? Tentei dividir o conjunto de dados, mas não rolou.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">meu codigo foi:<br></div><div style="font-size:12.8px"><br></div><div><div style="font-size:12.8px">> dat1</div><div style="font-size:12.8px">   change values</div><div style="font-size:12.8px">1     -10   0.00</div><div style="font-size:12.8px">2      -9   0.50</div><div style="font-size:12.8px">3      -8   0.20</div><div style="font-size:12.8px">4      -7   0.30</div><div style="font-size:12.8px">5      -6   0.00</div><div style="font-size:12.8px">6      -5   0.00</div><div style="font-size:12.8px">7      -4   0.61</div><div style="font-size:12.8px">8      -3   0.40</div><div style="font-size:12.8px">9      -2   1.00</div><div style="font-size:12.8px">10     -1   0.80</div><div style="font-size:12.8px"><br></div><div><div><span style="font-size:12.8px">> dat2</span></div><div><span style="font-size:12.8px">   change values</span></div><div><span style="font-size:12.8px">1       5   0.61</span></div><div><span style="font-size:12.8px">2       3   1.00</span></div><div><span style="font-size:12.8px">3      10   0.50</span></div><div><span style="font-size:12.8px">4       2   0.00</span></div><div><span style="font-size:12.8px">5       7   0.00</span></div><div><span style="font-size:12.8px">6       6   0.50</span></div><div><span style="font-size:12.8px">7       8   0.00</span></div><div><span style="font-size:12.8px">8      10   0.30</span></div><div><span style="font-size:12.8px">9       6   0.61</span></div><div><span style="font-size:12.8px">10      6   0.20</span></div></div><div style="font-size:12.8px"><br></div></div><div style="font-size:12.8px"><div>p = ggplot() + xlim(-10, 10) + ylim(0,1) + labs(x= "change", y= "values")+</div><div><span style="white-space:pre-wrap">       </span>geom_point(data=dat1, aes(x=change, y=value, color=value), shape=19, size=3, alpha=0.5)+</div><div><span style="white-space:pre-wrap"> </span>scale_color_gradientn(colours=c("#FC4013","#FED246"))</div><div><br></div><div>p1 = p+geom_point(data=dat2, aes(

x=change, y=value, color=value), shape=19, size=3, alpha=0.5)+</div><div><span style="white-space:pre-wrap">        </span>scale_color_gradientn(colours=c("#5CB0FD","#4DE775")) +</div><div><span style="white-space:pre-wrap">      </span>theme(axis.text.x = element_text(size=18,colour='grey8'),</div><div>         axis.text.y = element_text(size=18,colour='grey8'),</div><div>         axis.title.x = element_text(size=18,colour='grey8'),</div><div>         axis.title.y = element_text(size=20,colour='grey8'),</div><div>   <span style="white-space:pre-wrap"> </span> strip.text.x = element_text(size=18,colour='grey8'),</div><div>         strip.background = element_rect(fill="transparent"),</div><div>  <span style="white-space:pre-wrap">    </span> legend.position="none",</div><div>         legend.text=element_blank(),</div><div>         legend.title=element_blank(),</div><div><span style="white-space:pre-wrap">   </span> legend.background = element_rect(fill="grey98", size=1, linetype="solid"),</div><div>         panel.background=element_rect("grey98"))</div><div>p1 + geom_vline(xintercept = 0,colour="grey68",linetype='twodash', size=2)+ geom_hline(yintercept = 0.5, colour="grey78")</div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font face="arial, helvetica, sans-serif"><b>Priscila Lemes, </b></font><div><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div><span style="font-family:arial,helvetica,sans-serif"><i>PhD in Ecology and Evolution</i> <i>- UFG</i><br></span></div><div><a href="http://www.wix.com/rdloyola/lab" style="font-family:arial,helvetica,sans-serif" target="_blank"></a><div><font face="arial, helvetica, sans-serif"><span style="border-collapse:collapse">Post Doctoral, Department of Zoology, IB, UNESP - Rio Claro - São Paulo - Brazil<br></span></font><a href="http://lattes.cnpq.br/7228776843625214" target="_blank">http://lattes.cnpq.br/7228776843625214</a><br></div><div><span style="font-family:arial,helvetica,sans-serif">Skype: plemes_</span><br></div><div><font face="arial, helvetica, sans-serif" size="1"><br></font></div></div></div></div></div></div><br></div><br></div><br></div>