Skip to main content

Crate starsight

Crate starsight 

Source
Expand description

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 preludeuse starsight::prelude::*; for the common types.
  2. By categoryuse starsight::marks::LineMark;, use starsight::backends::SkiaBackend;.
  3. By layeruse starsight::components::marks::LineMark; (Latin layer aliases).
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")
}

Re-exports§

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;

Modules§

aesthetics
Re-exports of layer-3 aesthetic-mapping types.
axes
Re-exports of layer-2 axis types.
backends
Re-exports of layer-1 backends.
colormap
Re-exports of the colormap types and built-in colormap constants.
coords
Re-exports of layer-2 coordinate systems.
exports
Re-exports of layer-7 export types.
figures
Re-exports of the high-level Figure and MultiPanelFigure builders.
inferences
Re-exports of layer-5 chart-type inference helpers.
layouts
Re-exports of layer-4 layout types.
legends
Re-exports of legend and colorbar types.
marks
Re-exports of layer-3 marks.
paths
Re-exports of layer-1 path drawing primitives.
prelude
Prelude: a single glob import for the most-used types.
primitives
Re-exports of layer-1 primitive types: colors, geometry, transforms.
renders
Re-exports of layer-5 chrome rendering helpers.
scales
Re-exports of layer-2 scales.
sources
Re-exports of layer-5 data-source types.
statistics
Re-exports of layer-3 statistical transforms.
theme
Re-exports of theming types and the default light/dark themes.
ticks
Re-exports of layer-2 tick algorithms.

Macros§

plot
One-liner: plot!(&[1.0, 2.0, 3.0], &[4.0, 5.0, 6.0]).save("out.png").unwrap();

Enums§

Edge
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). Which edge of the plot area to reserve for LegendPosition::Outside.
LegendPosition
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). Where the legend sits relative to the plot area.
StarsightError
Top-level error enum re-export. All failure modes of the rendering and data pipeline.

Type Aliases§

Result
Workspace Result<T, StarsightError> alias.