> I'm trying to do a filled.contour plot where some points are labelled as > NA. How do I could plot this kind of graphics, so NA points are coloured > black, keeping the levels of remaining points. NA's values represent > land points (meaningless), and what I want to plot is the levels of a > variable over the sea.
You can also do this using ggplot, although you don't have quite as much control over the appearance of the contours (you do get more control over other things) install.packages("ggplot", dep=T) library(ggplot) # Set up appropriate data structure dimnames(ene) <- list(y, x) names(dimnames(ene)) <- c("y", "x") enem <- melt(ene) p <- ggplot(na.omit(enem), aes=list(x=x, y=y, z=value, fill=value)) p <- ggtile(p) p <- ggcontour(p) scfillgradient(p) scfillgradient(p, low="white", high="blue") Regards, Hadley ______________________________________________ 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 and provide commented, minimal, self-contained, reproducible code.