plot.matrix: Overload the plot function for matrices

Description Usage Arguments Value Author(s) Examples

Description

This is a simple S3 method for the plot function which takes a matrix, converts it to an RGB pixmap (by replicating it 3 times, once for each channel), and then plotting the resulting image.

Usage

1
2
## S3 method for class 'matrix'
plot(x, ...)

Arguments

x

A matrix representing an image raster.

...

Additional arguments to send to plot.

Value

None.

Author(s)

Eric Kort <eric.kort@vai.org>

Examples

1
2
tif <- readTiff(system.file("tiff", "jello.tif", package="rtiff"))
plot(tif@red) 

Example output

Loading required package: pixmap
Warning message:
In rep(cellres, length = 2) : 'x' is NULL so the result will be NULL

rtiff documentation built on Jan. 14, 2021, 5:20 a.m.

Related to plot.matrix in rtiff...