image {graphics} R Documentation

Display a Color Image

Description


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.

Usage

image(x,
    col = "YlOrRd",
    ... = NULL);

Arguments

x

-

col

a list Of colors such As that generated by hcl.colors, gray.colors Or similar functions.

env

[as Environment]

Details

Authors

graphics

Value

this function returns data object of type any kind.

clr value class

Examples

 bitmap(file = "./plot.png") {
     image(matrix(c(1,2,3,4), nrow = 2, byrow = TRUE));
 }

[Package graphics version 1.0.0.0 Index]