Skip to main content

Crate flow_plots

Crate flow_plots 

Source
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 pattern
  • plots: Plot implementations (currently DensityPlot)
  • render: Rendering infrastructure and progress reporting
  • density: Density calculation algorithms
  • colormap: Color map implementations
  • helpers: 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

Type Aliases§

PlotBytes
PlotRange