YuLab-SMU / ggtree

:christmas_tree:Visualization and annotation of phylogenetic trees
https://yulab-smu.top/treedata-book/
821 stars 172 forks source link

colour of scale_alpha_continuous #592

Open MjelleLab opened 10 months ago

MjelleLab commented 10 months ago

Is it possible to add a colour to scale_alpha_continuous so that it is the same as the colour of my fills. I have two rings in the tree with colour c("#081d58", "#67000d") and would like to add two scale_alpha_continuous for each of the fills in the two rings.


scale_fill_manual(
    values=c("#081d58", "#67000d"),
    guide=guide_legend(keywidth=0.5, keyheight=0.1, order=4,title = "Sample type")
  ) +
  scale_alpha_continuous(
    range=c(0, 1), 
    guide=guide_legend(keywidth=0.5, keyheight=0.3, order=5,title = "Abundance")
  )