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=-
I can answer the title of your question ("How can I color the ocean blue in a map of the US?"), though not the specific situation as it is described in the body of your question ("I would like to draw a map of the US over an image, but then fill in the oceans").
However, I include this answer in case that it is useful to others who come across your question.
map(database='state', bg='light blue')
The bg
option gives a color of light blue to the map's background, which includes the oceans.