oa::plot::Axes

Class published by the oa::plot namespace.

Public Methods

void oa::plot::Axes::autoLimits()
void oa::plot::Axes::bar(oa::Span<const oa::F32> inY, const BarStyle & inStyle = {})
void oa::plot::Axes::borderColor(oa::Color inColor)
void oa::plot::Axes::caption(const char * inText, oa::Color inColor = = {0.0F, 0.0F, 0.0F, 0.0F})
void oa::plot::Axes::grid(bool inVisible = true)
void oa::plot::Axes::heatmap(oa::Span<const oa::F32> inValues, oa::I32 inRows, oa::I32 inCols, const HeatmapStyle & inStyle = {})
void oa::plot::Axes::histogram(oa::Span<const oa::F32> inValues, oa::I32 inBins = 16, const BarStyle & inStyle = {})
void oa::plot::Axes::imshow(const oa::Texture & inTex)
void oa::plot::Axes::legend(bool inVisible = true)
void oa::plot::Axes::limits(oa::F32 inXMin, oa::F32 inXMax, oa::F32 inYMin, oa::F32 inYMax)
void oa::plot::Axes::plot(oa::Span<const oa::F32> inX, oa::Span<const oa::F32> inY, const LineStyle & inStyle = {})
void oa::plot::Axes::plot(oa::Span<const oa::F32> inY, const LineStyle & inStyle = {})
void oa::plot::Axes::scatter(oa::Span<const oa::F32> inX, oa::Span<const oa::F32> inY, const ScatterStyle & inStyle = {})
void oa::plot::Axes::title(const char * inText, oa::Color inColor = = {0.0F, 0.0F, 0.0F, 0.0F})
void oa::plot::Axes::xLabel(const char * inText)
void oa::plot::Axes::yLabel(const char * inText)

Examples

Constructor & Destructor Documentation

oa::plot::Axes::Axes()
Default-constructible so oa::plot::Figure can hold oa::Vector <Axes >. Use Figure::ax(r, c) to obtain a reference rather than constructing one yourself.

Public Method Documentation

void oa::plot::Axes::autoLimits()
No public source comment is attached to this declaration.

Returns

void

The declared return value.

void oa::plot::Axes::bar( oa::Span<const oa::F32> inY, const BarStyle & inStyle = {} )
category bars at x = 0..n-1. Negative values extend below zero.

Parameters

inY
oa::Span<const oa::F32>

inStyle
const BarStyle &

Default: {}

Returns

void

The declared return value.

void oa::plot::Axes::borderColor( oa::Color inColor )
border / frame color around the axes rect. Defaults to no border.

Parameters

inColor
oa::Color

Returns

void

The declared return value.

void oa::plot::Axes::caption( const char * inText, oa::Color inColor = = {0.0F, 0.0F, 0.0F, 0.0F} )
Additional caption line under the image (used by the classify tutorial to show the ground-truth label when prediction is wrong). alpha zero uses theme secondary text.

Parameters

inText
const char *

inColor
oa::Color

Default: = {0.0F, 0.0F, 0.0F, 0.0F}

Returns

void

The declared return value.

void oa::plot::Axes::grid( bool inVisible = true )
grid and labeled-series legend are enabled by default.

Parameters

inVisible
bool

Default: true

Returns

void

The declared return value.

void oa::plot::Axes::heatmap( oa::Span<const oa::F32> inValues, oa::I32 inRows, oa::I32 inCols, const HeatmapStyle & inStyle = {} )
Dense row-major heatmap. This is the compact plotting contract for confusion matrices and other evaluation tables.

Parameters

inValues
oa::Span<const oa::F32>

inRows
oa::I32

inCols
oa::I32

inStyle
const HeatmapStyle &

Default: {}

Returns

void

The declared return value.

void oa::plot::Axes::histogram( oa::Span<const oa::F32> inValues, oa::I32 inBins = 16, const BarStyle & inStyle = {} )
histogram convenience: finite samples are binned on the host into an ordered bar artist. Metric histories are intentionally small telemetry.

Parameters

inValues
oa::Span<const oa::F32>

inBins
oa::I32

Default: 16

inStyle
const BarStyle &

Default: {}

Returns

void

The declared return value.

void oa::plot::Axes::imshow( const oa::Texture & inTex )
Image grid call. The texture is sampled directly by oa::Ui into this axes subregion; Figure does not read its pixels back for composition.

Parameters

inTex
const oa::Texture &

Returns

void

The declared return value.

void oa::plot::Axes::legend( bool inVisible = true )
No public source comment is attached to this declaration.

Parameters

inVisible
bool

Default: true

Returns

void

The declared return value.

void oa::plot::Axes::limits( oa::F32 inXMin, oa::F32 inXMax, oa::F32 inYMin, oa::F32 inYMax )
Fixed data limits. Invalid or degenerate input restores automatic limits.

Parameters

inXMin
oa::F32

inXMax
oa::F32

inYMin
oa::F32

inYMax
oa::F32

Returns

void

The declared return value.

void oa::plot::Axes::plot( oa::Span<const oa::F32> inX, oa::Span<const oa::F32> inY, const LineStyle & inStyle = {} )
Explicit-X line plot. X and Y must be non-empty and have equal length.

Parameters

inX
oa::Span<const oa::F32>

inY
oa::Span<const oa::F32>

inStyle
const LineStyle &

Default: {}

Returns

void

The declared return value.

void oa::plot::Axes::plot( oa::Span<const oa::F32> inY, const LineStyle & inStyle = {} )
Line plot of N values (y[i] vs i). Repeated calls append ordered series.

Parameters

inY
oa::Span<const oa::F32>

inStyle
const LineStyle &

Default: {}

Returns

void

The declared return value.

void oa::plot::Axes::scatter( oa::Span<const oa::F32> inX, oa::Span<const oa::F32> inY, const ScatterStyle & inStyle = {} )
Point cloud / metric scatter. X and Y must have equal length.

Parameters

inX
oa::Span<const oa::F32>

inY
oa::Span<const oa::F32>

inStyle
const ScatterStyle &

Default: {}

Returns

void

The declared return value.

void oa::plot::Axes::title( const char * inText, oa::Color inColor = = {0.0F, 0.0F, 0.0F, 0.0F} )
title above the axes. Color controls the text color (red/green for the classify-tutorial correct/wrong indicator). alpha zero uses theme text.

Parameters

inText
const char *

inColor
oa::Color

Default: = {0.0F, 0.0F, 0.0F, 0.0F}

Returns

void

The declared return value.

void oa::plot::Axes::xLabel( const char * inText )
Centered X / Y axis labels (below / left of the plot). Y labels render bottom-to-top; both reserve space rather than overlaying plot content.

Parameters

inText
const char *

Returns

void

The declared return value.

void oa::plot::Axes::yLabel( const char * inText )
No public source comment is attached to this declaration.

Parameters

inText
const char *

Returns

void

The declared return value.