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§
- Axis
Link - Represents a shared axis link that can synchronize camera positions across multiple plot widgets.
- Color
- A color in the
sRGBcolor space. - Fill
- A filled region between two existing shapes.
- Grid
Style - Configures the appearance of grid lines inside the plot area.
- HLine
- A horizontal line at a fixed y-coordinate.
- Highlight
Point - The highlight context for a point. You can modify
- Line
Style - Line styling options for series lines.
- Marker
Style - Marker styling options for series points.
- Plot
Controls - Configures user interaction behavior for
crate::PlotWidget. - Plot
Overlay - An Iced element anchored to a plot position and overlaid on the plot.
- Plot
Style - Configures the appearance of a
PlotWidget. - Plot
Widget - A plot widget that renders data series with interactive features.
- Plot
Widget Builder - 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.
- Position
Transform - Separate x and y coordinate transforms for a two-dimensional point.
- 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.
- Tooltip
Context - Context passed to hover/pick highlight callbacks.
- Transform
- A one-dimensional coordinate transform for a series or reference line.
- VLine
- A vertical line at a fixed x-coordinate.
Enums§
- Axis
Scale - Axis scaling mode.
- Click
Action - Action that can be performed by a mouse click or double-click.
- Coordinate
System - The source coordinate system consumed by a
Transform. - Drag
Action - Action that can be performed during a mouse drag.
- Drag
Event - Drag interaction event in data/world coordinates.
- Hover
Pick Event - The hover or pick event.
- KeyAction
- Action that can be performed by a key press.
- Line
Type - Line styling options for series connections.
- Marker
Type - Marker types for series points.
- PanDirection
- Direction for keyboard-style panning.
- Plot
Render Strategy - Ways in which the widget can be rendered.
- Plot
UiMessage - Messages sent by the plot widget to the application.
- Scroll
Action - Action that can be performed by scrolling.
- Size
- Shared size modes for markers and line widths.
- Tick
Weight - The visual weight of a tick / grid line.
Functions§
- default_
formatter - A default formatter that displays values with reasonable precision.
- default_
style - Returns the default plot style derived from the current application theme.
- 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§
- Tick
Formatter - A function which formats tick values into strings for display on the axis.
- Tick
Producer - 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.