imagesc | R Documentation |
Scales image data to the full range of the current palette and displays the image.
imagesc(x=seq(ncol(C)), y=seq(nrow(C)), C, col=jet.colors(12), ...)
x , y |
locations of grid lines at which the values in |
C |
numeric matrix representing data to be plotted. Note that
|
col |
vector of colors used to display image data |
... |
graphical parameters for image may also be passed as arguments to this method |
Each element of C
corresponds to a rectangular area in the image.
The values of the elements of C
are indices into the current
palette that determine the color of each patch.
The method interprets the matrix data as a table of f(x[i], y[j])
values,
so that the x axis corresponds to column number and the y axis to row number,
with row 1 at the top, i.e., the same as the conventional printed layout
of a matrix.
P. Roebuck proebuck1701@gmail.com
image
,
jet.colors
,
par
values <- matrix(c(seq(1, 5, by=1),
seq(2, 10, by=2),
seq(3, 15, by=3)), nrow=3, byrow=TRUE)
imagesc(values, xlab="cols", ylab="rows", col=jet.colors(16))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.