Skip to main content

Class: StationPlot<GridType, MapType, ObsFieldName>

Defined in: StationPlot.ts:295

Station model plots for observed data

Example

// Specify how to set up the station plot
const station_plot_locs = {
tmpf: {type: 'number', pos: 'ul', color: '#cc0000', formatter: val => val === null ? '' : val.toFixed(0)},
dwpf: {type: 'number', pos: 'll', color: '#00aa00', formatter: val => val === null ? '' : val.toFixed(0)},
wind: {type: 'barb', pos: 'c'},
preswx: {type: 'symbol', pos: 'cl', color: '#ff00ff'},
skyc: {type: 'symbol', pos: 'c'},
};

// Create the station plot
const station_plot = new StationPlot(obs_field, {config: station_plot_locs, thin_fac: 8, font_size: 14});

Extends

Type Parameters

Type Parameter
GridType extends Grid
MapType extends MapLikeType
ObsFieldName extends string

Constructors

Constructor

new StationPlot<GridType, MapType, ObsFieldName>(field, opts): StationPlot<GridType, MapType, ObsFieldName>

Defined in: StationPlot.ts:306

Create station plots

Parameters

ParameterTypeDescription
fieldRawObsField<GridType, ObsFieldName>A field containing the observed data
optsStationPlotOptions<ObsFieldName>Various options for the station plots

Returns

StationPlot<GridType, MapType, ObsFieldName>

Overrides

PlotComponent.constructor

Properties

PropertyModifierTypeDefined in
optsreadonlyRequired<StationPlotOptions<ObsFieldName>>StationPlot.ts:297

Methods

updateField()

updateField(field): Promise<void>

Defined in: StationPlot.ts:319

Update the data displayed as station plots

Parameters

ParameterTypeDescription
fieldRawObsField<GridType, ObsFieldName>The new field to display as station plots

Returns

Promise<void>