Skip to main content

Crate iced_plot

Crate iced_plot 

Source
Expand description

A GPU-accelerated plotting widget for Iced.

  • Works with large datasets (up to millions of points)
  • Retains GPU buffers between frames for fast redraws and picking
  • Axes/labels, legends, reference lines, hover/pick highlighting, crosshairs, axis linking, etc.

Quick start:

use iced_plot::{Color, PlotWidgetBuilder, Series};

let series = Series::circles((0..100).map(|i| [i as f64, i as f64]).collect(), 2.0)
    .with_color(Color::from_rgb(0.2, 0.6, 1.0))
    .with_label("points");

PlotWidgetBuilder::new()
    .with_x_label("x")
    .with_y_label("y")
    .add_series(series)
    .build()
    .unwrap();

See examples/ for more.

Structs§

AxisLink
Represents a shared axis link that can synchronize camera positions across multiple plot widgets.
Color
A color in the sRGB color space.
Fill
A filled region between two existing shapes.
HLine
A horizontal line at a fixed y-coordinate.
HighlightPoint
The highlight context for a point. You can modify
MarkerStyle
Marker styling options for series points.
PanControls
Configures panning interactions.
PickControls
Configures pick interactions.
PlotControls
Configures user interaction behavior for crate::PlotWidget.
PlotWidget
A plot widget that renders data series with interactive features.
PlotWidgetBuilder
Builder for configuring and constructing a PlotWidget.
Point
A point in data-space with a visual size.
PointId
Identifier for a point in a series.
Series
A collection of per-point styled data to be plotted.
ShapeId
Unique identifier for a shape in the plot.
Tick
A position along an axis where a grid line and tick label is placed.
TooltipContext
Context passed to hover/pick highlight callbacks.
VLine
A vertical line at a fixed x-coordinate.
ZoomControls
Configures zoom interactions.

Enums§

AxisScale
Axis scaling mode.
DragEvent
Drag interaction event in data/world coordinates.
HoverPickEvent
The hover or pick event.
LineStyle
Line styling options for series connections.
MarkerSize
Marker size modes.
MarkerType
Marker types for series points.
PlotUiMessage
Messages sent by the plot widget to the application.
TickWeight
The visual weight of a tick / grid line.

Functions§

default_formatter
A default formatter that displays values with reasonable precision.
default_tick_producer
A default tick producer that generates tick positions with appropriate spacing.
log_formatter
A simple formatter for logarithmic ticks with an arbitrary base.
log_tick_producer
A simple powers-only base-10 tick producer.

Type Aliases§

TickFormatter
A function which formats tick values into strings for display on the axis.
TickProducer
A function which generates tick positions along an axis. Takes a range (min, max) and returns a vector of ticks with their values and weights.