I'm working on on some details on my plots and I've found one I can't get around. On my levelplot are numeric tickmarks. Now I want my tickmarks on the y-axis to be changed to the corresponding Letters. (i.e. 1=A, 5=E,27=AA, 29=AC,...)
I've already used
scales=list(
y=list(alternating=3,labels=toupper(c(letters[1],letters[5],letters[10],letters[15])))))
But I want them to change depending on what's on the Y-axis, not from values I'm giving. Can anybody help me on this one?
levelplot(volcano,main="levelplot(volcano)")

Not general solution. Use pretty to compute at by self.
y_at <- pretty(seq_len(ncol(volcano)))
y_labels <- c(LETTERS, outer(LETTERS, LETTERS, paste, sep=""))
levelplot(
volcano, main="levelplot(volcano)",
scales=list(y=list(
alternating=3,
labels=y_labels[round(y_at)],
at=y_at
))
)

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With