Description Usage Arguments Details Value See Also Examples
Save a matrix as a PNG, TIFF, BMP, JPEG, or PDF image file, such that each pixel corresponds to exactly one element of the matrix.
1 2 3 |
x |
A matrix |
filename |
Filename |
map |
(Optional) a list, as generated by |
outlier |
(Optional) A color for outliers, if |
dev |
Which graphics device to use. |
... |
Further arguments passed to the graphics device; see |
do.dev.off |
Close graphics device when finished? |
This function is a relatively simple wrapper around the usual graphics device with the same name as dev
. The idea is to provide an easy way of creating an image file from a matrix, without axes, plotting frame, labels, etc.
For all choices of dev
except "pdf"
, the output image dimensions are set to match the matrix size, such that each pixel corresponds to an element of the matrix.
If map
is NULL
(the default), the matrix is interpreted as a matrix of colors.
If map
is specified, it is used to translate
the numeric matrix x
into a matrix of colors,
using cmap
.
None.
cimage
for drawing a matrix on the screen.
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.