The plot method for raster
objects takes an argument axis.args
which gives you some control over the color table's annotation.
With your data, do something like this (and for more see the "Example" section of the help page returned by help("plot", package="raster")
:
## Find the min and max z-values
rng <- range(r1[])
## Construct a list of arguments to be used for the color table
arg <- list(at=rng, labels=round(rng, 4))
## Pass them in to your call to plot
plot(r1,breaks=brks,col=gray(seq(0,1,length=n)), axis.args=arg)