View source: R/plot_westcoast.R
plot_westcoast | R Documentation |
Plot the US West Coast using data from
ne_countries
. The axes are in decimal degrees
and tick marks are labeled as such; thus, no labels are provided for the
axes themselves.
plot_westcoast(g, xlim = c(-127.15, -116.5), ylim = c(31.9, 49.5))
g |
A ggplot object that you would like to add a map of the US West Coast to.The coordinates of the object provided need to be in decimal degrees such that the units of the added coastline will align with the provided data. If a value is not supplied for this argument, then a map of the US West Coast is returned, rather than adding to an object. |
xlim |
A vector of two values supplying the limits to the x axis. The default values focus the resulting map on the waters included in the exclusive economic zone of the US. Units are in decimal degrees. |
ylim |
A vector of two values supplying the limits to the y axis. The default values focus the resulting map on the area between the Candian- US and US-Mexico borders. Units are in decimal degrees. |
A ggplot2 object providing a map of the US West Coast. The map is returned visibly to provide easy printing capabilities.
Kelli F. Johnson
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.