Gallery
Every chart below is live and interactive - hover for tooltips, use the actions menu (top-right) to export SVG, PNG, or the Vega-Lite JSON, and follow Open in studio to edit the code. All are built with dysonsphere on the standard vega-datasets, except the volcano, which comes from the biology extension.
Distributions
Section titled “Distributions”Beeswarm strip of fuel economy by origin - mark_strip(scatter="beeswarm") packs points analytically, with a median tick and SEM bars.
Violin plot of horsepower by origin - mark_violin() (KDE + embedded boxplot) with a custom palette.
Statistics
Section titled “Statistics”Kruskal-Wallis omnibus with Dunn post-hoc brackets - add_comparisons(test="kruskal", omnibusVerbose=True) layered onto a boxplot.
Pearson correlation with an OLS fit line - add_correlation() layered onto a scatter.
Binned 2D histogram - a plain Altair mark_rect heatmap, colored by theme(heatmapPalette="lagoon").
Paired pre/post bars - categorical(members=2), each drug one hue climbing in lightness.
Annotation
Section titled “Annotation”Mean barley yield by site - add_shade(categories=...) alternates band shading behind a bar chart.
Auto-placed point labels - add_labels() repels labels into clear space and draws connectors, deterministically.
A multilabel table - add_multilabel(showSampleSize=True, categoryLabel=True) replaces the x-axis labels below a strip plot.
Nonlinear axes
Section titled “Nonlinear axes”Log-scale stock prices - add_log_ticks() adds correctly spaced minor ticks between the decade majors.
Square-root y axis - add_pow_ticks() interpolates minor ticks evenly in transformed space.
Extensions
Section titled “Extensions”Differential expression volcano - ds.biology.volcano(df, label=8) from the biology extension: classification, guides, and labeled top genes in one call.