pub struct Plot<K = Any>where
K: Marker,{ /* private fields */ }Expand description
One configured semantic plot backed by immutable Rust-native values.
K is a zero-sized plot-family marker from crate::kind. Omitting it
means crate::kind::Any, the erased form used by heterogeneous storage.
Family-specific methods are available only through exact-marker inherent
implementations or a corresponding sealed capability.
Without a sizing call, dimensions derive from content. Self::width fixes
width with content-derived height; Self::size fixes both dimensions.
The latest sizing call replaces the complete request. Final dimensions are
inspected on crate::Output, after the scene has been frozen.
use lichtung_plot::{kind, Plot};
fn removed_width_getter(plot: &Plot<kind::Scatter>) {
let _ = plot.width();
}use lichtung_plot::{kind, Plot};
fn removed_height_getter(plot: &Plot<kind::Scatter>) {
let _ = plot.height();
}use lichtung_plot::{kind, Plot};
fn removed_identity_alias(plot: &Plot<kind::Scatter>) {
let _ = plot.plot_kind();
}use lichtung_plot::{kind, Plot};
fn internal_family_options(plot: &Plot<kind::Histogram>) {
let _ = plot.histogram_bins_spec();
}use lichtung_plot::{kind, Plot};
fn internal_renderer_configuration(plot: &Plot<kind::Scatter>) {
let _ = plot.x_axis_spec();
}use lichtung_plot::{kind, Plot};
fn internal_palette(plot: &Plot<kind::Scatter>) {
let _ = plot.palette();
}use lichtung_plot::{kind, Plot};
fn internal_layout(plot: &Plot<kind::Scatter>) {
let _ = plot.canvas_layout();
}use lichtung_plot::{NumericValues, Plot};
let plot = Plot::scatter(
NumericValues::new("x", [1.0]),
NumericValues::new("y", [2.0]),
);
let _ = plot.x_tick_count(3);use lichtung_plot::{NumericValues, Plot};
let plot = Plot::scatter(
NumericValues::new("x", [1.0]),
NumericValues::new("y", [2.0]),
);
let _ = plot.y_tick_count(3);use lichtung_plot::{HistogramBins, NumericValues, Plot};
let plot = Plot::scatter(
NumericValues::new("x", [1.0]),
NumericValues::new("y", [2.0]),
);
let _ = plot.bins(HistogramBins::Count(4));use lichtung_plot::{HistogramBins, HistogramInput, NumericValues, Plot};
let plot = Plot::histogram(HistogramInput::samples(
NumericValues::new("value", [1.0]),
)).erase();
let _ = plot.bins(HistogramBins::Count(4));use lichtung_plot::{BarInput, CategoryValues, ContinuousColorScale, NumericValues, Plot};
let plot = Plot::bar(
CategoryValues::new("category", ["a"]).unwrap(),
BarInput::estimates(NumericValues::new("value", [1.0])),
);
let _ = plot.continuous_color_scale(ContinuousColorScale::sequential(None, None).unwrap());use lichtung_plot::{HistogramInput, NumericValues, Plot, RawOverlay};
let plot = Plot::histogram(HistogramInput::samples(NumericValues::new("value", [1.0])));
let _ = plot.raw_overlay(RawOverlay::Points);use lichtung_plot::{Bounds, NumericValues, Plot};
let plot = Plot::regression(
NumericValues::new("x", [1.0]),
NumericValues::new("y", [2.0]),
);
let bounds = Bounds::new(
NumericValues::new("lower", [0.0]),
NumericValues::new("upper", [3.0]),
);
let _ = plot.band(bounds);use lichtung_plot::{NumericValues, Plot, Significance, SignificanceMark};
let plot = Plot::scatter(
NumericValues::new("x", [1.0]),
NumericValues::new("y", [2.0]),
);
let _ = plot.significance([
Significance::at("a", SignificanceMark::OneStar),
]);use lichtung_plot::{NumericValues, Plot, Significance, SignificanceMark};
let plot = Plot::scatter(
NumericValues::new("x", [1.0]),
NumericValues::new("y", [2.0]),
);
let _ = plot.significance([
Significance::between("a", "b", SignificanceMark::OneStar),
]);use lichtung_plot::{CategoryValues, NumericValues, Plot, Significance, SignificanceMark};
let plot = Plot::boxplot(
CategoryValues::new("category", ["a"]).unwrap(),
NumericValues::new("value", [1.0]),
);
let _ = plot.significance([
Significance::at("a", SignificanceMark::OneStar),
]);use lichtung_plot::{CategoryValues, CoefficientInput, NumericValues, Plot, Significance, SignificanceMark};
let plot = Plot::coefficient(
CategoryValues::new("term", ["a", "b"]).unwrap(),
CoefficientInput::estimates(NumericValues::new("estimate", [1.0, 2.0])),
);
let _ = plot.significance([
Significance::between("a", "b", SignificanceMark::OneStar),
]);use lichtung_plot::{CategoryValues, CoefficientInput, NumericValues, Plot};
struct Wrapped(CoefficientInput);
impl Into<CoefficientInput> for Wrapped {
fn into(self) -> CoefficientInput { self.0 }
}
let _ = Plot::coefficient(
CategoryValues::new("term", ["a"]).unwrap(),
Wrapped(CoefficientInput::estimates(NumericValues::new("estimate", [1.0]))),
);use lichtung_plot::{Bounds, CategoryValues, NumericValues, Plot};
let plot = Plot::trajectory(
NumericValues::new("x", [1.0, 2.0]),
NumericValues::new("y", [2.0, 3.0]),
CategoryValues::new("subject", ["a", "a"]).unwrap(),
);
let _ = plot.band(Bounds::new(
NumericValues::new("lower", [1.0, 2.0]),
NumericValues::new("upper", [3.0, 4.0]),
));use lichtung_plot::{CategoryValues, NumericValues, Plot};
let plot = Plot::trajectory(
NumericValues::new("x", [1.0, 2.0]),
NumericValues::new("y", [2.0, 3.0]),
CategoryValues::new("subject", ["a", "a"]).unwrap(),
);
let _ = plot.markers(false);use lichtung_plot::{CategoryValues, NumericValues, Plot};
let plot = Plot::trajectory(
NumericValues::new("x", [1.0, 2.0]),
NumericValues::new("y", [2.0, 3.0]),
CategoryValues::new("subject", ["a", "a"]).unwrap(),
);
let _ = plot.group(CategoryValues::new("replacement", ["b", "b"]).unwrap());use lichtung_plot::{Bounds, CategoryValues, NumericValues, Plot};
let plot = Plot::line_path(
NumericValues::new("x", [1.0, 2.0]),
NumericValues::new("y", [2.0, 3.0]),
CategoryValues::new("path", ["a", "a"]).unwrap(),
);
let _ = plot.band(Bounds::new(
NumericValues::new("lower", [1.0, 2.0]),
NumericValues::new("upper", [3.0, 4.0]),
));use lichtung_plot::{CategoryValues, NumericValues, Plot, PointLayer};
let plot = Plot::line_path(
NumericValues::new("x", [1.0, 2.0]),
NumericValues::new("y", [2.0, 3.0]),
CategoryValues::new("path", ["a", "a"]).unwrap(),
);
let layer = PointLayer::new(
NumericValues::new("x", [1.5]),
NumericValues::new("y", [2.5]),
);
let _ = plot.point_layer(layer);use lichtung_plot::{CategoryValues, NumericValues, Plot};
let plot = Plot::line_path(
NumericValues::new("x", [1.0, 2.0]),
NumericValues::new("y", [2.0, 3.0]),
CategoryValues::new("path", ["a", "a"]).unwrap(),
);
let _ = plot.group(CategoryValues::new("replacement", ["b", "b"]).unwrap());use lichtung_plot::{Bounds, CategoryValues, NumericValues, Plot};
let plot = Plot::interaction(
CategoryValues::new("condition", ["before", "after"]).unwrap(),
NumericValues::new("estimate", [1.0, 2.0]),
CategoryValues::new("group", ["a", "a"]).unwrap(),
Bounds::new(
NumericValues::new("lower", [0.5, 1.5]),
NumericValues::new("upper", [1.5, 2.5]),
),
);
let _ = plot.group(CategoryValues::new("replacement", ["b", "b"]).unwrap());use lichtung_plot::{LinePathStyle, NumericValues, Plot};
let plot = Plot::line(
NumericValues::new("x", [1.0, 2.0]),
NumericValues::new("y", [2.0, 3.0]),
);
let _ = plot.style(LinePathStyle::Hue);use lichtung_plot::{CategoryValues, NumericValues, Plot};
let _ = Plot::line(
CategoryValues::new("x", ["before", "after"]).unwrap(),
NumericValues::new("y", [1.0, 2.0]),
);use lichtung_plot::{CategoryValues, NumericValues, Plot};
let _ = Plot::dumbbell(
CategoryValues::new("category", ["a"]).unwrap(),
NumericValues::new("left", [1.0]),
NumericValues::new("right", [2.0]),
);use lichtung_plot::{BarSpacing, CategoryValues, NumericValues, Plot};
let plot = Plot::stacked_bar(
CategoryValues::new("category", ["a"]).unwrap(),
NumericValues::new("value", [1.0]),
CategoryValues::new("group", ["g"]).unwrap(),
);
let _ = plot.spacing(BarSpacing::Compact);use lichtung_plot::{CategoryValues, NumericValues, Plot};
let plot = Plot::stacked_bar(
CategoryValues::new("category", ["a"]).unwrap(),
NumericValues::new("value", [1.0]),
CategoryValues::new("series", ["g"]).unwrap(),
);
let _ = plot.series(CategoryValues::new("replacement", ["h"]).unwrap());use lichtung_plot::{CategoryValues, NumericValues, Plot};
let plot = Plot::stacked_horizontal_bar(
CategoryValues::new("category", ["a"]).unwrap(),
NumericValues::new("value", [1.0]),
CategoryValues::new("series", ["g"]).unwrap(),
);
let _ = plot.series(CategoryValues::new("replacement", ["h"]).unwrap());use lichtung_plot::{BarInput, CategoryValues, NumericValues, Plot};
let plot = Plot::bar(
CategoryValues::new("category", ["a"]).unwrap(),
BarInput::estimates(NumericValues::new("value", [1.0])),
);
let _ = plot.group(CategoryValues::new("series", ["g"]).unwrap());use lichtung_plot::{CategoryValues, NumericValues, Plot};
let plot = Plot::horizontal_bar(
CategoryValues::new("category", ["a"]).unwrap(),
lichtung_plot::BarInput::estimates(NumericValues::new("value", [1.0])),
);
let _ = plot.hue(CategoryValues::new("series", ["g"]).unwrap());use lichtung_plot::{CategoryValues, NumericValues, Plot};
let plot = Plot::boxplot(
CategoryValues::new("category", ["a"]).unwrap(),
NumericValues::new("value", [1.0]),
);
let _ = plot.group(CategoryValues::new("series", ["g"]).unwrap());use lichtung_plot::{CategoryValues, NumericValues, Plot};
let plot = Plot::violin(
CategoryValues::new("category", ["a", "a"]).unwrap(),
NumericValues::new("value", [1.0, 2.0]),
);
let _ = plot.hue(CategoryValues::new("series", ["g", "g"]).unwrap());use lichtung_plot::{CategoryValues, NumericValues, Plot, RaincloudInput};
let plot = Plot::raincloud(RaincloudInput::samples(
CategoryValues::new("category", ["a", "a"]).unwrap(),
NumericValues::new("value", [1.0, 2.0]),
));
let _ = plot.hue(CategoryValues::new("series", ["g", "g"]).unwrap());use lichtung_plot::{CategoryValues, NumericValues, Plot};
let plot = Plot::line(
NumericValues::new("x", [1.0, 2.0]),
NumericValues::new("y", [2.0, 3.0]),
);
let _ = plot.series(CategoryValues::new("series", ["g", "g"]).unwrap());use lichtung_plot::{CategoryValues, NumericValues, Plot};
let plot = Plot::heatmap(
CategoryValues::new("x", ["a"]).unwrap(),
CategoryValues::new("y", ["b"]).unwrap(),
NumericValues::new("fill", [1.0]),
);
let _ = plot.color(NumericValues::new("replacement", [2.0]));use lichtung_plot::{CategoryValues, NumericValues, Plot};
let plot = Plot::beeswarm(
CategoryValues::new("category", ["a"]).unwrap(),
NumericValues::new("value", [1.0]),
NumericValues::new("color", [2.0]),
);
let _ = plot.color(NumericValues::new("replacement", [3.0]));use lichtung_plot::{CategoryValues, FacetSpec, NumericValues, Plot};
let plot = Plot::matrix(vec![
NumericValues::new("x", [1.0]),
NumericValues::new("y", [2.0]),
]);
let _ = plot.facet(FacetSpec::column(
CategoryValues::new("panel", ["a"]).unwrap(),
));use lichtung_plot::{CategoryValues, FacetSpec, NumericValues, Plot};
let plot = Plot::marginal(
NumericValues::new("x", [1.0]),
NumericValues::new("y", [2.0]),
);
let _ = plot.facet(FacetSpec::column(
CategoryValues::new("panel", ["a"]).unwrap(),
));Implementations§
Source§impl<K> Plot<K>where
K: Marker,
impl<K> Plot<K>where
K: Marker,
Sourcepub fn point_alpha(self, alpha: AlphaEncoding) -> Plot<K>where
K: PointAlpha,
pub fn point_alpha(self, alpha: AlphaEncoding) -> Plot<K>where
K: PointAlpha,
Replace point-fill alpha using original observations or explicit Single.
Outlines and supplemental layers remain independently owned. Repeated
calls replace the complete target; AlphaEncoding::theme resets it.
Resolve normal RGB/role/exact paint first, then replace alpha, never multiply.
Declared mappings add a common-guide section; arbitrary bytes do not.
use lichtung_plot::{AlphaEncoding, AlphaValues, NumericValues, Plot};
let plot = Plot::scatter(NumericValues::new("x", [0.0, 1.0]),
NumericValues::new("y", [1.0, 0.0]))
.point_alpha(AlphaEncoding::observations(AlphaValues::linear(
NumericValues::new("confidence", [0.2, 0.8]), (0.0, 1.0), (0, 255),
)?));use lichtung_plot::{AlphaEncoding, Plot};
fn erased(plot: Plot) { let _ = plot.point_alpha(AlphaEncoding::theme()); }use lichtung_plot::{kind, AlphaEncoding, Plot};
fn unsupported(plot: Plot<kind::Density>) { let _ = plot.point_alpha(AlphaEncoding::theme()); }use lichtung_plot::{kind, AlphaEncoding, Plot};
fn unsupported(plot: Plot<kind::Heatmap>, alpha: AlphaEncoding) { let _ = plot.point_alpha(alpha); }use lichtung_plot::{kind, AlphaEncoding, Plot};
fn unsupported(plot: Plot<kind::Bar>, alpha: AlphaEncoding) { let _ = plot.point_alpha(alpha); }use lichtung_plot::{kind, AlphaEncoding, Plot};
fn unsupported(plot: Plot<kind::Waterfall>, alpha: AlphaEncoding) { let _ = plot.point_alpha(alpha); }Sourcepub fn line_alpha(self, alpha: AlphaEncoding) -> Plot<K>where
K: LineAlpha,
pub fn line_alpha(self, alpha: AlphaEncoding) -> Plot<K>where
K: LineAlpha,
Replace admitted scientific-stroke alpha using explicit actual-unit values.
Qq/Regression/optional Histogram curves use Single; estimates and Dumbbell use original records; paths/Density/Interaction use actual series; categorical summaries use category/positioned-series aggregates. Unlisted references, points, fills, outlines and supplemental layers retain their own paints. Absent optional components still validate binding kind/schema before fonts.
use lichtung_plot::{AlphaEncoding, Plot};
fn erased(plot: Plot) { let _ = plot.line_alpha(AlphaEncoding::theme()); }use lichtung_plot::{kind, AlphaEncoding, Plot};
fn unsupported(plot: Plot<kind::Scatter>) { let _ = plot.line_alpha(AlphaEncoding::theme()); }use lichtung_plot::{kind, AlphaEncoding, Plot};
fn unsupported(plot: Plot<kind::StackedBar>, alpha: AlphaEncoding) { let _ = plot.line_alpha(alpha); }use lichtung_plot::{kind, AlphaEncoding, Plot};
fn unsupported(plot: Plot<kind::Marginal>, alpha: AlphaEncoding) { let _ = plot.line_alpha(alpha); }Sourcepub fn fill_alpha(self, alpha: AlphaEncoding) -> Plot<K>where
K: FillAlpha,
pub fn fill_alpha(self, alpha: AlphaEncoding) -> Plot<K>where
K: FillAlpha,
Replace admitted scientific area/body/cell fill alpha, independently of outlines.
Histogram uses exact bins; Heatmap/Waterfall use original records; Line and
Density/native densities use actual series; categorical bodies use actual
aggregates; Regression bands use Single. Zero preserves scientific members.
Normal RGB/role/exact paint resolves before alpha replacement. Repeated calls
replace only this complete target; AlphaEncoding::theme resets it.
use lichtung_plot::{AlphaEncoding, Plot};
fn erased(plot: Plot) { let _ = plot.fill_alpha(AlphaEncoding::theme()); }use lichtung_plot::{kind, AlphaEncoding, Plot};
fn unsupported(plot: Plot<kind::Trajectory>) { let _ = plot.fill_alpha(AlphaEncoding::theme()); }use lichtung_plot::{kind, AlphaEncoding, Plot};
fn unsupported(plot: Plot<kind::Scatter>, alpha: AlphaEncoding) { let _ = plot.fill_alpha(alpha); }use lichtung_plot::{kind, AlphaEncoding, Plot};
fn unsupported(plot: Plot<kind::Interaction>, alpha: AlphaEncoding) { let _ = plot.fill_alpha(alpha); }use lichtung_plot::{kind, AlphaEncoding, Plot};
fn unsupported(plot: Plot<kind::Beeswarm>, alpha: AlphaEncoding) { let _ = plot.fill_alpha(alpha); }Source§impl<K> Plot<K>where
K: Marker,
impl<K> Plot<K>where
K: Marker,
Sourcepub fn source_rows(self, source_rows: SourceRows) -> Plot<K>where
K: SourceRows,
pub fn source_rows(self, source_rows: SourceRows) -> Plot<K>where
K: SourceRows,
Set original source-row identities aligned one-to-one with the chart data.
Sourcepub fn hue(self, values: CategoryValues) -> Plot<K>where
K: Hue,
pub fn hue(self, values: CategoryValues) -> Plot<K>where
K: Hue,
Set categorical color identity independently of graphical grouping.
Sourcepub fn group(self, values: CategoryValues) -> Plot<K>where
K: Group,
pub fn group(self, values: CategoryValues) -> Plot<K>where
K: Group,
Set the graphical-group column used to partition collective marks.
Sourcepub fn series(self, values: CategoryValues) -> Plot<K>where
K: Series,
pub fn series(self, values: CategoryValues) -> Plot<K>where
K: Series,
Set one positioned categorical series that owns dodge, color, legend, and significance identity where supported.
Sourcepub fn color_label(self, label: impl Into<Text>) -> Plot<K>where
K: ContinuousColor,
pub fn color_label(self, label: impl Into<Text>) -> Plot<K>where
K: ContinuousColor,
Set the title shown beside a continuous color scale. Content-only replacement preserves earlier Text instructions. Shared guides require equal complete title requests, including exact style and layout presence.
Sourcepub fn color_label_format(self, format: NumericFormat) -> Plot<K>where
K: ContinuousColor,
pub fn color_label_format(self, format: NumericFormat) -> Plot<K>where
K: ContinuousColor,
Replace numeric presentation for this Plot’s continuous color guide. Shared Canvas guides require identical complete effective formats before fonts.
use lichtung_plot::{kind, NumericFormat, Plot};
fn unsupported(plot: Plot<kind::Scatter>, format: NumericFormat) {
let _ = plot.color_label_format(format);
}Sourcepub fn heatmap_null_row_annotation(
self,
annotation: HeatmapNullRowAnnotation,
) -> Plot<K>where
K: HeatmapOptions,
pub fn heatmap_null_row_annotation(
self,
annotation: HeatmapNullRowAnnotation,
) -> Plot<K>where
K: HeatmapOptions,
Add caller-owned wrapped text for one fully-null Cartesian heatmap row.
Sourcepub fn heatmap_highlight(self, values: BooleanValues) -> Plot<K>where
K: HeatmapOptions,
pub fn heatmap_highlight(self, values: BooleanValues) -> Plot<K>where
K: HeatmapOptions,
Set a strict Boolean column whose true heatmap cells receive a prominent border.
Sourcepub fn estimate_labels(self, format: NumericFormat) -> Plot<K>where
K: CoefficientOptions,
pub fn estimate_labels(self, format: NumericFormat) -> Plot<K>where
K: CoefficientOptions,
Draw numeric labels beside point-only Coefficient estimates. One precision is selected from every available prepared estimate in the panel.
use lichtung_plot::{kind, NumericFormat, Plot};
fn unsupported(plot: Plot<kind::Forest>, format: NumericFormat) {
let _ = plot.estimate_labels(format);
}Sourcepub const fn significance_mark_style(
self,
style: SignificanceMarkStyle,
) -> Plot<K>where
K: SignificanceStyle,
pub const fn significance_mark_style(
self,
style: SignificanceMarkStyle,
) -> Plot<K>where
K: SignificanceStyle,
Configure significance typography independently of axis text.
Sourcepub fn title(self, title: impl Into<Text>) -> Plot<K>
pub fn title(self, title: impl Into<Text>) -> Plot<K>
Set the chart title.
Plain strings replace content while retaining existing appearance and layout instructions. A supplied Text’s present style or whole layout replaces that instruction; an explicit default layout resets it to owner defaults.
Sourcepub fn subtitle(self, subtitle: impl Into<Text>) -> Plot<K>
pub fn subtitle(self, subtitle: impl Into<Text>) -> Plot<K>
Set the chart subtitle.
Content and instruction replacement follow Self::title.
Sourcepub const fn title_alignment(self, alignment: TextAlignment) -> Plot<K>
pub const fn title_alignment(self, alignment: TextAlignment) -> Plot<K>
Align this Plot’s title and each of its lines to a physical edge or center.
Overrides the Canvas panel default and this Plot’s complete theme. Repeated calls replace only this instruction; theme attachment order is independent. Start and End are physical left and right after the owning content insets.
use lichtung_plot::{NumericValues, Plot, Theme, TextAlignment};
let plot = Plot::scatter(
NumericValues::new("x", [1.0, 2.0]),
NumericValues::new("y", [2.0, 1.0]),
).title("Title").subtitle("Independent subtitle")
.title_alignment(TextAlignment::End)
.subtitle_alignment(TextAlignment::Start)
.theme(Theme::nature());Sourcepub const fn subtitle_alignment(self, alignment: TextAlignment) -> Plot<K>
pub const fn subtitle_alignment(self, alignment: TextAlignment) -> Plot<K>
Align this Plot’s subtitle independently of its title.
Overrides the Canvas panel subtitle default, then the optional theme subtitle alignment, then the final effective title alignment. Omitting this call contributes no instruction; it does not bypass those lower owners.
Sourcepub fn caption(self, caption: impl Into<Text>) -> Plot<K>
pub fn caption(self, caption: impl Into<Text>) -> Plot<K>
Set the chart caption.
Content and instruction replacement follow Self::title.
Sourcepub fn x_label(self, label: impl Into<Text>) -> Plot<K>
pub fn x_label(self, label: impl Into<Text>) -> Plot<K>
Set the x-axis label.
Local style and line alignment are independent of the y title. Replacement
follows Self::title, preserving prior instructions when omitted.
Sourcepub fn y_label(self, label: impl Into<Text>) -> Plot<K>
pub fn y_label(self, label: impl Into<Text>) -> Plot<K>
Set the y-axis label.
Local line alignment applies before the existing vertical title transform.
Content and instruction replacement follow Self::title.
Sourcepub fn labels(self, labels: Labels) -> Plot<K>
pub fn labels(self, labels: Labels) -> Plot<K>
Set presentation rules for every label inferred from data identities.
Sourcepub fn x_category_labels(self, value: CategoryLabelSelection) -> Plot<K>where
K: CategoricalX,
pub fn x_category_labels(self, value: CategoryLabelSelection) -> Plot<K>where
K: CategoricalX,
Select eligible x category labels without removing categories or ticks.
use lichtung_plot::{CategoryLabelSelection, NumericValues, Plot};
let _ = Plot::scatter(NumericValues::new("x",[1.0]),NumericValues::new("y",[1.0]))
.x_category_labels(CategoryLabelSelection::all());Sourcepub fn y_category_labels(self, value: CategoryLabelSelection) -> Plot<K>where
K: CategoricalY,
pub fn y_category_labels(self, value: CategoryLabelSelection) -> Plot<K>where
K: CategoricalY,
Select eligible y category labels without removing categories or ticks.
Sourcepub fn x_limits(self, min: f64, max: f64) -> Plot<K>where
K: NumericX,
pub fn x_limits(self, min: f64, max: f64) -> Plot<K>where
K: NumericX,
Set explicit x-axis limits.
Sourcepub fn y_limits(self, min: f64, max: f64) -> Plot<K>where
K: NumericY,
pub fn y_limits(self, min: f64, max: f64) -> Plot<K>where
K: NumericY,
Set explicit y-axis limits.
Sourcepub fn x_ticks(self, ticks: Vec<AxisTick>) -> Plot<K>where
K: NumericX,
pub fn x_ticks(self, ticks: Vec<AxisTick>) -> Plot<K>where
K: NumericX,
Replace automatic x-axis ticks with caller-labeled numeric positions.
Sourcepub fn y_ticks(self, ticks: Vec<AxisTick>) -> Plot<K>where
K: NumericY,
pub fn y_ticks(self, ticks: Vec<AxisTick>) -> Plot<K>where
K: NumericY,
Replace automatic y-axis ticks with caller-labeled numeric positions.
Sourcepub fn x_tick_generation(self, generation: TickGeneration) -> Plot<K>where
K: NumericX,
pub fn x_tick_generation(self, generation: TickGeneration) -> Plot<K>where
K: NumericX,
Replace the complete generated x-tick selection.
Exact Self::x_ticks take precedence in either setter order, independently
of generated count limits. Targets allow nice-step deviation; maxima bound
complete in-domain sources, including endpoints. Automatic resets a previous
interval or count. The actual axis must be numeric; an interval must also
match its linear/logarithmic scale. Mismatches reject before fonts.
use lichtung_plot::{NumericValues, Plot, TickGeneration};
let plot = Plot::scatter(NumericValues::new("x", [0.0, 10.0]),
NumericValues::new("y", [0.0, 4.0]))
.x_tick_generation(TickGeneration::target(5)?)
.y_tick_generation(TickGeneration::maximum(4)?)
.x_tick_generation(TickGeneration::automatic());use lichtung_plot::{kind, Plot, TickGeneration};
fn categorical(plot: Plot<kind::Bar>, generation: TickGeneration) {
let _ = plot.x_tick_generation(generation);
}use lichtung_plot::{Plot, TickGeneration};
fn erased(plot: Plot, generation: TickGeneration) {
let _ = plot.x_tick_generation(generation);
}use lichtung_plot::{kind, Plot, TickGeneration};
fn matrix(plot: Plot<kind::Matrix>, generation: TickGeneration) {
let _ = plot.x_tick_generation(generation);
}use lichtung_plot::{kind, Plot, TickGeneration};
fn heatmap(plot: Plot<kind::Heatmap>, generation: TickGeneration) {
let _ = plot.x_tick_generation(generation);
}Sourcepub fn y_tick_generation(self, generation: TickGeneration) -> Plot<K>where
K: NumericY,
pub fn y_tick_generation(self, generation: TickGeneration) -> Plot<K>where
K: NumericY,
Replace the complete generated y-tick selection, independently of x.
Exact Self::y_ticks take precedence in either setter order. Only the
existing sealed numeric-y families admit this instruction. Automatic resets
any previous interval or count; actual categorical axes reject other choices.
use lichtung_plot::{kind, Plot, TickGeneration};
fn categorical(plot: Plot<kind::Beeswarm>, generation: TickGeneration) {
let _ = plot.y_tick_generation(generation);
}use lichtung_plot::{Plot, TickGeneration};
fn erased(plot: Plot, generation: TickGeneration) {
let _ = plot.y_tick_generation(generation);
}use lichtung_plot::{kind, Plot, TickGeneration};
fn matrix(plot: Plot<kind::Matrix>, generation: TickGeneration) {
let _ = plot.y_tick_generation(generation);
}use lichtung_plot::{kind, Plot, TickGeneration};
fn heatmap(plot: Plot<kind::Heatmap>, generation: TickGeneration) {
let _ = plot.y_tick_generation(generation);
}Sourcepub fn x_tick_format(self, format: NumericFormat) -> Plot<K>where
K: NumericX,
pub fn x_tick_format(self, format: NumericFormat) -> Plot<K>where
K: NumericX,
Replace generated numeric x-tick presentation; exact tick text takes precedence. Forest Log10 ticks format mathematical powers, retaining exponent-space positions. An actual categorical axis rejects this instruction before fonts.
use lichtung_plot::{kind, NumericFormat, Plot};
fn unsupported(plot: Plot<kind::Matrix>, format: NumericFormat) {
let _ = plot.x_tick_format(format);
}Sourcepub fn y_tick_format(self, format: NumericFormat) -> Plot<K>where
K: NumericY,
pub fn y_tick_format(self, format: NumericFormat) -> Plot<K>where
K: NumericY,
Replace generated numeric y-tick presentation; exact tick text takes precedence. This changes displayed numbers without changing scientific coordinates.
use lichtung_plot::{kind, NumericFormat, Plot};
fn unsupported(plot: Plot<kind::Waterfall>, format: NumericFormat) {
let _ = plot.y_tick_format(format);
}Sourcepub fn guide(self, guide: GuideSpec) -> Plot<K>where
K: Guides,
pub fn guide(self, guide: GuideSpec) -> Plot<K>where
K: Guides,
Append a numeric guide rendered in data space.
Sourcepub fn category_order(self, order: impl Into<CategoryOrder>) -> Plot<K>where
K: CategoryOrder,
pub fn category_order(self, order: impl Into<CategoryOrder>) -> Plot<K>where
K: CategoryOrder,
Set the primary categorical display order.
Passing crate::ValueSort selects value-derived ordering after the
supported plot family has prepared one scalar value per category. This
option is supported by bar families and point-interval plots; heatmaps
use Self::x_category_order and Self::y_category_order.
Sourcepub fn x_category_order(self, order: impl Into<CategoryOrder>) -> Plot<K>where
K: HeatmapOptions,
pub fn x_category_order(self, order: impl Into<CategoryOrder>) -> Plot<K>where
K: HeatmapOptions,
Set the horizontal categorical order for a heatmap.
Heatmap axes accept observed or explicit ordering. Value-derived ordering is ambiguous because one axis category owns multiple cells.
Sourcepub fn y_category_order(self, order: impl Into<CategoryOrder>) -> Plot<K>where
K: HeatmapOptions,
pub fn y_category_order(self, order: impl Into<CategoryOrder>) -> Plot<K>where
K: HeatmapOptions,
Set the vertical categorical order for a heatmap.
Heatmap axes accept observed or explicit ordering. Value-derived ordering is ambiguous because one axis category owns multiple cells.
Sourcepub fn color_by_sign(self) -> Plot<K>where
K: SignedBars,
pub fn color_by_sign(self) -> Plot<K>where
K: SignedBars,
Color positive and negative bars with distinct theme colors.
Sourcepub fn zero_line(self) -> Plot<K>where
K: ZeroLine,
pub fn zero_line(self) -> Plot<K>where
K: ZeroLine,
Draw a reference line at zero on the continuous axis.
Sourcepub fn estimate_status(
self,
statuses: impl IntoIterator<Item = EstimateStatus>,
) -> Plot<K>where
K: EstimateStatus,
pub fn estimate_status(
self,
statuses: impl IntoIterator<Item = EstimateStatus>,
) -> Plot<K>where
K: EstimateStatus,
Set one typed availability value per aligned estimate row.
Sourcepub fn markers(self, visible: bool) -> Plot<K>where
K: Markers,
pub fn markers(self, visible: bool) -> Plot<K>where
K: Markers,
Set whether line-like plot families draw markers at estimates.
Sourcepub fn categorical_color_scale(self, scale: CategoricalColorScale) -> Plot<K>where
K: CategoricalScale,
pub fn categorical_color_scale(self, scale: CategoricalColorScale) -> Plot<K>where
K: CategoricalScale,
Replace the complete categorical palette/map selection for active raw identities.
The retired map-only setter is unavailable:
use lichtung_plot::{kind, CategoricalColorScale, Plot};
fn old_setter(plot: Plot<kind::Scatter>, scale: CategoricalColorScale) {
let _ = plot.categorical_colors(scale);
}This attachment is not an accent-only or erased-family capability:
use lichtung_plot::{kind, CategoricalColorScale, Plot};
fn wrong_family(plot: Plot<kind::Regression>, scale: CategoricalColorScale) {
let _ = plot.categorical_color_scale(scale);
}use lichtung_plot::{CategoricalColorScale, Plot};
fn erased(plot: Plot, scale: CategoricalColorScale) {
let _ = plot.categorical_color_scale(scale);
}Sourcepub fn continuous_color_scale(self, scale: ContinuousColorScale) -> Plot<K>where
K: ContinuousColor,
pub fn continuous_color_scale(self, scale: ContinuousColorScale) -> Plot<K>where
K: ContinuousColor,
Replace the complete continuous kind, optional gradient and optional exact domain.
Exact limits belong to the complete typed selection:
use lichtung_plot::{kind, Plot};
fn old_limits(plot: Plot<kind::Heatmap>) {
let _ = plot.color_limits(0.0, 1.0);
}use lichtung_plot::{kind, Plot};
fn old_limits(plot: Plot<kind::Beeswarm>) {
let _ = plot.color_limits(0.0, 1.0);
}use lichtung_plot::{kind, ContinuousColorScale, Plot};
fn old_selector(plot: Plot<kind::Heatmap>, scale: ContinuousColorScale) {
let _ = plot.scale(scale);
}Sourcepub fn text_annotation(self, annotation: PlotTextAnnotation) -> Plot<K>where
K: TextAnnotation,
pub fn text_annotation(self, annotation: PlotTextAnnotation) -> Plot<K>where
K: TextAnnotation,
Add a caller-owned text block at one corner inside the chart panel.
Sourcepub fn hide_point_outline(self) -> Plot<K>where
K: PointOutline,
pub fn hide_point_outline(self) -> Plot<K>where
K: PointOutline,
Render scatter-like point marks without the default white outline.
Sourcepub fn theme(self, theme: Theme) -> Plot<K>
pub fn theme(self, theme: Theme) -> Plot<K>
Set a complete explicit Plot theme.
If omitted, a standalone Plot uses Theme::publication and a Plot in
a crate::Canvas inherits the Canvas root theme.
Sourcepub fn significance<P>(
self,
annotations: impl IntoIterator<Item = Significance<P>>,
) -> Plot<K>where
K: Significance<P>,
pub fn significance<P>(
self,
annotations: impl IntoIterator<Item = Significance<P>>,
) -> Plot<K>where
K: Significance<P>,
Append caller-owned significance annotations of one placement.
Ordinary bars accept attached and pairwise annotations through separate calls. Other plot families expose only their supported placement.
Sourcepub const fn width(self, width: u32) -> Plot<K>
pub const fn width(self, width: u32) -> Plot<K>
Allocate exactly this width in CSS pixels and derive height from content.
Without a sizing call, both dimensions are derived from content. This
replaces the complete request, clearing any height set by Self::size.
Zero is rejected during preflight, without a setter panic. An embedded
Plot’s standalone request does not control its Canvas cell.
use lichtung_plot::{NumericValues, Plot};
let output = Plot::scatter(
NumericValues::new("x", [0.0, 1.0]),
NumericValues::new("y", [1.0, 0.0]),
)
.size(600, 1)
.width(600)
.svg_preserve_text("figure")?;
assert_eq!(output.width(), 600);
assert!(output.height() > 0);Sourcepub const fn max_width(self, maximum: u32) -> Plot<K>
pub const fn max_width(self, maximum: u32) -> Plot<K>
Cap the natural complete outer width and measure height at the selected width.
This replaces any earlier sizing request. It does not fill a cap wider than natural content, enable text reduction, or change embedded Canvas assignments. Zero rejects during owning-root preflight, not in this setter.
use lichtung_plot::{NumericValues, Plot};
let plot = Plot::scatter(NumericValues::new("x", [0.0, 1.0]),
NumericValues::new("y", [1.0, 0.0]))
.title("A width-capped scientific figure").max_width(640);Sourcepub const fn size(self, width: u32, height: u32) -> Plot<K>
pub const fn size(self, width: u32, height: u32) -> Plot<K>
Allocate exactly this width and height in CSS pixels.
This replaces the complete sizing request. Content must fit without
changing either dimension; zero dimensions reject during preflight.
Final canonical dimensions are available on crate::Output.
Sourcepub fn legend(self, policy: LegendPolicy) -> Plot<K>where
K: Legend,
pub fn legend(self, policy: LegendPolicy) -> Plot<K>where
K: Legend,
Set the legend visibility and placement policy.
Native Heatmap/Beeswarm keep their right guide track and Matrix its trailing grid track; Hidden suppresses their guide. Standard panels use the selected inside/outside edge. All exact families can explain declared data alpha.
Sourcepub const fn legend_composition(self, composition: LegendComposition) -> Plot<K>where
K: Legend,
pub const fn legend_composition(self, composition: LegendComposition) -> Plot<K>where
K: Legend,
Replace discrete guide composition; the default is Combined.
This changes only section semantics, independently of theme, labels,
visibility, placement and sizing. Facets use this owning Plot selection.
Canvas Shared uses its own selection; PerPlot uses each Plot’s value.
See crate::LegendComposition::Separate for truthful factorization.
use lichtung_plot::{CategoryValues, LegendComposition, NumericValues, Plot};
let plot = Plot::scatter(NumericValues::new("x", [0.0, 1.0]),
NumericValues::new("y", [1.0, 0.0]))
.hue(CategoryValues::new("cohort", ["control", "treated"])?)
.legend_composition(LegendComposition::Separate);All exact families can explain declared alpha. Erased plots do not expose this setter:
use lichtung_plot::{LegendComposition, Plot};
fn erased(plot: Plot) { let _ = plot.legend_composition(LegendComposition::Separate); }Sourcepub const fn raw_overlay(self, overlay: RawOverlay) -> Plot<K>where
K: RawOverlay,
pub const fn raw_overlay(self, overlay: RawOverlay) -> Plot<K>where
K: RawOverlay,
Select a centered or deterministic source-row-displaced raw-observation overlay for a boxplot or violin plot.
Source§impl Plot<Heatmap>
impl Plot<Heatmap>
Sourcepub fn layout(self, layout: HeatmapLayout) -> Plot<Heatmap>
pub fn layout(self, layout: HeatmapLayout) -> Plot<Heatmap>
Select Cartesian or structural triangular heatmap cells.
Sourcepub fn annotations(self, annotations: HeatmapAnnotations) -> Plot<Heatmap>
pub fn annotations(self, annotations: HeatmapAnnotations) -> Plot<Heatmap>
Configure optional heatmap cell-value annotations.
Source§impl Plot<Bar>
impl Plot<Bar>
Sourcepub fn spacing(self, spacing: BarSpacing) -> Plot<Bar>
pub fn spacing(self, spacing: BarSpacing) -> Plot<Bar>
Set spacing between series inside each category.
Sourcepub fn point_layer(self, layer: BarPointLayer) -> Plot<Bar>
pub fn point_layer(self, layer: BarPointLayer) -> Plot<Bar>
Append a strict point layer positioned at prepared bar centers.
Source§impl Plot<HorizontalBar>
impl Plot<HorizontalBar>
Sourcepub fn spacing(self, spacing: BarSpacing) -> Plot<HorizontalBar>
pub fn spacing(self, spacing: BarSpacing) -> Plot<HorizontalBar>
Set spacing between series inside each category.
Sourcepub fn point_layer(self, layer: BarPointLayer) -> Plot<HorizontalBar>
pub fn point_layer(self, layer: BarPointLayer) -> Plot<HorizontalBar>
Append a strict point layer positioned at prepared bar centers.
Source§impl Plot<Histogram>
impl Plot<Histogram>
Sourcepub fn bins(self, bins: HistogramBins) -> Plot<Histogram>
pub fn bins(self, bins: HistogramBins) -> Plot<Histogram>
Set the histogram bin-selection strategy.
Sourcepub fn stat(self, stat: HistogramStat) -> Plot<Histogram>
pub fn stat(self, stat: HistogramStat) -> Plot<Histogram>
Set the histogram vertical-axis normalization.
Sourcepub fn composite(self, composite: HistogramComposite) -> Plot<Histogram>
pub fn composite(self, composite: HistogramComposite) -> Plot<Histogram>
Add a KDE density curve and complete source-observation rug.
Source§impl Plot<Raincloud>
impl Plot<Raincloud>
Sourcepub fn hue_label(self, label: impl Into<Text>) -> Plot<Raincloud>
pub fn hue_label(self, label: impl Into<Text>) -> Plot<Raincloud>
Set the discrete hue-guide title for supplied Raincloud geometry.
Content is verbatim; plain strings retain earlier Text instructions. Empty text remains present. Samples, geometry without hue, and hidden legends retain but do not consume this title.
Source§impl Plot<Qq>
impl Plot<Qq>
Sourcepub fn reference_line(self, line: QqLine) -> Plot<Qq>
pub fn reference_line(self, line: QqLine) -> Plot<Qq>
Set the normal Q-Q reference-line policy.
Source§impl Plot<Line>
impl Plot<Line>
Sourcepub fn point_layer(self, layer: PointLayer) -> Plot<Line>
pub fn point_layer(self, layer: PointLayer) -> Plot<Line>
Append an independently owned supplemental point layer.
Layers accept arbitrary coordinates independent from the primary line input. Per-point labels annotate coordinates, while a layer legend label identifies the complete layer once.
Source§impl Plot<Regression>
impl Plot<Regression>
Sourcepub const fn band(self, band: RegressionBand) -> Plot<Regression>
pub const fn band(self, band: RegressionBand) -> Plot<Regression>
Select the generated confidence-band policy.
Source§impl Plot<LinePath>
impl Plot<LinePath>
Sourcepub const fn style(self, style: LinePathStyle) -> Plot<LinePath>
pub const fn style(self, style: LinePathStyle) -> Plot<LinePath>
Select the complete-path color and legend policy.
Source§impl Plot<Coefficient>
impl Plot<Coefficient>
Sourcepub fn reference_line(self, value: f64) -> Plot<Coefficient>
pub fn reference_line(self, value: f64) -> Plot<Coefficient>
Set the scientific reference/null line.
Source§impl Plot<Interaction>
impl Plot<Interaction>
Sourcepub const fn connectors(self, visible: bool) -> Plot<Interaction>
pub const fn connectors(self, visible: bool) -> Plot<Interaction>
Set whether connectors are drawn between category estimates.
Sourcepub fn styles(
self,
styles: impl IntoIterator<Item = InteractionStyle>,
) -> Plot<Interaction>
pub fn styles( self, styles: impl IntoIterator<Item = InteractionStyle>, ) -> Plot<Interaction>
Set exactly one typed point-and-connector style per interaction group.
Source§impl Plot<Waterfall>
impl Plot<Waterfall>
Sourcepub fn total_format(self, format: NumericFormat) -> Plot<Waterfall>
pub fn total_format(self, format: NumericFormat) -> Plot<Waterfall>
Replace numeric presentation for window-eligible base and terminal totals.
Verbatim names from Self::total_labels join the formatted number with one space.
use lichtung_plot::{kind, NumericFormat, Plot};
fn unsupported(plot: Plot<kind::HorizontalBar>, format: NumericFormat) {
let _ = plot.total_format(format);
}Sourcepub fn total_labels(self, labels: WaterfallLabels) -> Plot<Waterfall>
pub fn total_labels(self, labels: WaterfallLabels) -> Plot<Waterfall>
Set caller-owned labels for base and terminal annotations.
Source§impl<K> Plot<K>where
K: Marker,
impl<K> Plot<K>where
K: Marker,
Sourcepub fn clear_title_style(self) -> Plot<K>
pub fn clear_title_style(self) -> Plot<K>
Remove the local title appearance override; retain content/layout and inherit the effective Theme role.
Sourcepub fn clear_title_layout(self) -> Plot<K>
pub fn clear_title_layout(self) -> Plot<K>
Remove the local title layout request; retain content/style and restore owner inheritance.
Source§impl<K> Plot<K>where
K: Marker,
impl<K> Plot<K>where
K: Marker,
Sourcepub fn clear_subtitle_style(self) -> Plot<K>
pub fn clear_subtitle_style(self) -> Plot<K>
Remove the local subtitle appearance override; retain content/layout and inherit the effective Theme role.
Sourcepub fn clear_subtitle_layout(self) -> Plot<K>
pub fn clear_subtitle_layout(self) -> Plot<K>
Remove the local subtitle layout request; retain content/style and restore owner inheritance.
Source§impl<K> Plot<K>where
K: Marker,
impl<K> Plot<K>where
K: Marker,
Sourcepub fn clear_caption_style(self) -> Plot<K>
pub fn clear_caption_style(self) -> Plot<K>
Remove the local caption appearance override; retain content/layout and inherit the effective Theme role.
Sourcepub fn clear_caption_layout(self) -> Plot<K>
pub fn clear_caption_layout(self) -> Plot<K>
Remove the local caption layout request; retain content/style and restore owner inheritance.
Source§impl<K> Plot<K>where
K: Marker,
impl<K> Plot<K>where
K: Marker,
Sourcepub fn clear_x_label_style(self) -> Plot<K>
pub fn clear_x_label_style(self) -> Plot<K>
Remove the local x_label appearance override; retain content/layout and inherit the effective Theme role.
Sourcepub fn clear_x_label_layout(self) -> Plot<K>
pub fn clear_x_label_layout(self) -> Plot<K>
Remove the local x_label layout request; retain content/style and restore owner inheritance.
Source§impl<K> Plot<K>where
K: Marker,
impl<K> Plot<K>where
K: Marker,
Sourcepub fn clear_y_label_style(self) -> Plot<K>
pub fn clear_y_label_style(self) -> Plot<K>
Remove the local y_label appearance override; retain content/layout and inherit the effective Theme role.
Sourcepub fn clear_y_label_layout(self) -> Plot<K>
pub fn clear_y_label_layout(self) -> Plot<K>
Remove the local y_label layout request; retain content/style and restore owner inheritance.
Source§impl<K> Plot<K>where
K: Marker,
impl<K> Plot<K>where
K: Marker,
Sourcepub fn clear_color_label_style(self) -> Plot<K>where
K: ContinuousColor,
pub fn clear_color_label_style(self) -> Plot<K>where
K: ContinuousColor,
Remove the local color_label appearance override; retain content/layout and inherit the effective Theme role.
Sourcepub fn clear_color_label_layout(self) -> Plot<K>where
K: ContinuousColor,
pub fn clear_color_label_layout(self) -> Plot<K>where
K: ContinuousColor,
Remove the local color_label layout request; retain content/style and restore owner inheritance.
Source§impl Plot<Raincloud>
impl Plot<Raincloud>
Sourcepub fn clear_hue_label_style(self) -> Plot<Raincloud>
pub fn clear_hue_label_style(self) -> Plot<Raincloud>
Remove local hue-title appearance; retain content/layout and inherit the guide role.
Sourcepub fn clear_hue_label_layout(self) -> Plot<Raincloud>
pub fn clear_hue_label_layout(self) -> Plot<Raincloud>
Remove the local hue-title layout request; retain content/style and inherit the guide role.
Source§impl<K> Plot<K>where
K: XAxisText,
impl<K> Plot<K>where
K: XAxisText,
Sourcepub fn x_tick_text_layout(self, layout: TextLayout) -> Plot<K>
pub fn x_tick_text_layout(self, layout: TextLayout) -> Plot<K>
Replace the ticks text owner’s complete layout default.
Source§impl<K> Plot<K>where
K: YAxisText,
impl<K> Plot<K>where
K: YAxisText,
Sourcepub fn y_tick_text_layout(self, layout: TextLayout) -> Plot<K>
pub fn y_tick_text_layout(self, layout: TextLayout) -> Plot<K>
Replace the ticks text owner’s complete layout default.
Source§impl<K> Plot<K>where
K: Facet,
impl<K> Plot<K>where
K: Facet,
Sourcepub fn facet_row_text_layout(self, layout: TextLayout) -> Plot<K>
pub fn facet_row_text_layout(self, layout: TextLayout) -> Plot<K>
Replace the facet text owner’s complete layout default.
Source§impl<K> Plot<K>where
K: Facet,
impl<K> Plot<K>where
K: Facet,
Sourcepub fn facet_column_text_layout(self, layout: TextLayout) -> Plot<K>
pub fn facet_column_text_layout(self, layout: TextLayout) -> Plot<K>
Replace the facet text owner’s complete layout default.
Source§impl<K> Plot<K>where
K: EstimateDetailText,
impl<K> Plot<K>where
K: EstimateDetailText,
Sourcepub fn estimate_detail_text_layout(self, layout: TextLayout) -> Plot<K>
pub fn estimate_detail_text_layout(self, layout: TextLayout) -> Plot<K>
Replace the estimate text owner’s complete layout default.
Source§impl<K> Plot<K>where
K: SignificanceStyle,
impl<K> Plot<K>where
K: SignificanceStyle,
Sourcepub fn significance_text_layout(self, layout: TextLayout) -> Plot<K>
pub fn significance_text_layout(self, layout: TextLayout) -> Plot<K>
Replace the significance text owner’s complete layout default.
Source§impl<K> Plot<K>where
K: Legend,
impl<K> Plot<K>where
K: Legend,
Sourcepub fn guide_text_layout(
self,
role: GuideTextRole,
layout: TextLayout,
) -> Plot<K>
pub fn guide_text_layout( self, role: GuideTextRole, layout: TextLayout, ) -> Plot<K>
Replace one actual guide role’s default; authored whole requests take precedence.
Source§impl Plot<Matrix>
impl Plot<Matrix>
Sourcepub fn matrix_row_text_layout(self, layout: TextLayout) -> Plot<Matrix>
pub fn matrix_row_text_layout(self, layout: TextLayout) -> Plot<Matrix>
Configure the actual left-edge variable titles, not cell ticks.
Sourcepub fn matrix_column_text_layout(self, layout: TextLayout) -> Plot<Matrix>
pub fn matrix_column_text_layout(self, layout: TextLayout) -> Plot<Matrix>
Configure the actual bottom-edge variable titles, not cell ticks.
Source§impl Plot<Heatmap>
impl Plot<Heatmap>
Sourcepub fn value_text_layout(self, layout: TextLayout) -> Plot<Heatmap>
pub fn value_text_layout(self, layout: TextLayout) -> Plot<Heatmap>
Configure active finite cell value text, retaining independent contrast roles.
Sourcepub fn null_row_text_layout(self, layout: TextLayout) -> Plot<Heatmap>
pub fn null_row_text_layout(self, layout: TextLayout) -> Plot<Heatmap>
Configure fully-null row text; authored Text requests replace this default.
Source§impl Plot<Waterfall>
impl Plot<Waterfall>
Sourcepub fn total_text_layout(self, layout: TextLayout) -> Plot<Waterfall>
pub fn total_text_layout(self, layout: TextLayout) -> Plot<Waterfall>
Configure eligible total labels without changing their masks or scientific anchors.
Source§impl Plot
impl Plot
Sourcepub fn scatter(x: NumericValues, y: NumericValues) -> Plot<Scatter>
pub fn scatter(x: NumericValues, y: NumericValues) -> Plot<Scatter>
Construct a scatter plot.
Sourcepub fn histogram(input: HistogramInput) -> Plot<Histogram>
pub fn histogram(input: HistogramInput) -> Plot<Histogram>
Construct a histogram.
Sourcepub fn density(values: NumericValues) -> Plot<Density>
pub fn density(values: NumericValues) -> Plot<Density>
Construct a Gaussian density plot.
Sourcepub fn qq(values: NumericValues) -> Plot<Qq>
pub fn qq(values: NumericValues) -> Plot<Qq>
Construct a normal Q-Q plot.
Sourcepub fn point_interval(
category: CategoryValues,
estimate: NumericValues,
bounds: Bounds,
) -> Plot<PointInterval>
pub fn point_interval( category: CategoryValues, estimate: NumericValues, bounds: Bounds, ) -> Plot<PointInterval>
Construct a point-interval plot.
Sourcepub fn line(x: NumericValues, y: NumericValues) -> Plot<Line>
pub fn line(x: NumericValues, y: NumericValues) -> Plot<Line>
Construct an ordered line plot.
Sourcepub fn trajectory(
x: impl Into<AxisValues>,
y: NumericValues,
group: CategoryValues,
) -> Plot<Trajectory>
pub fn trajectory( x: impl Into<AxisValues>, y: NumericValues, group: CategoryValues, ) -> Plot<Trajectory>
Construct explicit-group repeated trajectories.
Sourcepub fn line_path(
x: NumericValues,
y: NumericValues,
group: CategoryValues,
) -> Plot<LinePath>
pub fn line_path( x: NumericValues, y: NumericValues, group: CategoryValues, ) -> Plot<LinePath>
Construct explicit-group numeric paths in source-row order.
Sourcepub fn interaction(
condition: CategoryValues,
estimate: NumericValues,
group: CategoryValues,
bounds: Bounds,
) -> Plot<Interaction>
pub fn interaction( condition: CategoryValues, estimate: NumericValues, group: CategoryValues, bounds: Bounds, ) -> Plot<Interaction>
Construct a precomputed interaction-profile plot.
Sourcepub fn coefficient(
term: CategoryValues,
input: CoefficientInput,
) -> Plot<Coefficient>
pub fn coefficient( term: CategoryValues, input: CoefficientInput, ) -> Plot<Coefficient>
Construct a model-coefficient plot.
Sourcepub fn forest(
term: CategoryValues,
estimate: NumericValues,
bounds: Bounds,
reference: f64,
) -> Plot<Forest>
pub fn forest( term: CategoryValues, estimate: NumericValues, bounds: Bounds, reference: f64, ) -> Plot<Forest>
Construct a forest plot with complete bounds and a scientific reference.
Sourcepub fn dumbbell(
category: CategoryValues,
left: NumericValues,
right: NumericValues,
endpoints: DumbbellEndpoints,
) -> Plot<Dumbbell>
pub fn dumbbell( category: CategoryValues, left: NumericValues, right: NumericValues, endpoints: DumbbellEndpoints, ) -> Plot<Dumbbell>
Construct a horizontal paired-endpoint dumbbell plot.
Sourcepub fn heatmap(
x: CategoryValues,
y: CategoryValues,
fill: NumericValues,
) -> Plot<Heatmap>
pub fn heatmap( x: CategoryValues, y: CategoryValues, fill: NumericValues, ) -> Plot<Heatmap>
Construct a categorical heatmap.
Sourcepub fn bar(category: CategoryValues, input: impl Into<BarInput>) -> Plot<Bar>
pub fn bar(category: CategoryValues, input: impl Into<BarInput>) -> Plot<Bar>
Construct a vertical bar plot.
Sourcepub fn horizontal_bar(
category: CategoryValues,
input: impl Into<BarInput>,
) -> Plot<HorizontalBar>
pub fn horizontal_bar( category: CategoryValues, input: impl Into<BarInput>, ) -> Plot<HorizontalBar>
Construct a horizontal bar plot.
Sourcepub fn stacked_bar(
category: CategoryValues,
value: NumericValues,
series: CategoryValues,
) -> Plot<StackedBar>
pub fn stacked_bar( category: CategoryValues, value: NumericValues, series: CategoryValues, ) -> Plot<StackedBar>
Construct a stacked vertical bar plot.
Sourcepub fn stacked_horizontal_bar(
category: CategoryValues,
value: NumericValues,
series: CategoryValues,
) -> Plot<StackedHorizontalBar>
pub fn stacked_horizontal_bar( category: CategoryValues, value: NumericValues, series: CategoryValues, ) -> Plot<StackedHorizontalBar>
Construct a stacked horizontal bar plot.
Sourcepub fn boxplot(category: CategoryValues, value: NumericValues) -> Plot<Boxplot>
pub fn boxplot(category: CategoryValues, value: NumericValues) -> Plot<Boxplot>
Construct a box-and-whisker plot.
Sourcepub fn violin(category: CategoryValues, value: NumericValues) -> Plot<Violin>
pub fn violin(category: CategoryValues, value: NumericValues) -> Plot<Violin>
Construct a violin plot.
Sourcepub fn raincloud(input: RaincloudInput) -> Plot<Raincloud>
pub fn raincloud(input: RaincloudInput) -> Plot<Raincloud>
Construct a raincloud plot.
Sourcepub fn regression(x: NumericValues, y: NumericValues) -> Plot<Regression>
pub fn regression(x: NumericValues, y: NumericValues) -> Plot<Regression>
Construct a regression plot.
Sourcepub fn marginal(x: NumericValues, y: NumericValues) -> Plot<Marginal>
pub fn marginal(x: NumericValues, y: NumericValues) -> Plot<Marginal>
Construct a marginal plot.
Sourcepub fn matrix(variables: Vec<NumericValues>) -> Plot<Matrix>
pub fn matrix(variables: Vec<NumericValues>) -> Plot<Matrix>
Construct a scatter matrix from ordered named numeric variables.
Sourcepub fn beeswarm(
category: CategoryValues,
value: NumericValues,
color: NumericValues,
) -> Plot<Beeswarm>
pub fn beeswarm( category: CategoryValues, value: NumericValues, color: NumericValues, ) -> Plot<Beeswarm>
Construct a categorical beeswarm plot with continuous color values.
Sourcepub fn waterfall(
labels: CategoryValues,
deltas: NumericValues,
base: f64,
) -> Plot<Waterfall>
pub fn waterfall( labels: CategoryValues, deltas: NumericValues, base: f64, ) -> Plot<Waterfall>
Construct a cumulative signed-delta waterfall plot.
Source§impl<K> Plot<K>where
K: ExactFamily,
impl<K> Plot<K>where
K: ExactFamily,
Sourcepub fn erase(self) -> Plot
pub fn erase(self) -> Plot
Consume this plot and erase its compile-time family marker.
Every owned input and configuration field is moved unchanged.
An erased plot cannot be erased a second time:
use lichtung_plot::{NumericValues, Plot};
let erased: Plot = Plot::scatter(
NumericValues::new("x", [1.0]),
NumericValues::new("y", [2.0]),
).erase();
let _ = erased.erase();Source§impl<K> Plot<K>where
K: Marker,
impl<K> Plot<K>where
K: Marker,
Sourcepub fn svg(&self, path: impl AsRef<Path>) -> Result<Output, Error>
pub fn svg(&self, path: impl AsRef<Path>) -> Result<Output, Error>
Borrow this configuration, render once and publish an outlined SVG.
Each call performs a new render and returns a reusable frozen output.
The output filename is completed with .svg after conversion.
Sourcepub fn svg_preserve_text(&self, path: impl AsRef<Path>) -> Result<Output, Error>
pub fn svg_preserve_text(&self, path: impl AsRef<Path>) -> Result<Output, Error>
Render once, publish SVG with selectable text, and return a reusable output.
The output filename is completed with .svg after rendering.
Sourcepub fn png(&self, path: impl AsRef<Path>) -> Result<Output, Error>
pub fn png(&self, path: impl AsRef<Path>) -> Result<Output, Error>
Render once, publish a balanced 300-DPI PNG, and return a reusable output.
The output filename is completed with .png after rasterization.
Sourcepub fn png_preview(&self, path: impl AsRef<Path>) -> Result<Output, Error>
pub fn png_preview(&self, path: impl AsRef<Path>) -> Result<Output, Error>
Render once, publish a balanced source-sized PNG without density metadata.
The output filename is completed with .png after rasterization.
Sourcepub fn png_with_options(
&self,
path: impl AsRef<Path>,
options: PngOptions,
) -> Result<Output, Error>
pub fn png_with_options( &self, path: impl AsRef<Path>, options: PngOptions, ) -> Result<Output, Error>
Render once and publish a PNG using the exact caller-provided options.
The output filename is completed with .png after rasterization.
Trait Implementations§
Source§impl<K: Marker> From<PlotAdapter<'_, K>> for Plot<K>
impl<K: Marker> From<PlotAdapter<'_, K>> for Plot<K>
Source§fn from(adapter: PlotAdapter<'_, K>) -> Self
fn from(adapter: PlotAdapter<'_, K>) -> Self
Auto Trait Implementations§
impl<K = Any> !RefUnwindSafe for Plot<K>
impl<K = Any> !UnwindSafe for Plot<K>
impl<K> Forget for Plot<K>
impl<K> Freeze for Plot<K>where
PhantomData<K>: Freeze,
impl<K> Move for Plot<K>
impl<K> Send for Plot<K>where
PhantomData<K>: Send,
impl<K> Sync for Plot<K>where
PhantomData<K>: Sync,
impl<K> Unpin for Plot<K>where
PhantomData<K>: Unpin,
impl<K> UnsafeUnpin for Plot<K>where
PhantomData<K>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.