Reputation: 7922
I'm making a levelplot in R:
levelplot(cov(data.frame(a=c(1,2,3), b=c(4,5,6), c=c(1,5,9))))
Instead of the names on the plot being a, b, and c, I want them to be expressions, like
labels <- expression(alpha, beta, omega**2)
How can I put these labels in? Thanks.
Upvotes: 0
Views: 879
Reputation: 70643
You can pass the label to scales
argument as a named list (see xyplot
documentation).
library(lattice)
xy.labels <- expression(alpha, beta, omega**2)
levelplot(cov(data.frame(a=c(1,2,3), b=c(4,5,6), c=c(1,5,9))), scales = list(labels = xy.labels))
Upvotes: 1