Learn R Programming

s2dverification (version 2.5.0)

PlotStereoMap: Maps A Two-Dimensional Variable On A Polar Stereographic Projection

Description

Map a two dimensional matrix with (longitude, latitude) dimensions on a polar stereographic projection.

Usage

PlotStereoMap(var, lon, lat, latlims = c(60,90), toptitle = "", sizetit = 1, units = "", brks = NULL, cols = NULL, filled.continents = FALSE, dots = NULL, intlat = 10, drawleg = TRUE, subsampleg = 1, colNA = "white")

Arguments

var
Matrix to plot with (longitude, latitude) dimensions.
lon
Array of longitudes.
lat
Array of latitudes.
latlims
Latitudinal limits of the figure. Example : c(60, 90) for the North Pole c(-90,-60) for the South Pole
toptitle
Title, optional.
sizetit
Multiplicative factor to increase title size, optional.
units
Units, optional.
brks
Colour levels, optional.
cols
List of colours, optional.
filled.continents
Continents filled in grey (TRUE) or represented by a black line (FALSE). Default = FALSE.
dots
Matrix with TRUE / FALSE flags to add black dots over the maps (to show where a score is significant for example).
intlat
Interval between latitude circles. Default = 10deg.
drawleg
Draw a colorbar.
subsampleg
Supsampling factor of the interval between ticks on colorbar. Default = 1 = every colour level.
colNA
Color used to represent NA. Default = 'white'

Examples

Run this code
data <- matrix(rnorm(100 * 50), 100, 50)
x <- seq(from = 0, to = 360, length.out = 100)
y <- seq(from = -90, to = 90, length.out = 50)
breaks <- seq(from = min(data, na.rm = TRUE), to = max(data, na.rm = TRUE), 
              length.out = 21)
colors <- colorRampPalette(c("blue", "lightblue", "white", "yellow", "red"))
colors <- colors(20)
PlotStereoMap(var = data, lon = x, lat = y, latlims = c(60, 90), brks = breaks,
              cols = colors, toptitle = "This is the title", sizetit = 0.8)

Run the code above in your browser using DataLab