Skip to main content

Crate lichtung_plot

Crate lichtung_plot 

Source
Expand description

A strongly typed scientific plotting and SVG rendering library.

Complete immutable theme values and their built-in constructors are available from the crate root:

let _ = lichtung_plot::Theme::publication();

Canvas owns one optional-to-call complete root theme. Unthemed child Plots inherit it, while an explicit Plot theme replaces it locally:

use lichtung_plot::{Canvas, NumericValues, Plot, Theme};

let canvas = Canvas::grid(1, 2)?
    .theme(Theme::nature())
    .panel(0, 0, Plot::scatter(
        NumericValues::new("x", [1.0, 2.0]),
        NumericValues::new("y", [1.0, 2.0]),
    ))?
    .panel(0, 1, Plot::scatter(
        NumericValues::new("x", [1.0, 2.0]),
        NumericValues::new("y", [2.0, 1.0]),
    ).theme(Theme::science()))?;

Its implementation module is private:

ⓘ
use lichtung_plot::theme::Theme;

Decoration rendering is also private:

ⓘ
use lichtung_plot::decorations::title_block::TitleBlock;
ⓘ
use lichtung_plot::layout::Layout;

Alpha inputs are exported from the root; internal targets and preparation stay private:

ⓘ
use lichtung_plot::alpha::AlphaTarget;

Modules§

kind
Plot-family markers and sealed configuration capabilities. Plot-family markers and sealed configuration capabilities.
stats
Display-only statistics (KDE, CI, OLS for fit lines). Display-only statistics submodules.

Structs§

AccentPalette
Independent nonempty mark-accent seeds, always deterministically extendable.
AlphaEncoding
One complete explicit alpha-unit binding for a Plot paint target.
AlphaValues
Owned byte alpha values and their complete immutable mapping declaration.
AnnotationTextRoles
Complete annotation text, independent of mark and axis chrome.
AnnotationTheme
Complete immutable AnnotationTheme appearance component.
Attached
Marker for a significance mark attached to one rendered target.
AxisSpacing
Exact independent axis gaps, resolved from tick-label or axis-title em.
AxisTextRoles
Complete coordinate-axis typography.
AxisTheme
Complete coordinate/cell frame, tick, grid and local spacing appearance.
AxisTick
A single tick on an axis: a data-space position and the string label to render next to it.
BandFillRoles
Complete immutable BandFillRoles appearance component.
BarInput
Closed owned input for an ordinary vertical or horizontal bar plot.
BarPointLayer
A complete strict point layer positioned at prepared ordinary-bar centers.
BarSamples
Raw bar samples with sample-only generated error-bar configuration.
BodyFillRoles
Complete immutable BodyFillRoles appearance component.
BooleanValues
Named nullable Boolean values.
Bootstrap
Percentile-bootstrap resampling specification.
Bounds
Explicit drawable lower and upper bounds.
Canvas
A typed grid of independently configured charts rendered on one canvas.
CategoricalColorMap
Exact caller-owned colors for categorical plot levels.
CategoricalColorScale
One complete categorical selection: an ordered palette or an exact raw-key map.
CategoryLabelSelection
Label eligibility only: categories, ticks, grid lines and marks remain complete.
CategoryMarkGeometry
Complete immutable CategoryMarkGeometry appearance component.
CategoryValues
Named nullable categorical values stored with stable dictionary encoding.
CellAnnotationGeometry
Complete immutable CellAnnotationGeometry appearance component.
CellMarkRoles
Complete immutable CellMarkRoles appearance component.
CoefficientInput
Closed owned input for a model-coefficient plot.
Color
Complete RGBA paint with one opaque RGB identity and one byte alpha.
ColorDomain
Finite exact color limits, including a constant domain.
ColorScales
Complete default qualitative, sequential and diverging mappings of one theme.
ColorStop
An exact semantic gradient offset in zero through one and an opaque color.
CompositionTextRoles
Independent facet, composition, and embedded-prose text roles.
CompositionTheme
Complete owner-local composition, header, facet and root-prose appearance.
ConfidenceInterval
Two-sided confidence-interval configuration.
ConnectorStrokeRoles
Complete immutable ConnectorStrokeRoles appearance component.
ContinuousColorScale
One complete continuous kind, optional gradient and optional exact domain.
ContrastTextRoles
Complete opaque candidates selected before font planning.
CurveStrokeRoles
Complete immutable CurveStrokeRoles appearance component.
DataCoordinate
A raw scientific coordinate. Category and series names are never aliases.
DataFillTheme
Mapped fill alpha and a structural optional outline.
DataLineRoles
Complete immutable DataLineRoles appearance component.
DataLineTheme
Data-colored line with one independent alpha and the closed pattern input.
DataOutlineTheme
Fixed paint or mapped RGB with an independent outline alpha.
DataPosition
A typed scientific point, independent of drawing instructions.
DensityFillRoles
Complete immutable DensityFillRoles appearance component.
DivergingGradient
Complete strictly ordered opaque DivergingGradient with exact zero/one endpoints.
DumbbellEndpoints
Explicit endpoint identities and colors for a dumbbell plot.
ErrorBar
Closed generated error-bar taxonomy for raw bar samples.
EstimateAnnotationGeometry
Complete immutable EstimateAnnotationGeometry appearance component.
FacetCell
One exact panel owned by a faceted significance annotation.
FacetSpec
One complete generic-facet layout and numeric-axis sharing policy.
FacetStripSpacing
Complete nonnegative owner-local FacetStripSpacing relationships.
FillRoles
Complete immutable FillRoles appearance component.
FixedFillTheme
Complete fixed fill paint and an independent structural optional outline.
FontFamily
A literal family identity or one of the three host generic preferences.
FontStack
Nonempty, ordered preferences; original named bytes and duplicates are retained.
FrameSides
Nonempty set of physical coordinate-frame sides.
FrameTheme
Complete frame sides and independent stroke appearance.
GradientLengths
Positive minimum and at-least-minimum preferred continuous-guide lengths.
GuideStyle
Closed visual style for a numeric guide line.
GuideTextRoles
Complete discrete and continuous guide typography.
HeaderSpacing
Complete nonnegative owner-local HeaderSpacing relationships.
HeatmapNullRowAnnotation
Caller-owned annotation for one fully-null Cartesian heatmap row.
HistogramGeometry
Complete supplied density-axis histogram geometry.
HistogramInput
Closed owned source for a histogram.
InteractionStyle
One exact point and connector style owned by an interaction group.
Labels
Immutable presentation rules for labels inferred from data identities.
LegendFrameTheme
Complete guide-container paint, optional independent outline and local corner radius.
LegendSpacing
Complete independent exact guide relationships, resolved against selected guide text em.
LegendTheme
Complete measured guide chrome, independent of guide content or placement policy.
MarkExtentTheme
Complete immutable MarkExtentTheme appearance component.
MarkTheme
Complete immutable MarkTheme appearance component.
NeutralPaintRoles
Complete immutable NeutralPaintRoles appearance component.
NumericCompactRule
An unrounded threshold, exact divisor and literal compact affixes.
NumericCurrency
Literal currency affixes, independent of any exchange or unit conversion.
NumericDomain
Final scientific domain, without CSS geometry or invented logarithmic inverses.
NumericExplanation
Instructions for one common explanation, retaining normal Text replacement.
NumericFactors
Resolved exact factors and literal selected affixes for one member/common set.
NumericField
Minimum scalar width, independent of CSS geometry and numeric precision.
NumericFormat
Immutable scientific numeric presentation with explicitly selected locale.
NumericGrouping
Right-to-left integer grouping with literal separators.
NumericLabels
Owned final callback strings and an optional replacement common explanation.
NumericLocale
A complete immutable numeric locale, selected explicitly per format.
NumericOwner
Semantic producer description, never a kernel/backend handle.
NumericPrefixes
The sole selected SI, compact or exact factor policy.
NumericSetContext
Ordered complete semantic input and nonrecursive built-in helper.
NumericSymbols
Literal signs and rate suffixes for one numeric locale.
NumericUnit
Literal scientific unit text; it never infers conversion from its spelling.
NumericValue
One exact source occurrence in a complete set.
NumericValueContext
One original occurrence, retaining its complete set and helper precision.
NumericValues
Named nullable numeric values stored as immutable native f64 data.
OpaqueColor
Opaque RGB identity; there is no alpha-discarding conversion from Color.
OutlineTheme
Complete independent outline paint and positive CSS width.
Output
Opaque handle to one scene that has already been rendered.
Pairwise
Marker for a pairwise significance bracket between two rendered targets.
PercentileInterval
Central percentile interval configuration for original observations.
Plot
One configured semantic plot backed by immutable Rust-native values.
PlotTextAnnotation
Caller-owned text block anchored inside a chart panel.
PngOptions
PNG export options for rasterizing the canonical SVG scene.
PointLayer
A strict supplemental point layer owned independently from the primary line.
PointOutlineTheme
A point outline owns one exact relationship to the selected point radius.
PointRadii
Complete immutable PointRadii appearance component.
PointRoles
Complete immutable PointRoles appearance component.
PointTheme
Shared point appearance before selecting its final integral radius.
QualitativePalette
Nonempty opaque categorical colors and their explicit capacity policy.
RaincloudGeometry
Complete supplied raincloud geometry in three independently aligned domains.
RaincloudInput
Closed owned source for a raincloud plot.
ReferenceStrokeRoles
Complete immutable ReferenceStrokeRoles appearance component.
RelativeSpacing
Exact nonnegative dimensionless spacing, resolved against its consuming role’s metric.
RootPadding
Complete nonnegative owner-local RootPadding relationships.
RootTextRoles
Independent root and embedded Plot headings.
RootTitleSpacing
Complete nonnegative owner-local RootTitleSpacing relationships.
SequentialGradient
Complete strictly ordered opaque SequentialGradient with exact zero/one endpoints.
SiPrefix
A standard SI prefix, including neutral, deci/centi/deca/hecto and 2022 additions.
Significance
One caller-owned significance annotation with a compile-time placement.
SignificanceGeometry
Complete immutable SignificanceGeometry appearance component.
SignificanceMarkStyle
Independent typography and clearance for exact significance marks.
SizedPointTheme
Complete immutable SizedPointTheme appearance component.
SolidStrokeTheme
Complete solid bracket stroke; its topology has no pattern edit.
SourceRows
Original source-row identities attached once to a plot’s aligned values.
StandardDeviation
Standard-deviation error-bar configuration.
StandardError
Standard-error error-bar configuration.
StrokeRoles
Complete immutable StrokeRoles appearance component.
StrokeTheme
Complete stroke with the renderer’s one closed dash vocabulary.
SummaryStrokeRoles
Complete immutable SummaryStrokeRoles appearance component.
SupplementalPointTheme
Complete immutable SupplementalPointTheme appearance component.
SurfaceTheme
Paints applied to renderer-owned drawing surfaces.
Text
Authored display text with optional complete appearance and layout instructions.
TextAnchor
A point of the complete measured block, independent of its line alignment.
TextBounds
Explicit text-local finite maxima, independent of the parent’s assigned region.
TextCoordinate
One independently qualified coordinate of an authored text reference.
TextEllipsis
An explicit derived-display program; the original source is never replaced.
TextFit
A font-size program, independent of terminal overflow handling.
TextLayout
Optional text layout instructions. Omitted fields retain owner defaults.
TextOffset
One exact represented finite displacement, not a data coordinate.
TextOrientation
A fixed screen angle, projected data direction or ordered tick-angle program.
TextOverflow
Complete-text presentation and its terminal fit action.
TextPanel
Validated prose content for one composed-canvas grid cell.
TextPanelSpacing
Complete nonnegative owner-local TextPanelSpacing relationships.
TextPosition
A semantic reference, separate from the selected point of the text block.
TextRotation
One normalized clockwise screen angle, without decimal quantization.
TextTheme
Complete text appearance for one semantic typography role.
TextVisibility
Explicit text eligibility, independent of scientific ticks and marks.
Theme
Complete immutable appearance, independent of fonts discovered during rendering.
ThemeBuilder
Construction-only working copy of a complete Theme.
TickContext
One immutable, actually assigned numeric-axis view.
TickGeneration
One validated selection for generated numeric tick positions.
TickTheme
Complete tick stroke and positive integral CSS length.
TypographyTheme
One complete retained typography value with all eighteen semantic roles.
ValueShelfSpacing
Complete immutable ValueShelfSpacing appearance component.
WaterfallLabels
Caller-owned labels for waterfall base and terminal annotations.

Enums§

AlphaSemantics
Explicit explanatory semantics carried by immutable AlphaValues.
AxisScale
Numeric scale used by interval-estimate plot families.
AxisValues
Native values accepted by a line plot’s horizontal axis.
BarSpacing
Spacing preset for multiple series within one bar category.
CanvasCategoryLabels
Categorical tick-label policy for composed canvas grids.
CanvasLegendPolicy
Legend policy for a heterogeneous composed canvas.
CategoryOrder
Display ordering for one categorical plot channel.
ContinuousScaleKind
Closed kind of a complete continuous-color selection.
CoordinateAxis
Scientific coordinate axis.
DataAreaCorner
A corner inside one chart’s resolved mark panel.
Error
Error returned by plotting operations.
EstimateStatus
Typed availability of one aligned estimate row.
FacetScales
Numeric-axis sharing policy for generic facet panels.
GenericFontFamily
Closed host-resolved generic font preferences, distinct from literal names.
GuideSpec
Supplemental numeric guide geometry.
GuideTextRole
An actual guide text role, independent of its shared Theme appearance.
HeatmapAnnotations
In-cell value-label policy for heatmaps.
HeatmapLayout
Coordinate layout for a categorical heatmap grid.
HistogramBins
Histogram bin-selection strategy.
HistogramComposite
Optional layers composed on a histogram density axis.
HistogramKde
Density-curve source for an opt-in composite over sample-owned histogram input.
HistogramStat
Histogram vertical-axis normalization.
LabelEndpoints
Full scientific-domain endpoints forced into a categorical label selection.
LegendComposition
Semantic composition of one discrete legend, independently of its appearance.
LegendPolicy
Visibility and placement policy for a plot legend.
LegendPosition
Requested legend placement.
LinePathStyle
Color and legend policy for source-ordered line paths.
LinePattern
Closed connector patterns accepted by interaction styles.
NegativeZero
Whether actual or rounded negative zero retains its minus sign.
NumericAlignment
Placement of field fill around a complete numeric presentation.
NumericFactor
An exact divisor or an automatic common decimal-power request.
NumericGroupRepeat
How a positive grouping-size sequence continues after its last entry.
NumericIdentity
Raw semantic identity, before display aliases.
NumericNotation
Decimal-point and exponent spelling for numeric presentation.
NumericOperand
Exact operand representation, retaining binary64 source bits and power exponents.
NumericPrecision
Exact precision or one uniformly selected precision for a complete numeric set. Construction through NumericFormat validates all bounds.
NumericPromotion
Handling of a rounding carry into the next automatic prefix threshold.
NumericPurpose
Whether a set is an intrinsic preference or a reached actual source.
NumericRadix
Digit alphabet for integer numeric presentation.
NumericRangeOrigin
Scientific domain provenance.
NumericRate
Exact rate scaling, independent of a literal suffix.
NumericRole
Complete numeric consumer, independent of its selected typography.
NumericRounding
Exact rounding at the selected decimal quantum, before numeric emission.
NumericSelection
Whether a scale is chosen separately, for the complete set, or explicitly.
NumericSign
Positive and negative sign presentation.
NumericSymbol
A locale currency or integer-radix affix.
NumericUnitPlacement
Whether unit/factor text repeats or occupies one required owner slot.
PaletteCapacity
Whether categorical seeds are a fixed supply or may be extended deterministically.
PlotKind
Which plot type a crate::Plot will produce.
PngCompression
High-level PNG compression presets.
PngSizing
Mutually exclusive PNG sizing modes.
PointShape
Closed point shapes accepted by interaction styles.
QqLine
Reference-line policy for a normal Q-Q plot.
RawOverlay
Original-observation overlay for boxplots and violin plots.
RegressionBand
Confidence-band policy for a generated simple OLS regression plot.
SignificanceMark
Exact significance text or the p-value used to derive it.
SignificanceTarget
One rendered categorical target for a significance annotation.
StrokePattern
Closed line-stroke patterns accepted by the private backend protocol.
TextAlignment
Physical horizontal alignment within a text owner’s local span.
TextDirection
Base paragraph direction, independent of physical line alignment.
TextElision
Which end of the original source an ellipsis removes.
TextFailure
Terminal action for an actual text-fit miss, never for font/projection errors.
TextFitGrouping
Whether eligible members select separate sizes or one common size.
TextFitPriority
Order complete-content fitting and explicitly permitted abbreviation.
TextOffsetFrame
Coordinate frame for a signed CSS-pixel displacement.
TextOverlap
Whether actual label/annotation ink must avoid its peer owners.
TextRotationMode
How the selected block point relates to a rotation.
TextWeight
Closed text weights used by renderer-owned emphasis.
TextWrapping
Soft-wrap policy; both choices preserve caller-authored mandatory breaks.
TickPositions
Complete source-order positions, without labels or drawing instructions.
TickRequirement
Whether a lattice is fixed or may try complete coarser candidates.
TickSingleton
Position of an exact singleton, in the selected coordinate space.
TickSpace
Coordinate space for generated positions.
TrailingZeros
Fractional trailing-zero handling after numeric rounding.
ValueSort
Direction used to order categories by their prepared rendered value.

Type Aliases§

Result
Result returned by plotting operations.