matimage | R Documentation |
A simple wrapper to the image function with a more convenient syntax for plotting matrices "the right way round" as pixel images.
matimage(z, x = 1:dim(z)[1], y = 1:dim(z)[2], rot = TRUE, asp = 1, ...)
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 |
Nothing (invisible NULL).
m <- matrix(1:36,6,6)
image(z=m, col = heat.colors(36))
matimage(m, col = heat.colors(36))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.