How can I color the ocean blue in a map of the US?
I would like to draw a map of the US over an image, but then fill in the oceans. here is my starting point: library(maps) library(graphics) image(x=-90:-75, y = 25:40, z = outer(1:15, 1:15, "+"), xlab = "lon", ylab = "lat") map("state", add = TRUE) But I would like the Atlantic Ocean and Gulf of Mexico to be filled in a solid color. Good question! How's this? library(maps) image(x=-90:-75, y = 25:40, z = outer(1:15, 1:15, "+"), xlab = "lon", ylab = "lat") map("state", add = TRUE) library(grid) outline <- map("usa", plot=FALSE) # returns a list of x/y coords xrange <- range(outline$x, na.rm