matimage {transport} | R Documentation |
Plotting Matrices as Images
Description
A simple wrapper to the image function with a more convenient syntax for plotting matrices "the right way round" as pixel images.
Usage
matimage(z, x = 1:dim(z)[1], y = 1:dim(z)[2], rot = TRUE, asp = 1, ...)
Arguments
z |
a numeric matrix. |
x , y |
(optional) coordinates of the pixels. |
rot |
logical. Whether to plot the matrix "the right way round" so that the pixel
position in the image corresponds to the pixel position in the matrix obtained by |
asp |
the aspect ratio parameter of |
... |
further parameters passed to |
Value
Nothing (invisible NULL).
Examples
m <- matrix(1:36,6,6)
image(z=m, col = heat.colors(36))
matimage(m, col = heat.colors(36))
[Package transport version 0.15-2 Index]