spoints (generic function) draws an scatterplot
with points filled with different colors and (optionally)
adds a legend strip with the color scale (calls
splot and plot.default).
spoints(x, ...)
"spoints" (x, y = NULL, s, slim = range(s, finite = TRUE), col = jet.colors(128), breaks = NULL, legend = TRUE, horizontal = FALSE, legend.shrink = 0.9, legend.width = 1.2, legend.mar = ifelse(horizontal, 3.1, 5.1), legend.lab = NULL, bigplot = NULL, smallplot = NULL, lab.breaks = NULL, axis.args = NULL, legend.args = NULL, add = FALSE, graphics.reset = add, pch = 16, cex = 1.5, xlab = NULL, ylab = NULL, ...)
"spoints" (x, s = x[[1]], xlab = NULL, ylab = NULL, ...)xy.coords for details.x can be provided.TRUE (default), the
plotting region is splitted into two parts, drawing the
main plot in one and the legend with the color scale in
the other. If FALSE only the (coloured) main plot
is drawn and the arguments related to the legend are
ignored (splot is not called).legend is TRUE, these will
bedetermined within the function.legend is TRUE, these will be
determined within the function.TRUE the scatter plot is
just added to the existing plot.FALSE (default)
the plotting region (par("plt")) will not
be reset to make it possible to add more features to the
plot (e.g. using functions such as points or lines). If
TRUE will reset plot parameters to the values
before entering the function.points.par("cex").x.y.sxxxx.default; e.g.
xlim, ylim, ...). NOTE: graphical arguments passed
here will only have impact on the main plot. To change
the graphical defaults for the legend use the
par function beforehand (e.g.
par(cex.lab = 2) to increase colorbar labels).image for details).col and be in increasing order.FALSE (default)
legend will be a vertical strip on the right side. If
TRUE the legend strip will be along the bottom.image.plot for details).mtext function. Usually
this will not be needed (see
image.plot for details).par(old.par) will reset plot
parameters to the values before entering the function).par("plt")) to make it possible to add
more features to the plot (set graphics.reset =
FALSE to avoid this).splot, simage,
spersp, image,
image.plot,
data.grid, plot.default.
#
with( aquifer, spoints(lon, lat, head, main = "Wolfcamp aquifer data"))
Run the code above in your browser using DataLab