I am using levelplot to plot a matrix. I need to change x and y labels. When I use the following piece of code, plot looks nice. However x and y labels are from 133 to 139 as opposed to 133..139 133...139. Can anyone help me fix it? (instead of huge matrix i am plotting, I ll give a sample matrix)
library(lattice)
library(RColorBrewer)
m <- matrix(c(0,1,1,2,0,2,1,1,0),6,6)
b <- c(seq(133,139),seq(133,139))
xy.labels <- b
cols <- colorRampPalette(brewer.pal(6, "Spectral"))
print(levelplot(m, scales = list(labels = xy.labels), col.regions = cols))