plotStack | R Documentation |
This is a wrapper to plot all frames of an image as a raster object with the option of labeling each frame.
plotStack(x, labels = FALSE, nx, cex = 1, col = "white", ...)
x |
An |
labels |
If |
nx |
The number of frames in the x-direction of the image stack. If missing, a square tile of images will be assumed |
cex |
Optional character expansion for |
col |
Optional color for |
... |
Additional parameters passed to |
The image in x
will be plotted by the command
plot(x, all = TRUE, nx = nx)
. If labels
is not FALSE
,
labels will be generated and added with labelStack
with
adj
and offset
changed from the default values to place the
label in the upper left corner of each frame. labels = TRUE
will
simply number each frame. Other values of labels
will be used as a
label, replicating the values in labels
as necessary.
The image x
is invisibly returned to permit passing the argument
through a pipe. This function is primarily called to plot an entire
Image
object.
labelStack
, to place custom labels on each frame of the
image stack and locatorStack
, that provides an interface for
selecting frames from the stack.
# Sample color image img <- readImage(system.file("extdata", "lighthouse.jpg", package="EBImageExtra")) # separate into 12 smaller images (frames) x <- EBImage::untile(img, c(4, 3), lwd = 0) plotStack(x, labels = paste("Frame", 1:12))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.