I have heatmap with month number on the y-axis. I want to change the numbers to month name (e.g., "Jan.","Feb.","Mar.","Apr."). Here is the heatmap
and this is my code:
heatmap(data, Rowv=NA, Colv=NA, margins=c(3,3),
col = magma(50), scale="none", xlab = "Hours",
ylab = "Month")
The values printed on the axes are determined by the row and column names of the object you pass in. There is a built in vector of month abbreviations that you can use. Try
rownames(data) <- month.abb
Or you could set the values to whatever you like.