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
//! Scientific plotting library for bioinformatics, targeting SVG output with optional PNG and PDF backends.
//!
//! # Pipeline
//!
//! ```text
//! plot definition → Layout → Scene (primitives) → backend output
//! ```
//!
//! 1. Build a plot struct using its builder API (e.g. [`plot::scatter::ScatterPlot`]).
//! 2. Wrap it in the [`render::plots::Plot`] enum.
//! 3. Compute axis ranges with [`render::layout::Layout::auto_from_plots`].
//! 4. Pass to a `render_*` function (e.g. [`render::render::render_multiple`]) to get a [`render::render::Scene`].
//! 5. Convert the scene to output with [`backend::svg::SvgBackend`].
//!
//! # Example
//!
//! ```rust
//! use kuva::plot::scatter::ScatterPlot;
//! use kuva::render::plots::Plot;
//! use kuva::render::layout::Layout;
//! use kuva::render::render::render_multiple;
//! use kuva::backend::svg::SvgBackend;
//!
//! let scatter = ScatterPlot::new()
//! .with_data(vec![(1.0_f64, 2.0), (3.0, 4.0)])
//! .with_color("steelblue");
//!
//! let plots = vec![Plot::Scatter(scatter)];
//! let layout = Layout::auto_from_plots(&plots);
//! let scene = render_multiple(plots, layout);
//! let svg = SvgBackend.render_scene(&scene);
//! assert!(svg.contains("<svg"));
//! ```
//!
//! # Feature flags
//!
//! | Feature | Description |
//! |---------|-------------|
//! | `png` | Enables [`PngBackend`] for rasterising SVG scenes via `resvg`. |
//! | `pdf` | Enables [`PdfBackend`] for vector PDF output via `svg2pdf`. |
//! | `cli` | Enables the `kuva` CLI binary (pulls in `clap`). |
//! | `full` | Enables `png` + `pdf`. |
pub use TerminalBackend;
pub use PngBackend;
pub use PdfBackend;
pub use Theme;
pub use Palette;
pub use TickFormat;
pub use render_twin_y;
pub use render_sankey;
pub use render_phylo_tree;
pub use render_synteny;
pub use ;