[R-br] Cores do heatmap

Michele Claire Breton michele.breton20 em gmail.com
Qua Maio 18 07:51:05 -03 2022


Caríssimos conterrâneos, bom dia!

Espero que todos se encontrem bem.
Eu estou trabalhando em um heatmap e resolvi mudar o esquema de cores,
entretanto, após a mudança, aparece a mensagem de erro: Error in
image.default(1:nc, 1:nr, x, xlim = 0.5 + c(0, nc), ylim = 0.5 +  :
  must have one more break than colour.

A princípio, eu usei:
my_palette <- colorRampPalette(c("green","yellow","red"))(n=299)

col_breaks = c(seq(-2,-1,length=100),
 seq(-0.9,0.9, length=100),
  seq(1,2,length=100))

E quis mudar para:
my_palette <- colorRampPalette(c("blue","white","red"))(n=20)

col_breaks = c(seq(-2,-1,length=100),
 seq(-0.9,0.9, length=100),
  seq(1,2,length=100))

... e enttão surgiu a mensagem de erro. O que fiz de errado?
Muito obrigada por me ajudarem

Michele


-- 
------------------------------------------------------------------------
*Dra. Michele Claire Breton*
Técnica Superior em Bioinformática
CICS - Centro de Investigação em Ciências da Saúde
Faculdade de Ciências da Saúde
Universidade da Beira Interior
Covilhã - Castelo Branco - Portugal
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://listas.inf.ufpr.br/pipermail/r-br/attachments/20220518/e7d968f4/attachment.htm>


Mais detalhes sobre a lista de discussão R-br