Guided analysis
Explore plot with ggplot2
Map columns to x, y, colour and facets and watch the figure redraw. Every plot comes with the ggplot2 code that produced it, so the explorer doubles as a way to learn the grammar of graphics on your own data.
Map columns to a picture
Every ggplot2 chart answers one question: which column goes where? The x and y positions, the colors, and the small-multiple panels (facets) are each fed by one column of your data. That mapping — not the chart type — is the core idea.
Six chart types cover most manuscripts
- Scatter — two numeric measures per participant.
- Line — a measure over time; one line per participant needs a Line per column (usually the patient ID).
- Boxplot / Violin — a numeric measure compared across groups.
- Bar — counts or proportions of a category.
- Histogram — the shape of one numeric measure.
The code pane is yours to keep
Every plot comes with the exact ggplot2 code that drew it. Paste it into your own R session with your CSV and you get the same figure — the explorer doubles as a ggplot2 tutor.
Example output
The ggplot2 code Figura produced for this example — the exact call that drew the figure, ready to run in your own R session:
library(ggplot2)
# Cite: Analyses were performed with Figura (Saha, 2026; https://figurastats.org), which runs R with the ggplot2 package in the browser.
# Load your data (edit the path):
# df <- read.csv("your-data.csv", check.names = FALSE)
ggplot(df, aes(x = .data[["age"]], y = .data[["biomarker"]],
colour = .data[["arm"]])) +
geom_point(size = 2, alpha = 0.8) +
scale_colour_manual(values = c("#4477AA", "#CC6677")) +
labs(x = "age", y = "biomarker", colour = "arm", caption = "Synthetic demonstration data") +
theme_minimal(base_size = 12)
Sample data
Download sample.csv — 120 rows, columns patient_id, visit_month, age, bmi, biomarker, arm, sex, ecog. A frozen synthetic dataset generated by a script in the repository's data-raw/ folder; nothing in it is a real patient.
How to cite
Journals ask for a software statement. The methods text Figura generates already ends with one; this is the same attribution in reference form.
Saha S. Figura: clinical manuscript figures and statistics in the browser. 2026. https://figurastats.org
@misc{figura2026,
author = {Saha, Sandeep},
title = {Figura: clinical manuscript figures and statistics in the browser},
year = {2026},
url = {https://figurastats.org},
note = {Accessed <date>}
}