cinderplotv0.29.0

The grammar of graphics, in C

Publication-ready graphics from one small, fast binary and a token-efficient grammar.

CSV or TSV in — PDF, SVG or PNG out. No R, no Python at plot time.

See the gallery →
27geoms
12scales
7modes
C11+ Cairo

Install & plot

# from the zhou-lab conda channel, in its own env
conda create -n cinderplot -c zhou-lab -c conda-forge cinderplot
conda activate cinderplot

# example data: R's mtcars as a CSV
curl -LO https://raw.githubusercontent.com/zhou-lab/cinderplot-examples/main/data/mtcars.csv

# plot straight from a CSV
cinderplot 'mtcars.csv
  + aes(hp, mpg, colour=factor(cyl))
  + geom_point()' -o plot.pdf

# or build from source (C11, Cairo, pkg-config)
git clone https://github.com/zhou-lab/cinderplot && cd cinderplot
make && make install PREFIX=$HOME/.local

Why cinderplot

  • Small & fast. One C11 binary, Cairo output. Milliseconds per figure, no runtime.
  • Familiar grammar. aes, geoms, scales, legends and themes inspired by ggplot2 — reproduces theme_gray by default, with theme_bw/minimal/classic/void and more.
  • Vector or raster. PDF, SVG or PNG chosen by the output file extension (--dpi for PNG, default 96). Publication-ready.

Supported grammar

growing see it drawn →

Geoms

geom_pointgeom_jittergeom_linegeom_smoothgeom_colgeom_bargeom_histogramgeom_boxplotgeom_densitygeom_rectgeom_segmentgeom_tilegeom_rastergeom_textgeom_labelgeom_text_repelgeom_label_repelgeom_errorbargeom_linerangegeom_hlinegeom_vlinegeom_ablinegeom_treegeom_tiplabgeom_nodelabgeom_nodepointgeom_tippoint

Scales

x / y log10 / log2breaks / labels / percentlimits + expandgenome xcolour hue12 continuous palettesgradient / gradient2ColorBrewer / distillermanual / identity coloursdiscrete x / yfree facet scalesdiscrete label angle

Positions

position_stack

Modes

scatter / grammarheatmap + clusteringgenomic tracksNewick treeschord diagramVenn diagramUpSet plot

Themes

theme_graytheme_bwtheme_minimaltheme_classictheme_voidtheme_linedrawtheme_lighttheme_darktheme_few

Gallery · For coding agents · GitHub · Examples · MIT · zhou-lab