My df looks like this:
Product Day Month Total
Web Server, Applicatiion Server, Database Server, Middle Tier Tue 2015-01-01 10
Web Server, Application Server, Database Server, Middle Tier Wed 2015-01-01 6
Web Server, Application Server, Database Server, Middle Tier Wed 2015-02-01 6
I need to create a heat map in ggplot2 where I need to insert Product name as geom_text.
I have this so far:
ggplot(cal, aes(x=Month, y=Day, fill=Total)) +
geom_tile() +
scale_fill_gradient2(high="red",mid="green",low="yellow",
na.value="white", midpoint=mean(cal$Total, na.rm=T))+scale_x_date(labels = date_format("%b-%Y"), breaks = date_breaks("month"))+
geom_text(aes(label=Product))
What happens is since there are multiple Product names separated by comma, when I do geom_text (aes(label=Product)), text is written on top of each other.
Is it possible put each Product name on different lines?

\nafter,in yourProductnames? - Roland