xcontour.Rd
To work with ximage()
xcontour(x, extent = NULL, ..., add = FALSE)
something we can contour
optional, numeric xmin,xmax,ymin,ymax
Arguments passed on to ximage
zlim
optional, range of data to set colour map (to maintain absolute colours across multiple plots)
xlab
x axis label, empty by default
ylab
y axis lable, empty by default
breaks
a set of finite numeric breakpoints for the colours:
col
optional colours to map matrix/array data to
add to plot, or start afresh
nothing, called for its side effect of creating or adding to a plot
Input may be a matrix or a list from gdal_raster_data() in the vapour package.
ex <- c(2667394, 2668004, 6478902, 6479772)
v <- volcano[nrow(volcano):1, ncol(volcano):1]
ximage(v, extent = ex, asp = 1)
#im <- whatarelief::imagery(extent = ex, projection = "+proj=nzmg +datum=WGS84")
#ximage(im, add = TRUE, extent = ex)
xcontour(v, add = TRUE, extent = ex, col = "white")
xrect(ex, add = TRUE, border = "hotpink", lwd = 5)