geom_oce | R Documentation |
geom_oce() is used for ocean data visualization
geom_oce(data = NULL, mapping = NULL, lonlim, latlim)
data |
The data for drawing a plot |
mapping |
Mapping for aes() |
lonlim |
The lontitude limits: lonlim = c() |
latlim |
The latitude limits: latlim = c() |
A plot
## Not run:
library(nppr)
library(ggplot2)
library(ggspatial)
library(rnaturalearth)
library(rnaturalearthdata)
data(nppdata)
ggplot()+
geom_oce(nppdata, aes(x = lon, y = lat, fill = npp),
lonlim = c(100, 120), latlim = c(7, 25))+
scale_fill_gradientn(colors = rev(rainbow(20)), breaks = seq(200, 1000, 100),
limits = c(200, 1000))+
labs(x = 'Longitude', y = 'Latitude',
fill = expression(NPP*~'('*mg~C~m^-2~d^-1*')'))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.