knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

An example for geom_oce()

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 = 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*')'))


chaoxv/nppr documentation built on Jan. 29, 2024, 1:37 p.m.