Expand description
oa::plot — matplotlib-style retained figure and axes.
The module is a thin layout + replay layer over the runtime’s GPU compositor. Three terminal sinks are provided:
ⓘ
let mut fig = plot::Figure::new(plot::FigureConfig { rows: 2, cols: 2, ..Default::default() });
fig.ax(0, 0).plot(&loss_data, Default::default());
fig.ax(0, 1).imshow(texture);
fig.save_to(&runtime, "out.png")?; // headless file sink
let img = fig.render_on(&runtime)?; // → oa::Image
fig.show_on(&runtime)?; // interactive windowCompact surface: raster bases plus ordered line, scatter, bar, and histogram artists share the same GPU-composed replay.
Donor reference: oa/ui/plot/plot.h
Re-exports§
pub use axes::Axes;pub use axes::BarStyle;pub use axes::BoxStyle;pub use axes::HeatmapStyle;pub use axes::LineStyle;pub use axes::Scale;pub use axes::ScatterStyle;pub use axes::TickFormat;pub use figure::Figure;pub use figure::FigureConfig;pub use figure::Theme;pub use view::FigureView;pub use view::FigureViewState;