Skip to main content

iced_plot/
lib.rs

1//! A GPU-accelerated plotting widget for Iced.
2//!
3//! - Works with large datasets (up to millions of points)
4//! - Retains GPU buffers between frames for fast redraws and picking
5//! - Axes/labels, legends, reference lines, tooltips, crosshairs, axis linking, etc.
6//!
7//! Quick start:
8//!
9//! ```
10//! use iced_plot::{Color, PlotWidgetBuilder, Series};
11//!
12//! let series = Series::circles((0..100).map(|i| [i as f64, i as f64]).collect(), 2.0)
13//!     .with_color(Color::from_rgb(0.2, 0.6, 1.0))
14//!     .with_label("points");
15//!
16//! PlotWidgetBuilder::new()
17//!     .with_x_label("x")
18//!     .with_y_label("y")
19//!     .add_series(series)
20//!     .build()
21//!     .unwrap();
22//! ```
23//!
24//! See `examples/` for more.
25pub(crate) mod axes_labels;
26pub(crate) mod axis_link;
27pub(crate) mod camera;
28pub(crate) mod grid;
29pub(crate) mod legend;
30pub(crate) mod message;
31pub(crate) mod picking;
32pub(crate) mod plot_renderer;
33pub(crate) mod plot_state;
34pub(crate) mod plot_widget;
35pub(crate) mod plot_widget_builder;
36pub(crate) mod point;
37pub(crate) mod reference_lines;
38pub(crate) mod series;
39pub(crate) mod ticks;
40
41// Iced re-exports.
42pub use iced::Color;
43
44// Re-exports of public types.
45pub use axis_link::AxisLink;
46pub use grid::TickWeight;
47pub use message::{PlotUiMessage, TooltipContext};
48pub use plot_widget::PlotWidget;
49pub use plot_widget_builder::PlotWidgetBuilder;
50pub use point::{MarkerType, Point};
51pub use reference_lines::{HLine, VLine};
52pub use series::{LineStyle, MarkerSize, MarkerStyle, Series};
53pub use ticks::{Tick, TickFormatter, TickProducer};