[R] levelplot colorkey
Jeff Jorgensen
jcjorgensen at wisc.edu
Wed Feb 11 01:07:35 CET 2004
Dear R'ers,
I've scanned available documentation and the web, but I can't seem to
figure out where I've gone wrong in adding numbers to scale the colorkey in
levelplot (Lattice package). For example,
levelplot(z, contour=T, labels=T, cuts=10, region=T,...
colorkey=list(T, space="bottom",
at=seq(0,2000,length=20),
labels=list(as.character(seq(0,2000,length=20))))
)
If I leave out the colorkey command the levelplot function works great, if
I put it in I get the following error mesage:
Error in draw.colorkey(x$colorkey) : length(col) must be length(at)-1
Is there a way to find out length(col) (BTW, does col=color?) so that I can
readjust the label locations (at=...), or have I completely missed
something obvious that would quickly fix this up?
Cheers,
Jeff Jorgensen
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jeff Jorgensen
Center for Limnology jcjorgensen at wisc.edu
University of Wisconsin Madison ph (608) 263-2304
680 North Park Street fx (608) 265-2340
Madison, Wisconsin 53706 http://limnology.wisc.edu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the R-help
mailing list