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
dataInputArray1xN or Nx1 matrix containing Y values of points to plot. X values will be equal to indexes of corresponding elements in data matrix.
Returns
Create(InputArray, InputArray)
Creates a Plot2d object.
public static Plot2d Create(InputArray dataX, InputArray dataY)
Parameters
dataXInputArray1xN or Nx1 matrix X values of points to plot.
dataYInputArray1xN or Nx1 matrix containing Y values of points to plot.
Returns
Render(OutputArray)
Renders the plot to an image.
public virtual void Render(OutputArray plotResult)
Parameters
plotResultOutputArray
SetGridLinesNumber(int)
Sets the number of grid lines.
public virtual void SetGridLinesNumber(int gridLinesNumber)
Parameters
gridLinesNumberint
SetInvertOrientation(bool)
Sets whether to invert the orientation of the plot.
public virtual void SetInvertOrientation(bool invertOrientation)
Parameters
invertOrientationbool
SetMaxX(double)
Sets the maximum X value of the plot.
public virtual void SetMaxX(double plotMaxX)
Parameters
plotMaxXdouble
SetMaxY(double)
Sets the maximum Y value of the plot.
public virtual void SetMaxY(double plotMaxY)
Parameters
plotMaxYdouble
SetMinX(double)
Sets the minimum X value of the plot.
public virtual void SetMinX(double plotMinX)
Parameters
plotMinXdouble
SetMinY(double)
Sets the minimum Y value of the plot.
public virtual void SetMinY(double plotMinY)
Parameters
plotMinYdouble
SetNeedPlotLine(bool)
Switches data visualization mode.
public virtual void SetNeedPlotLine(bool needPlotLine)
Parameters
needPlotLineboolif 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
plotAxisColorScalar
SetPlotBackgroundColor(Scalar)
Sets the background color of the plot.
public virtual void SetPlotBackgroundColor(Scalar plotBackgroundColor)
Parameters
plotBackgroundColorScalar
SetPlotGridColor(Scalar)
Sets the grid color of the plot.
public virtual void SetPlotGridColor(Scalar plotGridColor)
Parameters
plotGridColorScalar
SetPlotLineColor(Scalar)
Sets the color of the plotted lines.
public virtual void SetPlotLineColor(Scalar plotLineColor)
Parameters
plotLineColorScalar
SetPlotLineWidth(int)
Sets the width of the plotted lines.
public virtual void SetPlotLineWidth(int plotLineWidth)
Parameters
plotLineWidthint
SetPlotSize(int, int)
Sets the size of the plot image.
public virtual void SetPlotSize(int plotSizeWidth, int plotSizeHeight)
Parameters
SetPlotTextColor(Scalar)
Sets the text color of the plot.
public virtual void SetPlotTextColor(Scalar plotTextColor)
Parameters
plotTextColorScalar
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
pointIdxintindex of the required point in data array.
SetShowGrid(bool)
Sets whether to show the grid.
public virtual void SetShowGrid(bool needShowGrid)
Parameters
needShowGridbool
SetShowText(bool)
Sets whether to show the text.
public virtual void SetShowText(bool needShowText)
Parameters
needShowTextbool