Skip to content

plot_Plot2d

plotclassOpenCV 5.0.0
import { plot_Plot2d } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSConstructor or factory
CLASSplot_Plot2d
RETURN TYPEOwned native handle
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Native object: release it with using or delete(). Factories can return null; check before calling methods. Inherits Algorithm.

plot plot2d value in the OpenCV API.

Constructors and members

static create

Creates Plot2d object

create(data: Mat): plot_Plot2d | null;
data

1xN or Nx1 matrix containing Y values of points to plot. X values will be equal to indexes of correspondind elements in data matrix.

Returns

The plot_Plot2d | null result.

static create1

Creates Plot2d object

create1(dataX: Mat, dataY: Mat): plot_Plot2d | null;
dataX

1xN or Nx1 matrix X values of points to plot.

dataY

1xN or Nx1 matrix containing Y values of points to plot.

Returns

The plot_Plot2d | null result.

clone

Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.

clone(): this;
Returns

The this result.

setMinX

Set the min x used by this plot_Plot2d object.

setMinX(_plotMinX: number): void;
_plotMinX

plot min x argument (number).

setMinY

Set the min y used by this plot_Plot2d object.

setMinY(_plotMinY: number): void;
_plotMinY

plot min y argument (number).

setMaxX

Set the max x used by this plot_Plot2d object.

setMaxX(_plotMaxX: number): void;
_plotMaxX

plot max x argument (number).

setMaxY

Set the max y used by this plot_Plot2d object.

setMaxY(_plotMaxY: number): void;
_plotMaxY

plot max y argument (number).

setPlotLineWidth

Set the plot line width used by this plot_Plot2d object.

setPlotLineWidth(_plotLineWidth: number): void;
_plotLineWidth

plot line width argument (number).

setNeedPlotLine

Switches data visualization mode

setNeedPlotLine(_needPlotLine: boolean): void;
_needPlotLine

if true then neighbour plot points will be connected by lines. In other case data will be plotted as a set of standalone points.

setPlotLineColor

Set the plot line color used by this plot_Plot2d object.

setPlotLineColor(_plotLineColor: Scalar): void;
_plotLineColor

plot line color argument (Scalar).

setPlotBackgroundColor

Set the plot background color used by this plot_Plot2d object.

setPlotBackgroundColor(_plotBackgroundColor: Scalar): void;
_plotBackgroundColor

plot background color argument (Scalar).

setPlotAxisColor

Set the plot axis color used by this plot_Plot2d object.

setPlotAxisColor(_plotAxisColor: Scalar): void;
_plotAxisColor

plot axis color argument (Scalar).

setPlotGridColor

Set the plot grid color used by this plot_Plot2d object.

setPlotGridColor(_plotGridColor: Scalar): void;
_plotGridColor

plot grid color argument (Scalar).

setPlotTextColor

Set the plot text color used by this plot_Plot2d object.

setPlotTextColor(_plotTextColor: Scalar): void;
_plotTextColor

plot text color argument (Scalar).

setPlotSize

Set the plot size used by this plot_Plot2d object.

setPlotSize(_plotSizeWidth: number, _plotSizeHeight: number): void;
_plotSizeWidth

plot size width argument (number).

_plotSizeHeight

plot size height argument (number).

setShowGrid

Set the show grid used by this plot_Plot2d object.

setShowGrid(needShowGrid: boolean): void;
needShowGrid

need show grid argument (boolean).

setShowText

Set the show text used by this plot_Plot2d object.

setShowText(needShowText: boolean): void;
needShowText

need show text argument (boolean).

setGridLinesNumber

Set the grid lines number used by this plot_Plot2d object.

setGridLinesNumber(gridLinesNumber: number): void;
gridLinesNumber

grid lines number argument (number).

setInvertOrientation

Set the invert orientation used by this plot_Plot2d object.

setInvertOrientation(_invertOrientation: boolean): void;
_invertOrientation

invert orientation argument (boolean).

setPointIdxToPrint

Sets the index of a point which coordinates will be printed on the top left corner of the plot (if ShowText flag is true).

setPointIdxToPrint(pointIdx: number): void;
pointIdx

index of the required point in data array.

render

Render the configured two-dimensional plot into the supplied output image.

render(_plotResult: Mat): void;
_plotResult

Output destination, filled by the native operation. plot result argument (Mat).

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.