How can I color the ocean blue in a map of the US?

前端 未结 3 1564
谎友^
谎友^ 2020-12-17 18:19

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=-         


        
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-17 18:49

    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.

提交回复
热议问题