oa::plot::Figure

Class published by the oa::plot namespace.

Public Types

Public Methods

Axes & oa::plot::Figure::ax(oa::I32 inRow, oa::I32 inCol)
Rect oa::plot::Figure::cellRect(oa::I32 inRow, oa::I32 inCol, oa::U32 inW, oa::U32 inH)
oa::I32 oa::plot::Figure::cols()
const FigureConfig & oa::plot::Figure::config()
oa::Result<oa::Image> oa::plot::Figure::render()
oa::Result<oa::Image> oa::plot::Figure::render(oa::Engine & inEngine)
void oa::plot::Figure::renderFrame(oa::U32 inWidth, oa::U32 inHeight, ::oa::Ui & inUi)
oa::I32 oa::plot::Figure::rows()
oa::Status oa::plot::Figure::saveTo(const char * inPath)
oa::Status oa::plot::Figure::saveTo(oa::Engine & inEngine, const char * inPath)
oa::Status oa::plot::Figure::show()
void oa::plot::Figure::title(const char * inText)
void oa::plot::Figure::xLabel(const char * inText)
void oa::plot::Figure::yLabel(const char * inText)

Examples

Constructor & Destructor Documentation

oa::plot::Figure::Figure( const FigureConfig & inConfig = {} )
No public source comment is attached to this declaration.

Parameters

inConfig
const FigureConfig &

Default: {}

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

Public Method Documentation

Axes & oa::plot::Figure::ax( oa::I32 inRow, oa::I32 inCol )
access the (row, col) axes. rows and cols are 0-indexed.

Parameters

inRow
oa::I32

inCol
oa::I32

Returns

Axes &

The declared return value.

Rect oa::plot::Figure::cellRect( oa::I32 inRow, oa::I32 inCol, oa::U32 inW, oa::U32 inH )
No public source comment is attached to this declaration.

Parameters

inRow
oa::I32

inCol
oa::I32

inW
oa::U32

inH
oa::U32

Returns

Rect

The declared return value.

oa::I32 oa::plot::Figure::cols()
No public source comment is attached to this declaration.

Returns

oa::I32

The declared return value.

const FigureConfig & oa::plot::Figure::config()
── layout query (used by impl + tutorials) ──────────────────────────

Returns

const FigureConfig &

The declared return value.

oa::Result<oa::Image> oa::plot::Figure::render()
No public source comment is attached to this declaration.

Returns

oa::Result<oa::Image>

The declared return value.

oa::Result<oa::Image> oa::plot::Figure::render( oa::Engine & inEngine )
Render the fixed-size figure into a semantic RGBA image. The result is a normalized Float32 [1, 4, height, width] oa::Image and may be passed to oa::Viewer, Vision operations, or an image encoder. This semantic-image sink performs one terminal GPU readback and upload; show() remains GPU-resident. Every label uses the same generated coverage data as interactive text.

Parameters

inEngine
oa::Engine &

Returns

oa::Result<oa::Image>

The declared return value.

void oa::plot::Figure::renderFrame( oa::U32 inWidth, oa::U32 inHeight, ::oa::Ui & inUi )
replay the complete figure directly into an active oa::Ui GPU frame. The configured aspect ratio and all title/label bands remain stable on resize.

Parameters

inWidth
oa::U32

inHeight
oa::U32

inUi
::oa::Ui &

Returns

void

The declared return value.

oa::I32 oa::plot::Figure::rows()
No public source comment is attached to this declaration.

Returns

oa::I32

The declared return value.

oa::Status oa::plot::Figure::saveTo( const char * inPath )
No public source comment is attached to this declaration.

Parameters

inPath
const char *

Returns

oa::Status

The declared return value.

oa::Status oa::plot::Figure::saveTo( oa::Engine & inEngine, const char * inPath )
Headless GPU render -> PNG. The explicit overload completes pending producers through the supplied engine; the convenience overload uses the active operation context. One readback occurs only after composition. output includes raster bases, ordered line/scatter/bar artists, heatmaps, legends, figure/axes titles and labels, and captions.

Parameters

inEngine
oa::Engine &

inPath
const char *

Returns

oa::Status

The declared return value.

oa::Status oa::plot::Figure::show()
open an interactive window, render until closed. Returns when the user closes the window or the run loop exits.

Returns

oa::Status

The declared return value.

void oa::plot::Figure::title( const char * inText )
Centered figure-level title and labels. Y labels render bottom-to-top. The title also replaces the interactive window name.

Parameters

inText
const char *

Returns

void

The declared return value.

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

Parameters

inText
const char *

Returns

void

The declared return value.

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

Parameters

inText
const char *

Returns

void

The declared return value.