plot-api / jetbrains.letsPlot.geom / geom_raster

geom_raster

class geom_raster : RasterAesthetics, LayerBase

Rectangles with x, y values mapped to center. Much faster than geom_tile but doesn't support width/height and color.

Parameters

data - dictionary or pandas DataFrame, optional. The data to be displayed in this layer. If None, the default, the data is inherited from the plot data as specified in the call to lets_plot.

stat - string, optional. The statistical transformation to use on the data for this layer, as a string. Supported transformations: "identity" (leaves the data unchanged), "count" (counts number of points with same x-axis coordinate), "bin" (counts number of points with x-axis coordinate in the same bin), "smooth" (performs smoothing - linear default)

position - string, optional. Position adjustment, either as a string ("identity", "stack", "dodge", ...), or the result of a call to a position adjustment function.

x - x-axis coordinates of the center of rectangles.

y - coordinates of the center of rectangles.

alpha - transparency level of a layer.

fill - color of geometry filling.

mapping - set of aesthetic mappings. Aesthetic mappings describe the way that variables in the data are mapped to plot "aesthetics".

Constructors

<init>

Rectangles with x, y values mapped to center. Much faster than geom_tile but doesn't support width/height and color.

geom_raster(data: Map<*, *>? = null, stat: StatOptions = Stat.identity, position: PosOptions = identity, showLegend: Boolean = true, sampling: SamplingOptions? = null, x: Double? = null, y: Double? = null, alpha: Double? = null, fill: Any? = null, mapping: RasterMapping.() -> Unit = {})

Properties

alpha

transparency level of a layer.

val alpha: Double?

fill

color of geometry filling.

val fill: Any?

x

x-axis coordinates of the center of rectangles.

val x: Double?

y

coordinates of the center of rectangles.

val y: Double?

Extension Functions

toSpec

fun Layer.toSpec(): MutableMap<String, Any>