Expand description
§flow-plots
A library for creating visualizations of flow cytometry data.
§Overview
This library provides a flexible, extensible API for creating different types of plots from flow cytometry data. The architecture is designed to be easily extended with new plot types.
§Basic Usage
use flow_plots::{DensityPlot, DensityPlotOptions, Plot};
use flow_plots::options::BasePlotOptions;
use flow_plots::render::RenderConfig;
let plot = DensityPlot::new();
let options = DensityPlotOptions::new()
.base(BasePlotOptions::new().width(800u32).height(600u32).build()?)
.build()?;
let data: Vec<(f32, f32)> = vec![(100.0, 200.0)];
let mut render_config = RenderConfig::default();
let bytes = plot.render(data.into(), &options, &mut render_config)?;§Architecture
The library is organized into several modules:
options: Plot configuration types using the builder patternplots: Plot implementations (currentlyDensityPlot)render: Rendering infrastructure and progress reportingdensity: Density calculation algorithmscolormap: Color map implementationshelpers: Helper functions for common initialization patterns
Re-exports§
pub use colormap::ColorMaps;pub use histogram_data::HistogramData;pub use histogram_data::HistogramDataError;pub use histogram_data::HistogramSeries;pub use options::AxisOptions;pub use options::BasePlotOptions;pub use options::DensityPlotOptions;pub use options::HistogramPlotOptions;pub use options::PlotOptions;pub use options::SpectralSignaturePlotOptions;pub use plots::DensityPlot;pub use plots::HistogramPlot;pub use plots::Plot;pub use plots::PlotType;pub use plots::SpectralSignaturePlot;pub use scatter_data::ScatterDataError;pub use scatter_data::ScatterPlotData;pub use render::ProgressCallback;pub use render::ProgressInfo;pub use render::RenderConfig;pub use signal_heatmap::generate_normalized_spectral_signature_plot;pub use signal_heatmap::generate_signal_heatmap;
Modules§
- colormap
- contour
- Contour plot calculation using KDE2D and marching squares.
- density_
calc - helpers
- histogram_
data - Histogram data types supporting raw values, pre-binned data, and overlaid series.
- options
- plots
- render
- scatter_
data - Scatter plot data types supporting simple, gate-colored, and z-axis colored plots.
- signal_
heatmap - Signal heatmap and normalized spectral signature plot generation
Functions§
- create_
axis_ specs - @deprecated The old PlotOptions struct has been removed. Use DensityPlotOptions with builder pattern instead.
- get_
percentile_ bounds - Calculate percentile bounds for a dataset