Table of Contents

Class Plot2d

Namespace
OpenCvSharp.Plot
Assembly
OpenCvSharp.dll

Class to plot 2D data.

public class Plot2d : Algorithm, IDisposable
Inheritance
Plot2d
Implements
Inherited Members

Methods

Create(InputArray)

Creates a Plot2d object.

public static Plot2d Create(InputArray data)

Parameters

data InputArray

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

Returns

Plot2d

Create(InputArray, InputArray)

Creates a Plot2d object.

public static Plot2d Create(InputArray dataX, InputArray dataY)

Parameters

dataX InputArray

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

dataY InputArray

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

Returns

Plot2d

Render(OutputArray)

Renders the plot to an image.

public virtual void Render(OutputArray plotResult)

Parameters

plotResult OutputArray

SetGridLinesNumber(int)

Sets the number of grid lines.

public virtual void SetGridLinesNumber(int gridLinesNumber)

Parameters

gridLinesNumber int

SetInvertOrientation(bool)

Sets whether to invert the orientation of the plot.

public virtual void SetInvertOrientation(bool invertOrientation)

Parameters

invertOrientation bool

SetMaxX(double)

Sets the maximum X value of the plot.

public virtual void SetMaxX(double plotMaxX)

Parameters

plotMaxX double

SetMaxY(double)

Sets the maximum Y value of the plot.

public virtual void SetMaxY(double plotMaxY)

Parameters

plotMaxY double

SetMinX(double)

Sets the minimum X value of the plot.

public virtual void SetMinX(double plotMinX)

Parameters

plotMinX double

SetMinY(double)

Sets the minimum Y value of the plot.

public virtual void SetMinY(double plotMinY)

Parameters

plotMinY double

SetNeedPlotLine(bool)

Switches data visualization mode.

public virtual void SetNeedPlotLine(bool needPlotLine)

Parameters

needPlotLine bool

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

SetPlotAxisColor(Scalar)

Sets the axis color of the plot.

public virtual void SetPlotAxisColor(Scalar plotAxisColor)

Parameters

plotAxisColor Scalar

SetPlotBackgroundColor(Scalar)

Sets the background color of the plot.

public virtual void SetPlotBackgroundColor(Scalar plotBackgroundColor)

Parameters

plotBackgroundColor Scalar

SetPlotGridColor(Scalar)

Sets the grid color of the plot.

public virtual void SetPlotGridColor(Scalar plotGridColor)

Parameters

plotGridColor Scalar

SetPlotLineColor(Scalar)

Sets the color of the plotted lines.

public virtual void SetPlotLineColor(Scalar plotLineColor)

Parameters

plotLineColor Scalar

SetPlotLineWidth(int)

Sets the width of the plotted lines.

public virtual void SetPlotLineWidth(int plotLineWidth)

Parameters

plotLineWidth int

SetPlotSize(int, int)

Sets the size of the plot image.

public virtual void SetPlotSize(int plotSizeWidth, int plotSizeHeight)

Parameters

plotSizeWidth int
plotSizeHeight int

SetPlotTextColor(Scalar)

Sets the text color of the plot.

public virtual void SetPlotTextColor(Scalar plotTextColor)

Parameters

plotTextColor Scalar

SetPointIdxToPrint(int)

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

public virtual void SetPointIdxToPrint(int pointIdx)

Parameters

pointIdx int

index of the required point in data array.

SetShowGrid(bool)

Sets whether to show the grid.

public virtual void SetShowGrid(bool needShowGrid)

Parameters

needShowGrid bool

SetShowText(bool)

Sets whether to show the text.

public virtual void SetShowText(bool needShowText)

Parameters

needShowText bool