1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
//! starsight — a unified scientific visualization crate for Rust.
//!
//! starsight is the only crate users add to `Cargo.toml`. It re-exports types
//! from the seven layer crates underneath through three access patterns:
//!
//! 1. **The prelude** — `use starsight::prelude::*;` for the common types.
//! 2. **By category** — `use starsight::marks::LineMark;`, `use starsight::backends::SkiaBackend;`.
//! 3. **By layer** — `use starsight::components::marks::LineMark;` (Latin layer aliases).
//!
//! ```no_run
//! use starsight::prelude::*;
//!
//! fn main() -> starsight::Result<()> {
//! plot!(&[1.0, 2.0, 3.0, 4.0], &[10.0, 20.0, 15.0, 25.0]).save("chart.png")
//! }
//! ```
// ── Layer aliases (Latin/Greek-rooted) ───────────────────────────────────────────────────────────
pub use starsight_layer_1 as background;
pub use starsight_layer_2 as modifiers;
pub use starsight_layer_3 as components;
pub use starsight_layer_4 as composition;
pub use starsight_layer_5 as common;
pub use starsight_layer_6 as interactivity;
pub use starsight_layer_7 as export;
// ── Semantic facade modules (by category) ────────────────────────────────────────────────────────
/// Re-exports of the colormap types and built-in colormap constants.
/// Re-exports of theming types and the default light/dark themes.
// ── Top-level convenience aliases ────────────────────────────────────────────────────────────────
/// Workspace `Result<T, StarsightError>` alias.
pub type Result<T> = crateResult;
/// Top-level error enum re-export.
pub use crateStarsightError;
/// Legend placement enum re-exports — `Edge`, `LegendPosition` (with
/// `Auto` / `Inside` / `Outside(Edge)` variants). Used via
/// `Figure::legend_position(...)`. Tracked as Epic L
/// (`starsight-3bp.10.11`).
pub use crate;
// ── plot! macro ──────────────────────────────────────────────────────────────────────────────────
/// One-liner: `plot!(&[1.0, 2.0, 3.0], &[4.0, 5.0, 6.0]).save("out.png").unwrap();`
///
/// With the `polars` feature, the macro grows a `DataFrame` arm:
/// `plot!(df, x = "col_a", y = "col_b")` extracts the named columns from a
/// Polars frame and dispatches the appropriate mark (`LineMark` for numeric
/// x, `BarMark` for categorical x). Add `color = "col_c"` to partition rows
/// by a third column and emit one mark per group with cycled palette
/// colours and per-group legend labels.