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

From: Camarda, Carlo Giovanni <Camarda_at_demogr.mpg.de>
Date: Thu 09 Feb 2006 - 02:29:21 EST

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], " ")

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}}

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Feb 09 04:05:32 2006

This archive was generated by hypermail 2.1.8 : Fri 10 Feb 2006 - 21:35:43 EST