Open ireneortega opened 1 year ago
I want to represent the presence/absence matrix of the pangenome with the newick tree using gheatmap. I want presence in black and absence in white:
pangenome <- read_delim(file = "gene_presence_absence.Rtab", delim = "\t", show_col_types = FALSE) tree <- ape::read.tree(file = "accessory_binary_genes.fa.newick") tree_graph <- ggtree(tree, size=1/5) + geom_tiplab(size=2, align=FALSE, linesize=0.5) + geom_treescale(offset = -1) pangenome_tree_matrix <- gheatmap(p = tree_graph, data = pangenome, width = 10, colnames = FALSE, font.size = 10, ) + scale_fill_manual(breaks=c("1", "0"), values=c("black", "white")) + theme(legend.position = 'none') pangenome_tree_matrix
However, the figure showed is: which is not black. Moreover, if I increase the number of genomes, the figure gets even more transparent. How can I make the colors show darker (black in fact)?
@ireneortega I have encountered the same problem, and in my case this seems to be fixed by setting color = NA in your call of gpheatmap.
I want to represent the presence/absence matrix of the pangenome with the newick tree using gheatmap. I want presence in black and absence in white:
However, the figure showed is:
which is not black. Moreover, if I increase the number of genomes, the figure gets even more transparent. How can I make the colors show darker (black in fact)?