Skip to main content

Crate cjc_vizor

Crate cjc_vizor 

Source
Expand description

Vizor — grammar-of-graphics data visualization library for CJC.

Vizor is the first CJC library, validating the library architecture. It provides a declarative, grammar-of-graphics-style API for creating plots with deterministic rendering to SVG and BMP (and optionally PNG).

§Architecture

PlotSpec → Layout → Scene → SVG / BMP / PNG
           (coord    (flat     (serializer)
            mapping)  primitives)

§Usage from CJC

import vizor

let p = vizor_plot([1.0, 2.0, 3.0], [4.0, 5.0, 6.0])
    .geom_point()
    .title("My Plot")
    .xlab("X").ylab("Y")

p.save("plot.svg")

Re-exports§

pub use annotation::Annotation;
pub use color::Color;
pub use render::build_scene;
pub use scene::Scene;
pub use spec::PlotSpec;
pub use svg::render_svg;
pub use bmp::render_bmp;
pub use theme::Theme;

Modules§

annotation
Semantic annotation types for data visualization.
bmp
BMP raster writer — uncompressed BMP format.
color
Color types, hex parsing, and default categorical palette.
dispatch
Vizor dispatch — maps CJC language calls to the concrete Vizor API.
docs
Builtin documentation metadata for IDE/LSP integration.
facet
Faceting — multi-panel grid layouts split by a grouping variable.
layout
Layout engine — coordinate mapping, tick generation, axis computation.
legend
Legend rendering — generates legend entries for multi-layer and categorical plots.
png_export
PNG export — behind the png feature flag.
raster
Shared rasterization: scene → pixel buffer.
render
Render pipeline — converts a PlotSpec into a Scene.
scene
Scene graph — flat list of positioned, styled primitives.
spec
Plot specification types — the declarative description of a plot.
stats
Statistical computations for Vizor plot types.
svg
SVG serializer — converts a Scene to SVG string.
text
Fixed-width text measurement policy.
theme
Theme definitions — margins, colors, font sizes, spacing.

Structs§

VizorLibrary
CjcLibrary implementation for Vizor.