Loading...
Loading...
Generate accessible alt text for data visualizations in Quarto documents. Use when the user wants to add, improve, or review alt text for figures in .qmd files. Triggers for requests about accessibility, figure descriptions, fig-alt, screen reader support, or making Quarto documents more accessible.
npx skill4agent add posit-dev/skills quarto-alt-textfig-cap| Complexity | Sentences | When to use |
|---|---|---|
| Simple | 2-3 | Single geom, no facets, obvious pattern |
| Standard | 3-4 | Multiple geoms or color encoding |
| Complex | 4-5 | Faceted, multiple overlays, nuanced insight |
Scatter chart. [X var] along the x-axis, [Y var] along the y-axis.
[Shape: linear/curved/clustered]. [Specific pattern, e.g., "peaks when X is 25-50"].
[Any overlaid fits or annotations].Histogram of [variable]. [Shape: right-skewed/bimodal/normal/uniform].
[If transformed: "after [transformation], the distribution [result]"].
[Notable features: outliers, gaps, multiple modes].Bar chart. [Categories] along the x-axis, [measure] along the y-axis.
[Key comparison: which is highest/lowest, relative differences].
[Pattern: increasing/decreasing/grouped].Tile chart [or heatmap]. [Row variable] along the y-axis, [column variable] along the x-axis.
Color encodes [what value]. [Pattern: where values are high/low].
[If faceted: "N panels showing [what varies]"].Faceted [chart type] with [N] panels, one per [faceting variable].
[What's constant across panels]. [What changes/varies].
[Key comparison or insight across panels].Correlation [matrix/heatmap] of [what variables]. [Arrangement].
[Overall pattern: mostly positive/negative/mixed].
[Notable clusters or strong/weak pairs].
[If relevant: contrast with expected behavior, e.g., "unlike PCA, these are not orthogonal"].[N] [chart type]s arranged [vertically/in grid]. [Top/Left] shows [original].
[Bottom/Right] shows [transformed]. [Key difference/similarity].
[If overlay: "[color] curve shows [reference]"].[Line/Scatter] chart with overlaid [fits/curves]. [Axes].
[Number] of [lines/fits] shown: [list what each represents].
[Which fits well vs. poorly and why].# List all figure labels with file and line number
grep -n "#| label: fig-" *.qmd
# Find figures in a specific file
grep -n "#| label: fig-" numeric-splines.qmd
# Find a specific figure
grep -rn "#| label: fig-splines-predictor-outcome" *.qmdplotting_data |>
ggplot(aes(value)) +
geom_histogram(binwidth = 0.2) +
facet_grid(name~., scales = "free_y") +
geom_line(aes(x, y), data = norm_curve, color = "green4")#| fig-alt: |
#| Faceted histogram with two panels stacked vertically. Top panel shows
#| original data with a bimodal distribution. Bottom panel shows the same
#| data after z-score normalization, retaining the bimodal shape. A green
#| normal distribution curve overlaid on the bottom panel clearly does not
#| match the data, demonstrating that normalization preserves distribution
#| shape rather than creating normality.