Changing labels on the scale of image.plot(fields)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Changing labels on the scale of image.plot(fields)

Camarda, Carlo Giovanni
Dear R-Users,
I am searching a way of changing the labels of the scale of a image.plot
function in library(fields). Taking the following example I would like
to add my own labels on the right side of the scale and it would be nice
to decide also where to have the ticks.
In this particular template I am sending you, I would like to have on
the scale "my.labels" instead of 0,5,10...30.
Thanks in advance,
Carlo Giovanni Camarda

A <- matrix(1:20, ncol=4)
my.breaks <- c(0,6,8,10,12,14,30)
my.colors <- c("black", "green", "blue", "red", "yellow", "pink")
my.labels <- c(" ", LETTERS[1:5], " ")
library(fields)
image.plot(A, breaks=my.breaks, col=my.colors, zlim=range(my.breaks))

+++++
This mail has been sent through the MPI for Demographic Rese...{{dropped}}

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html