Description Usage Arguments Examples
Maps a response variable with R's contour or image functions, or both, using
the output of coldata.to.imagemat()
. Also can return contours as vector
data, using R's contourLines. The graph can be sent to the screen or
exported.
1 2 3 4 5 6 7 | imageGraph(matrixdata, levels = NULL, breaks = c(-33000, 0, 150, 250,
500, 1000, 2000), xname = "x", yname = "y", xrange = NULL,
yrange = NULL, axisdiv = c(100, 100), img = TRUE, cntrs = FALSE,
filled = TRUE, drawgrid = FALSE, addaxes = 1:4, clrs = NULL,
cntcolor = "black", lwidth = 1, returnline = FALSE,
newgraph = FALSE, add = FALSE, plotsize = 6, h = 11, w = 11,
export = X11, graphfile = NULL)
|
matrixdata |
a list having components x, y, and mat, exactly the output of coldata.to.imagemat |
levels |
if set, then contours are drawn (or colors assigned) to breaks are at levels equally-spaced divisions of the response variable; can be NULL to let breaks control |
breaks |
if set, a vector of breaks for the image colors and the contour lines; if NULL, levels controls the breaks |
xname, yname |
axis names |
xrange, yrange |
Minimum and maximum x and y coordinates of area graphed.
If |
axisdiv |
the division between tick marks; must be a vector of 2, first for x ticks then for y ticks |
img |
TRUE or FALSE, whether to draw the color image |
cntrs |
TRUE or FALSE, whether to add contour lines; both img and cntrs can be TRUE |
filled |
TRUE or FALSE, whether to draw filled contours; if TRUE, neither image or standard contours are included |
clrs |
colors for the image; if NULL, they are chosen by default, otherwise, must be 1 + the number of breaks |
lwidth |
Line width; see |
returnline |
TRUE or FALSE, whether to return the contour lines; see R's base function contourLines for details |
newgraph |
if FALSE, just graph to the screen and export is ignored; use TRUE to create a new plot window or export to a file. |
add |
Logical. Whether to add elements such as points or line to an existing graph. if TRUE, there must be an appropriate existing graph, otherwise, a new graph is drawn. |
plotsize |
size of graph's x-dimension in inches; ignored if newgraph=FALSE |
h, w |
height and width of graph window in units which depend on the export device chosen (some are pixels, some are inches); ignored if newgraph = FALSE. |
export |
if |
graphfile |
the file name if export is pdf, png, jpeg, win.metafile, etc. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | ## Not run:
CTFSplot('bci', 6, 'full')
N = colSums(
abundanceperquad(bciex::bci12t6mini, plotdim = c(1000, 500), grid = 20)$abund
)
matdata = coldata.to.imagemat(z = N,
gridsize = 20,
plotmax = c(1000, 500))
imageGraph(
matrixdata = matdata,
breaks = seq(100, 400, by = 25),
img = TRUE,
cntrs = FALSE,
newgraph = FALSE,
plotsize = 6,
h = 11,
w = 11
)
imageGraph(
matrixdata = matdata,
breaks = seq(100, 400, by = 25),
img = TRUE,
cntrs = TRUE,
newgraph = FALSE,
plotsize = 6,
h = 11,
w = 11
)
imageGraph(
matrixdata = matdata,
breaks = seq(100, 400, by = 25),
img = TRUE,
cntrs = FALSE,
newgraph = TRUE,
export = win.graph,
h = 11,
w = 11,
plotsize = 8
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.