colourplot: colour plot

colourplotR Documentation

colour plot

Description

Adds a colour bar to a scatter plot and/or filled contour plot. This function, which is based on base R's filled.contour function, is useful for visualising kriging results.

Usage

colourplot(
  x,
  y,
  z,
  X,
  Y,
  Z,
  nlevels = 20,
  colspec = hcl.colors,
  pch = 21,
  cex = 1,
  plot.title,
  plot.axes,
  key.title,
  key.axes,
  asp = NA,
  xaxs = "i",
  yaxs = "i",
  las = 1,
  axes = TRUE,
  frame.plot = axes,
  extra,
  ...
)

Arguments

x

numerical vector of n equally spaced values to be used in the contour plot.

y

numerical vector of m equally spaced values to be used in the contour plot.

z

an n \times m matrix of numerical values to be used in the contour plot.

X

numerical vector of N values to be used in the scatter plot.

Y

numerical vector of N values to be used in the scatter plot.

Z

numerical vector of N values to be used in the scatter plot.

nlevels

number of levels to be used in the contour plot.

colspec

colour specification (e.g., rainbow, grey.colors, heat.colors, topo.colors).

pch

plot character (2125).

cex

plot character magnification.

plot.title

statements that add titles to the main plot.

plot.axes

statements that draw axes on the main plot. This overrides the default axes.

key.title

statements that add titles for the plot key.

key.axes

statements that draw axes on the plot key. This overrides the default axis.

asp

the y/x aspect ratio, see plot.window.

xaxs

the x axis style. The default is to use internal labelling.

yaxs

the y axis style. The default is to use internal labelling.

las

the style of labelling to be used. The default is to use horizontal labelling.

axes

logicals indicating if axes should be drawn.

frame.plot

logicals indicating if a box should be drawn, as in plot.default.

extra

(optional) extra intructions to be carried out in the main plot window, such as text annotations.

...

additional graphical parameters

Value

no return value

Examples

data('meuse',package='geostats')
colourplot(X=meuse$x,Y=meuse$y,Z=log(meuse$zinc),
           plot.title=title(main='Meuse',xlab='Easting',ylab='Northing'),
           key.title=title(main='log(Zn)'))

geostats documentation built on Jan. 7, 2023, 5:32 p.m.