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

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

Reads algorithm parameters from a file storage

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(Keyword.t()) :: any() | {:error, String.t()}
@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(Keyword.t()) :: any() | {:error, String.t()}
@spec create(Evision.Mat.maybe_mat_in()) :: t() | {:error, String.t()}

Creates Plot2d object

Positional Arguments
  • data: Evision.Mat.

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

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

  • dataY: Evision.Mat.

    \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(Keyword.t()) :: any() | {:error, String.t()}
@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
Link to this function

getDefaultName(named_args)

View Source
@spec getDefaultName(Keyword.t()) :: any() | {:error, String.t()}
@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(Keyword.t()) :: any() | {:error, String.t()}
@spec read(t(), Evision.FileNode.t()) :: t() | {:error, String.t()}

Reads algorithm parameters from a file storage

Positional Arguments

Python prototype (for reference only):

read(fn) -> None
@spec render(Keyword.t()) :: any() | {:error, String.t()}
@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(Keyword.t()) :: any() | {:error, String.t()}
@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(named_args)

View Source
@spec setGridLinesNumber(Keyword.t()) :: any() | {:error, String.t()}
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: integer()

Python prototype (for reference only):

setGridLinesNumber(gridLinesNumber) -> None
Link to this function

setInvertOrientation(named_args)

View Source
@spec setInvertOrientation(Keyword.t()) :: any() | {:error, String.t()}
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(Keyword.t()) :: any() | {:error, String.t()}
@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(Keyword.t()) :: any() | {:error, String.t()}
@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(Keyword.t()) :: any() | {:error, String.t()}
@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(Keyword.t()) :: any() | {:error, String.t()}
@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(named_args)

View Source
@spec setNeedPlotLine(Keyword.t()) :: any() | {:error, String.t()}
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(named_args)

View Source
@spec setPlotAxisColor(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setPlotAxisColor(self, plotAxisColor)

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

setPlotAxisColor

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

Python prototype (for reference only):

setPlotAxisColor(_plotAxisColor) -> None
Link to this function

setPlotBackgroundColor(named_args)

View Source
@spec setPlotBackgroundColor(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setPlotBackgroundColor(self, plotBackgroundColor)

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

setPlotBackgroundColor

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

Python prototype (for reference only):

setPlotBackgroundColor(_plotBackgroundColor) -> None
Link to this function

setPlotGridColor(named_args)

View Source
@spec setPlotGridColor(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setPlotGridColor(self, plotGridColor)

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

setPlotGridColor

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

Python prototype (for reference only):

setPlotGridColor(_plotGridColor) -> None
Link to this function

setPlotLineColor(named_args)

View Source
@spec setPlotLineColor(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setPlotLineColor(self, plotLineColor)

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

setPlotLineColor

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

Python prototype (for reference only):

setPlotLineColor(_plotLineColor) -> None
Link to this function

setPlotLineWidth(named_args)

View Source
@spec setPlotLineWidth(Keyword.t()) :: any() | {:error, String.t()}
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: integer()

Python prototype (for reference only):

setPlotLineWidth(_plotLineWidth) -> None
@spec setPlotSize(Keyword.t()) :: any() | {:error, String.t()}
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: integer()
  • plotSizeHeight: integer()

Python prototype (for reference only):

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

setPlotTextColor(named_args)

View Source
@spec setPlotTextColor(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setPlotTextColor(self, plotTextColor)

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

setPlotTextColor

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

Python prototype (for reference only):

setPlotTextColor(_plotTextColor) -> None
Link to this function

setPointIdxToPrint(named_args)

View Source
@spec setPointIdxToPrint(Keyword.t()) :: any() | {:error, String.t()}
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: integer().

    index of the required point in data array.

Python prototype (for reference only):

setPointIdxToPrint(pointIdx) -> None
@spec setShowGrid(Keyword.t()) :: any() | {:error, String.t()}
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
@spec setShowText(Keyword.t()) :: any() | {:error, String.t()}
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(Keyword.t()) :: any() | {:error, String.t()}
@spec write(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}

Stores algorithm parameters in a file storage

Positional Arguments

Python prototype (for reference only):

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

write

Positional Arguments

Has overloading in C++

Python prototype (for reference only):

write(fs, name) -> None