image {graphics} | R Documentation |
Creates a grid of colored or gray-scale rectangles with colors
corresponding to the values in z. This can be used to display
three-dimensional or spatial data aka images. This is a generic
function.
NOTE: the grid Is drawn As a Set Of rectangles by Default; see
the useRaster argument To draw the grid As a raster image.
The Function hcl().colors provides a broad range Of sequential
color palettes that are suitable For displaying ordered data,
With n giving the number Of colors desired.
image(x,
col = "YlOrRd",
... = NULL);
bitmap(file = "./plot.png") {
image(matrix(c(1,2,3,4), nrow = 2, byrow = TRUE));
}