Skip to main content
Kuva provides a comprehensive suite of plot types for scientific visualization, from basic scatter and line plots to specialized genomics and network visualizations.

Basic Plots

Fundamental plot types for everyday data visualization:

Scatter Plot

Plot individual (x, y) points with support for error bars, trend lines, and bubble sizing

Line Plot

Connect data points with lines, supporting multiple styles, fills, and confidence bands

Bar Chart

Simple, grouped, and stacked bar charts for categorical data

Histogram

Visualize distributions by binning continuous data

Box Plot

Five-number summary with Tukey whiskers for comparing distributions

Violin Plot

Kernel density estimation revealing distribution shape and multimodality

Pie Chart

Proportional slices for part-to-whole relationships

Strip Plot

Individual points in categorical groups with jitter, swarm, or center layouts

Statistical & Scientific Plots

Specialized visualizations for scientific analysis:

Heatmap

Matrix visualization with color-mapped values

2D Histogram

Density estimation for bivariate data

Contour Plot

Level curves showing continuous 3D surfaces

Volcano Plot

Differential expression with significance thresholds

Manhattan Plot

Genome-wide association study results

Dot Plot

Gene expression across samples or conditions

Financial & Business

Visualization types for financial and business data:

Candlestick

OHLC (Open-High-Low-Close) stock price data

Waterfall

Sequential positive and negative contributions

Stacked Area

Cumulative time series showing composition over time

Specialized & Network Plots

Advanced visualizations for complex relationships:

Sankey Diagram

Flow between nodes showing magnitude and direction

Chord Diagram

Circular layout showing relationships between entities

UpSet Plot

Set intersections beyond traditional Venn diagrams

Phylogenetic Tree

Evolutionary relationships with customizable branch styles

Synteny Plot

Genomic alignments between sequences or chromosomes

Brick Plot

Hierarchical rectangular layouts

Supporting Elements

Utility plot types used in combination with others:
  • Band Plot - Shaded confidence regions for scatter and line plots
  • Series Plot - Flexible multi-series plotting with automatic styling

Choosing a Plot Type

For Distributions

  • Single variable: Histogram, Strip Plot (with center layout)
  • Compare groups: Box Plot, Violin Plot, Strip Plot (jittered/swarm)
  • Density estimation: Violin Plot, 2D Histogram, Contour

For Relationships

  • Two continuous variables: Scatter Plot, Line Plot
  • With uncertainty: Scatter/Line with error bars or bands
  • Correlation: Scatter with trend line
  • Time series: Line Plot, Stacked Area

For Categorical Data

  • Simple counts: Bar Chart
  • Multiple series: Grouped or Stacked Bar
  • Proportions: Pie Chart, Stacked Bar

For Scientific Data

  • Gene expression: Volcano Plot, Dot Plot, Heatmap
  • GWAS results: Manhattan Plot
  • Phylogeny: Phylogenetic Tree
  • Genomic alignments: Synteny Plot

For Networks & Flows

  • Material flow: Sankey Diagram
  • Relationships: Chord Diagram
  • Set overlaps: UpSet Plot

Common Patterns

Composing Plots

Many Kuva plot types can be layered on the same axes:
let plots = vec![
    Plot::Box(boxplot),
    Plot::Strip(strip),  // Overlay points on boxes
];

Consistent API

All plot builders follow the same pattern:
  1. Create with ::new()
  2. Add data with .with_data() or .with_group()
  3. Style with .with_color(), .with_size(), etc.
  4. Label with .with_legend()

Rendering

Most plots use render_multiple:
use kuva::render::render::render_multiple;
use kuva::render::layout::Layout;

let layout = Layout::auto_from_plots(&plots)
    .with_title("My Plot")
    .with_x_label("X")
    .with_y_label("Y");

let svg = SvgBackend.render_scene(&render_multiple(plots, layout));
Pie charts use render_pie for single-plot rendering.

Build docs developers (and LLMs) love