# crisol-plot
Interactive 2D and 3D plots for [egui](https://github.com/emilk/egui), split out of the
[Crisol](https://jigonzalez930209.github.io/crisol/) workbench.
- Lines, areas, steps, scatter, bars, error bars, functions, and reference lines.
- Pie/donut, candlesticks, heatmaps, radar, gauges, and waterfalls.
- Log and time axes, two y axes, fits, measurements, annotations, and legend animations.
- SVG, PNG, and PDF export, plus an optional GPU line/marker renderer.
- The same builder in 3D: orbit camera, surfaces, bars, and scatter.
The math is in `crisol-plot-core`, the theme and icons in `crisol-ui-kit`, and `crisol`
re-exports every public item at `crisol::components::plot`.
```rust
use crisol_plot::plot::{Plot, PlotState, Series};
use crisol_plot::{Icons, egui};
# let ctx = egui::Context::default();
# let mut icons = Icons::new();
# let mut state = PlotState::default();
# let data: Vec<[f64; 2]> = (0..10).map(|i| [f64::from(i), f64::from(i).sqrt()]).collect();
# let mut output = ctx.run_ui(egui::RawInput::default(), |ui| {
Plot::new("signal").title("Signal").series(Series::line("v", &data)).show(ui, &mut icons, &mut state);
# });
# output.textures_delta.clear();
```