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
//! Terminal plotting: a small grammar of marks, honest axes, millions of points.
//!
//! Eight marks ([`Line`], [`Points`], [`Bars`], [`Area`], [`Cells`], [`Range`],
//! [`Rule`], [`Text`]) compose over shared scales into the basic chart catalog;
//! presets like [`line`], [`hist`], [`box_plot`], and [`violin`] are one-line fronts
//! over that grammar. Large series aggregate to the raster before drawing (M4 —
//! pixel-exact for lines), axes use extended-Wilkinson tick placement with
//! exact-decimal labels, and everything renders to a plain `String` — colored for
//! your terminal via [`Frame::detect`], deterministic via [`Frame::plain`].
//!
//! ```
//! use malevich::{Frame, Line, Plot, Rule};
//!
//! let steps: Vec<f64> = (0..100).map(f64::from).collect();
//! let loss: Vec<f64> = steps.iter().map(|s| 4.0 * (-0.05 * s).exp() + 0.4).collect();
//! let chart = Plot::new()
//! .layer(Line::xy(&steps[..], &loss[..]).label("loss"))
//! .layer(Rule::h(0.5).label("target"))
//! .title("training");
//! println!("{}", chart.render(&Frame::plain(60, 14)));
//! ```
//!
//! A plot is a plain value: `Clone + Send + Sync`, no global state, rendering is a
//! pure function of plot and frame. The modules follow the concepts (each defined in
//! the repository's `TERMINOLOGY.md`): [`mark`] for the primitives, [`stat`] for
//! transforms (binning, KDE, rolling windows, downsampling — all mergeable),
//! [`scale`] for ticks and colormaps, [`render`] for the subpixel surface and
//! charsets, [`stream`] for live charts, [`data`] for the ingestion rim.
//!
//! The gallery in `EXAMPLES.md` shows every chart type with its source, and
//! `cargo run --example showcase` renders a colored tour in your terminal.
pub use ;
pub use ;
pub use ;
pub use ;
pub use Scale;
pub use Theme;