Plot an image of a component of an amsr object.

# S4 method for amsr
plot(
  x,
  y,
  asp = NULL,
  breaks,
  col,
  colormap,
  zlim,
  missingColor,
  debug = getOption("oceDebug"),
  ...
)

Arguments

x

an amsr object.

y

character value indicating the name of the band to plot; if not provided, SST is used; see the documentation for the amsr class for a list of bands.

asp

optional numerical value giving the aspect ratio for plot. The default value, NULL, means to use an aspect ratio of 1 for world views, and a value computed from ylim, if the latter is specified in the ... argument.

breaks

optional numeric vector of the z values for breaks in the color scheme. If colormap is provided, it takes precedence over breaks and col.

col

optional argument, either a vector of colors corresponding to the breaks, of length 1 less than the number of breaks, or a function specifying colors. If neither col or colormap is provided, then col defaults to oceColorsTemperature(). If colormap is provided, it takes precedence over breaks and col.

colormap

a specification of the colormap to use, as created with colormap(). If colormap is NULL, which is the default, then a colormap is created to cover the range of data values, using oceColorsTemperature color scheme. If colormap is provided, it takes precedence over breaks and col. See “Examples” for an example of using the "turbo" color scheme.

zlim

optional numeric vector of length 2, giving the limits of the plotted quantity. A reasonable default is computed, if this is not given.

missingColor

optional list specifying colors to use for non-data categories. If not provided, a default is used. For type 1, that default is list(land="papayaWhip", none="lightGray", bad="gray", rain="plum", ice="mediumVioletRed"). For type 2, it is list(coast="gray", land="papayaWhip", noObs="lightGray", seaIce="mediumVioletRed"). Any colors may be used in place of these, but the names must match, and all names must be present.

debug

an integer specifying whether debugging information is to be printed during the processing. This is a general parameter that is used by many oce functions. Generally, setting debug=0 turns off the printing, while higher values suggest that more information be printed. If one function calls another, it usually reduces the value of debug first, so that a user can often obtain deeper debugging by specifying higher debug values.

...

extra arguments passed to imagep(), e.g. to control the view with xlim (for longitude) and ylim (for latitude).

Details

In addition to fields named directly in the object, such as SSTDay and SSTNight, it is also possible to plot computed fields, such as SST, which combines the day and night fields.

Author

Dan Kelley

Examples

library(oce)
data(coastlineWorld)
data(amsr) # see ?amsr for how to read and composite such objects

# Example 1: plot with default color scheme, oceColorsTemperature()
plot(amsr, "SST")
lines(coastlineWorld[["longitude"]], coastlineWorld[["latitude"]])


# Example 2: 'turbo' color scheme
plot(amsr, "SST", col = oceColorsTurbo)
lines(coastlineWorld[["longitude"]], coastlineWorld[["latitude"]])