View Source Evision.Plot.Plot2d (Evision v0.1.38)

Summary

Types

t()

Type that represents an Plot.Plot2d struct.

Functions

Clears the algorithm state

Creates Plot2d object

Creates Plot2d object

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read

getDefaultName

Reads algorithm parameters from a file storage

render

Switches data visualization mode

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

Stores algorithm parameters in a file storage

Types

@type t() :: %Evision.Plot.Plot2d{ref: reference()}

Type that represents an Plot.Plot2d struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

@spec clear(t()) :: t() | {:error, String.t()}

Clears the algorithm state

Positional Arguments
  • self: Evision.Plot.Plot2d.t()

Python prototype (for reference only):

clear() -> None
@spec create(Evision.Mat.maybe_mat_in()) :: t() | {:error, String.t()}

Creates Plot2d object

Positional Arguments
  • data: Evision.Mat.t().

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

Return
  • retval: Plot2d

Python prototype (for reference only):

create(data) -> retval
@spec create(Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in()) ::
  t() | {:error, String.t()}

Creates Plot2d object

Positional Arguments
  • dataX: Evision.Mat.t().

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

  • dataY: Evision.Mat.t().

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

Return
  • retval: Plot2d

Python prototype (for reference only):

create(dataX, dataY) -> retval
@spec empty(t()) :: boolean() | {:error, String.t()}

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
Return
  • retval: bool

Python prototype (for reference only):

empty() -> retval
@spec getDefaultName(t()) :: binary() | {:error, String.t()}

getDefaultName

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
Return

Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string.

Python prototype (for reference only):

getDefaultName() -> retval
@spec read(t(), Evision.FileNode.t()) :: t() | {:error, String.t()}

Reads algorithm parameters from a file storage

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
  • fn_: Evision.FileNode.t()

Python prototype (for reference only):

read(fn_) -> None
@spec render(t()) :: Evision.Mat.t() | {:error, String.t()}

render

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
Return
  • plotResult: Evision.Mat.t().

Python prototype (for reference only):

render([, _plotResult]) -> _plotResult
@spec render(t(), [{atom(), term()}, ...] | nil) ::
  Evision.Mat.t() | {:error, String.t()}

render

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
Return
  • plotResult: Evision.Mat.t().

Python prototype (for reference only):

render([, _plotResult]) -> _plotResult
@spec save(t(), binary()) :: t() | {:error, String.t()}

save

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
  • filename: String

Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs).

Python prototype (for reference only):

save(filename) -> None
Link to this function

setGridLinesNumber(self, gridLinesNumber)

View Source
@spec setGridLinesNumber(t(), integer()) :: t() | {:error, String.t()}

setGridLinesNumber

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
  • gridLinesNumber: int

Python prototype (for reference only):

setGridLinesNumber(gridLinesNumber) -> None
Link to this function

setInvertOrientation(self, invertOrientation)

View Source
@spec setInvertOrientation(t(), boolean()) :: t() | {:error, String.t()}

setInvertOrientation

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
  • invertOrientation: bool

Python prototype (for reference only):

setInvertOrientation(_invertOrientation) -> None
@spec setMaxX(t(), number()) :: t() | {:error, String.t()}

setMaxX

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
  • plotMaxX: double

Python prototype (for reference only):

setMaxX(_plotMaxX) -> None
@spec setMaxY(t(), number()) :: t() | {:error, String.t()}

setMaxY

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
  • plotMaxY: double

Python prototype (for reference only):

setMaxY(_plotMaxY) -> None
@spec setMinX(t(), number()) :: t() | {:error, String.t()}

setMinX

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
  • plotMinX: double

Python prototype (for reference only):

setMinX(_plotMinX) -> None
@spec setMinY(t(), number()) :: t() | {:error, String.t()}

setMinY

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
  • plotMinY: double

Python prototype (for reference only):

setMinY(_plotMinY) -> None
Link to this function

setNeedPlotLine(self, needPlotLine)

View Source
@spec setNeedPlotLine(t(), boolean()) :: t() | {:error, String.t()}

Switches data visualization mode

Positional Arguments
  • self: Evision.Plot.Plot2d.t()

  • 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.

Python prototype (for reference only):

setNeedPlotLine(_needPlotLine) -> None
Link to this function

setPlotAxisColor(self, plotAxisColor)

View Source
@spec setPlotAxisColor(
  t(),
  {number()}
  | {number(), number()}
  | {number(), number(), number()}
  | {number(), number(), number(), number()}
) :: t() | {:error, String.t()}

setPlotAxisColor

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
  • plotAxisColor: Scalar

Python prototype (for reference only):

setPlotAxisColor(_plotAxisColor) -> None
Link to this function

setPlotBackgroundColor(self, plotBackgroundColor)

View Source
@spec setPlotBackgroundColor(
  t(),
  {number()}
  | {number(), number()}
  | {number(), number(), number()}
  | {number(), number(), number(), number()}
) :: t() | {:error, String.t()}

setPlotBackgroundColor

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
  • plotBackgroundColor: Scalar

Python prototype (for reference only):

setPlotBackgroundColor(_plotBackgroundColor) -> None
Link to this function

setPlotGridColor(self, plotGridColor)

View Source
@spec setPlotGridColor(
  t(),
  {number()}
  | {number(), number()}
  | {number(), number(), number()}
  | {number(), number(), number(), number()}
) :: t() | {:error, String.t()}

setPlotGridColor

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
  • plotGridColor: Scalar

Python prototype (for reference only):

setPlotGridColor(_plotGridColor) -> None
Link to this function

setPlotLineColor(self, plotLineColor)

View Source
@spec setPlotLineColor(
  t(),
  {number()}
  | {number(), number()}
  | {number(), number(), number()}
  | {number(), number(), number(), number()}
) :: t() | {:error, String.t()}

setPlotLineColor

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
  • plotLineColor: Scalar

Python prototype (for reference only):

setPlotLineColor(_plotLineColor) -> None
Link to this function

setPlotLineWidth(self, plotLineWidth)

View Source
@spec setPlotLineWidth(t(), integer()) :: t() | {:error, String.t()}

setPlotLineWidth

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
  • plotLineWidth: int

Python prototype (for reference only):

setPlotLineWidth(_plotLineWidth) -> None
Link to this function

setPlotSize(self, plotSizeWidth, plotSizeHeight)

View Source
@spec setPlotSize(t(), integer(), integer()) :: t() | {:error, String.t()}

setPlotSize

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
  • plotSizeWidth: int
  • plotSizeHeight: int

Python prototype (for reference only):

setPlotSize(_plotSizeWidth, _plotSizeHeight) -> None
Link to this function

setPlotTextColor(self, plotTextColor)

View Source
@spec setPlotTextColor(
  t(),
  {number()}
  | {number(), number()}
  | {number(), number(), number()}
  | {number(), number(), number(), number()}
) :: t() | {:error, String.t()}

setPlotTextColor

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
  • plotTextColor: Scalar

Python prototype (for reference only):

setPlotTextColor(_plotTextColor) -> None
Link to this function

setPointIdxToPrint(self, pointIdx)

View Source
@spec setPointIdxToPrint(t(), integer()) :: t() | {:error, String.t()}

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

Positional Arguments
  • self: Evision.Plot.Plot2d.t()

  • pointIdx: int.

    index of the required point in data array.

Python prototype (for reference only):

setPointIdxToPrint(pointIdx) -> None
Link to this function

setShowGrid(self, needShowGrid)

View Source
@spec setShowGrid(t(), boolean()) :: t() | {:error, String.t()}

setShowGrid

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
  • needShowGrid: bool

Python prototype (for reference only):

setShowGrid(needShowGrid) -> None
Link to this function

setShowText(self, needShowText)

View Source
@spec setShowText(t(), boolean()) :: t() | {:error, String.t()}

setShowText

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
  • needShowText: bool

Python prototype (for reference only):

setShowText(needShowText) -> None
@spec write(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}

Stores algorithm parameters in a file storage

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
  • fs: Evision.FileStorage.t()

Python prototype (for reference only):

write(fs) -> None
@spec write(t(), Evision.FileStorage.t(), binary()) :: t() | {:error, String.t()}

write

Positional Arguments
  • self: Evision.Plot.Plot2d.t()
  • fs: Evision.FileStorage.t()
  • name: String

Has overloading in C++

Python prototype (for reference only):

write(fs, name) -> None