lichtung_plot_ndarray/lib.rs
1//! Plot logical ndarray vectors, selected table columns and rectangular grids.
2//!
3//! The complete native renderer API is re-exported unchanged. Additional family
4//! constructors bind foreign inputs eagerly; only `from_data` retains a read-only
5//! source context for later logical-column lookup. `.into()` hands off an owned
6//! native plot and releases that context. Validity pairs use **true = present**.
7//! [`PlotAdapter::into_parts`] preserves source-free [`BindingMetadata`] alongside
8//! the native Plot; restore the matching pair with [`PlotAdapter::from_parts`] or
9//! [`PlotAdapter::from_parts_with_data`] without reconstructing its configuration.
10//! [`ColumnProjection`] associates borrowed one-column sources with their original
11//! logical coordinates; optional raw identities remain separate from display labels.
12//!
13//! Strided, transposed, reversed, Fortran and broadcast views follow logical index
14//! order. Nulls and present NaNs stay distinct; numeric primitives round to f64.
15//!
16//! Native capability bounds also apply to adapter receivers:
17//! ```compile_fail
18//! use lichtung_plot_ndarray::{AlphaEncoding, Scatter};
19//! fn unsupported(plot: Scatter<'_>) {
20//! plot.line_alpha(AlphaEncoding::theme()); // Scatter has no line target.
21//! }
22//! ```
23
24#![allow(
25 clippy::needless_pass_by_value,
26 reason = "ndarray views are lightweight borrowed descriptors conventionally accepted by value"
27)]
28
29pub use lichtung_plot::*;
30
31mod alpha;
32mod element;
33mod error;
34mod frontend;
35mod input;
36mod layers;
37mod projection;
38mod significance;
39mod snapshot;
40mod source;
41
42pub use alpha::{AlphaInput, AlphaValuesInput};
43pub use element::{
44 ArrayElement, BooleanElement, CategoryElement, NumericElement, SourceRowElement,
45};
46pub use error::AdapterError;
47pub use frontend::*;
48pub use input::{
49 AxisInput, BooleanInput, CategoryInput, ColumnsInput, NumericInput, NumericSeriesInput,
50 SourceRowsInput,
51};
52pub use layers::{BarPointLayerAdapter, PointLayerAdapter};
53pub use projection::ColumnProjection;
54pub use significance::*;
55pub use source::ArraySource;
56
57#[cfg(test)]
58mod tests;