exampledata = matrix(sample.int(15, size = 30*10, replace = TRUE), nrow = 30, ncol = 10)
exampledata = as.data.frame(exampledata)
exampledata$row = as.numeric(row.names(exampledata))
exampledata$col = rep(seq(1, 10), 3)
library(reshape2)
exampledata = melt(exampledata, id=c("row","col"))
plot = ggplot(exampledata, aes(col, row)) + geom_tile(aes(fill = value), colour = "white")
plot = plot + scale_fill_gradient(low="white", high="steelblue")
# I want every row displayed..
plot = plot + scale_y_continuous(breaks = c(seq(1:30)))
plot
# but I want to reverse the y axis
plot = plot + scale_y_reverse()
plot