plot.satin | R Documentation |
Visual representation of ocean data from satellite images (MODIS, AVHRR, etc.) or derived from models (ocean productivity; CMEMS).
## S3 method for class 'satin' plot(x, period = 1, depth = 1, xlim = NULL, ylim = NULL, zlim = NULL, map = NULL, map.col = "grey", map.outline = "black", scheme = "default", col.sep = 0.1, colbar = TRUE, main = NULL, main.pos = "topright", log = FALSE, units = NULL, xaxt = "s", yaxt = "s", atx = NULL, aty = NULL, restore.par = TRUE, ...)
x |
a satin object as returned by |
period |
an integer referring to the image number to plot. |
depth |
an integer referring to a depth level. Only for Copernicus data that includes variables at different depths. |
xlim |
minimum and maximum longitude values for the map. |
ylim |
minimum and maximum latitude values for the map. |
zlim |
minimum and maximum ocean data values. |
map |
a user defined map of class "SpatialPolygons". |
map.col |
color for the map. |
map.outline |
color for the map outline. |
scheme |
color scheme for the ocean data, either: "default" or a vector of valid color names. |
col.sep |
separation between colors in data units. |
colbar |
logical. If |
main |
title for the map, defaults to the corresponding selected image |
main.pos |
position for the title: "topright", "topleft", "bottomright" or "bottomleft". |
log |
logical. If |
units |
color bar label, defaults to |
xaxt, yaxt |
"n" to supress axis. |
atx, aty |
specify tick-mark locations for fine tuning axes annotations. |
restore.par |
logical. If |
... |
further arguments to pass to |
The only mandatory argument for this function to produce a map is an object of class "satin" (x
in this case). All the other arguments are optional and can be used to customize the plot. For chlorophyll concentration data, when log = TRUE
, the color scale is fixed to a maximum value of 20, which implies that values above it are set to this maximum before applying logarithms. Using restore.par = FALSE
to annotate plot, e.g. add isolines.
A plot including a map, of the corresponding parameter is produced.
Héctor Villalobos
read.nasaoc
, read.ghrsst
, read.osunpp
, and read.cmems
# SST data (Aqua Modis) library(sp) data(dsst, dmap) #load sample data and map # default plot plot(dsst) # adding a custom map plot(dsst, map = dmap) # Chl-a concentration data (Aqua Modis) in actual units and in logarithmic scale data(dchl) plot(dchl, map = dmap, xlim = c(-120, -105), ylim = c(20, 35)) dev.new() plot(dchl, map = dmap, xlim = c(-120, -105), ylim = c(20, 35), log = TRUE) # Copernicus data data(dcmems) plot(dcmems$thetao, map = dmap, period = 2, depth = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.