Skip to main content

Class: Raster<ArrayType, GridType, MapType>

Defined in: Fill.ts:219

A raster (i.e. pixel) plot

Example

// Create a raster plot with the provided color map
const raster = new Raster(wind_speed_field, {cmap: color_map});

Extends

  • PlotComponentFill<ArrayType, GridType, MapType>

Type Parameters

Type Parameter
ArrayType extends TypedArray
GridType extends StructuredGrid
MapType extends MapLikeType

Constructors

Constructor

new Raster<ArrayType, GridType, MapType>(field, opts): Raster<ArrayType, GridType, MapType>

Defined in: Fill.ts:226

Create a raster plot

Parameters

ParameterTypeDescription
fieldRawScalarField<ArrayType, GridType>The field to create the raster plot from
optsRasterOptionsOptions for creating the raster plot

Returns

Raster<ArrayType, GridType, MapType>

Overrides

PlotComponentFill<ArrayType, GridType, MapType>.constructor

Properties

PropertyModifierTypeInherited fromDefined in
cmap_mag_filterprotectednull | numberPlotComponentFill.cmap_mag_filterFill.ts:84
image_mag_filterprotectednull | numberPlotComponentFill.image_mag_filterFill.ts:83
optsreadonlyRequired<ContourFillOptions>PlotComponentFill.optsFill.ts:76

Methods

updateField()

updateField(field, mask?): Promise<void>

Defined in: Fill.ts:234

Update the data displayed as a raster plot

Parameters

ParameterTypeDescription
fieldRawScalarField<ArrayType, GridType>The new field to display as a raster plot
mask?Uint8Array-

Returns

Promise<void>

Overrides

PlotComponentFill.updateField