I can't think of a straightforward way. You might be able to use the image.plot() function in package fields by using legend.only=TRUE to add the legend to your existing plot.
David From: Morway, Eric [mailto:emor...@usgs.gov] Sent: Monday, December 23, 2013 3:46 PM To: dcarl...@tamu.edu Cc: R mailing list Subject: Re: [R] Inserting color into an irregular grid comprised of polygons Thanks David, Instead of using terrain.colors or heat.colors, I went with: library(colorRamps) cv <- matrix(as.integer(cut(vals2, breaks=100)), dim(vals2)) pal <- blue2green2red(100) #a function from colorRamps Do you happen to have any clever ideas for a legend? I could play around with a series of polygons to the side of the plot (...xpd=TRUE), but don't have any better ideas. Eric [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.