This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Add annotation color bar to ggplot or ggvis barplot

Does anyone know how to add an annotation color bar to a ggplot or ggvis/plotly/... barplot?

An example would be like "Heatmap 1" below, with a color bar (blue and red) representing sample information as type a or type b:

An example of adding annotation color bar

r ggplot ggvis plotly visualization

can you post some example data?

2 answers

Thanks! But this method only applies to ComplexHeatmap, do we have something similar in ggplot2/Rplotly/ggvis..?

Did you find some good methods? I have met the same question

You can use aheatmap package.

Log in to answer this question.