geomImshow

fun geomImshow(rasterData: RasterData, norm: Boolean = true, vmin: Number? = null, vmax: Number? = null, extent: List<Number>? = null, showLegend: Boolean = true, colorBy: String = "paint_c"): Feature

Displays image specified by RasterData.

This geom is not as flexible as geomRaster() or geomTile() but vastly superior in the terms of rendering efficiency.

Notes

-----

This geom doesn't understand any aesthetics. It doesn't support color scales either.

Examples

Return

Layer object.

Parameters

rasterData

Specifies image type, size and pixel values. See RasterData.create.

norm

default = true.

  • true - luminance values in grey-scale image will be scaled to [0-255] range using a linear scaler.

  • false - disables scaling of luminance values in grey-scale image. This parameter is ignored for RGB(A) images.

vmin

default = null. Defines the data range used for luminance normalization in grey-scale images. This parameter is ignored for RGB(A) images or if parameter norm = false.

vmax

default = null. Defines the data range used for luminance normalization in grey-scale images. This parameter is ignored for RGB(A) images or if parameter norm = false.

extent

default = listOf(-0.5, ncol-0.5, -0.5, nrow-0.5). List of 4 numbers: (left, right, bottom, top). Defines image's bounding box in terms of the "data coordinates".

  • left, right: coordinates of pixels outer edge along the x-axis for pixels in the 1-st and the last column.

  • bottom, top: coordinates of pixels outer edge along the y-axis for pixels in the 1-st and the last row.

showLegend

default = true. Greyscale images only. false - do not show legend for this layer.

colorBy

default="paint_c" ("fill", "color", "paint_a", "paint_b", "paint_c"). Define the color-aesthetic used by the legend shown for a greyscale image.