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:

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:

If you use the
type a/type bvariable for thefillaesthetic you will get colored bars and a legend.