oa/plot.rs
1//! `oa::plot` — matplotlib-style retained figure and axes.
2//!
3//! The module is a thin layout + replay layer over the engine's GPU
4//! compositor. Three terminal sinks are provided:
5//!
6//! ```rust,ignore
7//! let mut fig = plot::Figure::new(plot::FigureConfig { rows: 2, cols: 2, ..Default::default() });
8//! fig.ax(0, 0).plot(&loss_data, Default::default());
9//! fig.ax(0, 1).imshow(texture);
10//! fig.save_to(&engine, "out.png")?; // headless file sink
11//! let img = fig.render_on(&engine)?; // → oa::Image
12//! fig.show_on(&engine)?; // interactive window
13//! ```
14//!
15//! Compact surface: raster bases plus ordered line, scatter, bar, and
16//! histogram artists share the same GPU-composed replay.
17//!
18//! Donor reference: `oa/ui/plot/plot.h`
19
20pub mod axes;
21pub mod figure;
22pub mod view;
23
24#[path = "plot/type.gen.rs"]
25mod types;
26
27pub use axes::{
28 Axes, BarStyle, BoxStyle, HeatmapStyle, LineStyle, Scale, ScatterStyle, TickFormat,
29};
30pub use figure::{Figure, FigureConfig, Theme};
31pub use view::{FigureView, FigureViewState};