geom_oce: geom_oce

View source: R/geom_oce.R

geom_oceR Documentation

geom_oce

Description

geom_oce() is used for ocean data visualization

Usage

geom_oce(data = NULL, mapping = NULL, lonlim, latlim)

Arguments

data

The data for drawing a plot

mapping

Mapping for aes()

lonlim

The lontitude limits: lonlim = c()

latlim

The latitude limits: latlim = c()

Value

A plot

Examples

## 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)

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