From awesome-cognitive-and-neuroscience-skills
Provides best practices for visualizing cognitive science and neuroscience data: plot types like raincloud for RTs, color standards, brain data conventions, publication formatting.
npx claudepluginhub neuroaihub/awesome_cognitive_and_neuroscience_skills --plugin awesome-cognitive-and-neuroscience-skillsThis skill uses the workspace's default tool permissions.
This skill encodes domain-specific visualization knowledge for cognitive science and neuroscience. It covers which plot types to use for different data types, field conventions for brain data visualization, color accessibility standards, and publication formatting requirements. A general-purpose data scientist would produce suboptimal or misleading figures without this knowledge.
Guides chart type selection by data structure, color palettes for accessibility/print, figure composition, and journal formatting for scientific publications. Use when preparing data visualizations for talks or submissions.
Creates publication-ready scientific figures with matplotlib/seaborn/plotly, including multi-panel layouts, error bars, significance annotations, colorblind-safe palettes, and journal formatting for Nature, Science, Cell.
Creates journal-ready scientific plots with matplotlib, seaborn, plotly. Supports multi-panel layouts, error bars, significance markers, colorblind-safe palettes, PDF/EPS/TIFF exports.
Share bugs, ideas, or general feedback.
This skill encodes domain-specific visualization knowledge for cognitive science and neuroscience. It covers which plot types to use for different data types, field conventions for brain data visualization, color accessibility standards, and publication formatting requirements. A general-purpose data scientist would produce suboptimal or misleading figures without this knowledge.
Before creating visualizations, you MUST:
For detailed methodology guidance, see the research-literacy skill.
This skill was generated by AI from academic literature. All parameters, thresholds, and citations require independent verification before use in research. If you find errors, please open an issue.
Use raincloud plots, NOT bar charts.
Bar charts with error bars conceal the distribution shape, hide bimodality, and can obscure important effects (Weissgerber et al., 2015). Cognitive science RT data are characteristically right-skewed with potential multimodality.
Recommended: Raincloud plots combine a half-violin (density), individual data points (jitter), and a boxplot summary (Allen et al., 2019).
| Plot Type | When to Use | When to Avoid |
|---|---|---|
| Raincloud plot | RT distributions, any continuous DV | Very large N where individual points overlap completely |
| Violin plot | Distribution shape comparison across conditions | When individual data points matter |
| Strip/jitter plot | Small to moderate N (< 100 per condition) | Very large N (overplotting) |
| Box plot | Quick summary; supplements other plots | As the only visualization (hides distribution shape) |
| Bar chart with error bars | Avoid for continuous data | Almost always; use for counts/proportions only |
| Histogram | Examining RT distribution of a single condition | Comparing across many conditions (hard to overlay) |
sqrt(k / (k-1)) where k = number of conditions)Polarity convention: There is a longstanding debate about whether to plot negative up or negative down.
| Convention | Prevalence | Journals |
|---|---|---|
| Negative up | Traditional in ERP research | Psychophysiology, most dedicated ERP journals |
| Negative down | Increasingly common; standard mathematical convention | Some cognitive neuroscience journals, Clinical Neurophysiology |
Recommendation: Follow the target journal's convention. If in doubt, negative up is the traditional ERP convention (Luck, 2014, Ch. 3). Always label the y-axis clearly with polarity.
| Purpose | Colormap | Source |
|---|---|---|
| Sequential (activation) | hot, inferno, YlOrRd | Crameri et al., 2020 |
| Diverging (activation + deactivation) | RdBu_r, coolwarm, vik | Crameri et al., 2020 |
| Perceptually uniform | viridis, magma, cividis | Crameri et al., 2020 |
| Display | When to Use | Tool |
|---|---|---|
| Orthogonal slices | Showing peak activation in a specific region | nilearn plot_stat_map |
| Glass brain | Whole-brain overview; showing distributed patterns | nilearn plot_glass_brain |
| Surface projection | Publication-quality cortical activation maps | nilearn plot_surf_stat_map, FreeSurfer |
| Montage (multi-slice) | Showing extent of activation across brain | nilearn plot_stat_map with display_mode='z' and cut_coords |
plot_connectome for 3D brain-space visualizationApproximately 8% of males and 0.5% of females have color vision deficiency (Birch, 2012). All figures must be interpretable by colorblind readers.
Recommended palettes:
| Palette | Type | Colors | Source |
|---|---|---|---|
| viridis | Sequential | Yellow-green-blue-purple | Crameri et al., 2020 |
| cividis | Sequential (optimized for CVD) | Yellow-blue | Nuñez et al., 2018 |
| Okabe-Ito | Categorical (8 colors) | #E69F00, #56B4E9, #009E73, #F0E442, #0072B2, #D55E00, #CC79A7, #000000 | Okabe & Ito, 2002 |
| viridis family (magma, inferno, plasma) | Sequential | Various | Crameri et al., 2020 |
| RdBu | Diverging | Red-white-blue | ColorBrewer; Crameri et al., 2020 |
| Parameter | Specification | Source |
|---|---|---|
| Resolution | 300 DPI minimum for print; 600 DPI for line art | APA 7th, 2020, Section 7.22 |
| Font | Sans-serif (Arial, Helvetica) 8-14 pt in the final printed figure | APA 7th, 2020, Section 7.22 |
| Line weight | 0.5-1.5 pt minimum for visibility after reduction | APA 7th, 2020 |
| Figure width | Single column: 3.3 in (84 mm); double column: 6.9 in (175 mm) | Typical journal specifications |
| File format | TIFF or EPS for print; PDF for vector; PNG for screen | Journal-specific |
| Color mode | CMYK for print; RGB for online-only | Journal-specific |
| Background | White (no gray backgrounds, no gridlines unless essential) | APA 7th, 2020 |
Problem: Bar charts conceal distribution shape, bimodality, outliers, and sample size (Weissgerber et al., 2015). Fix: Use raincloud plots, violin plots, or strip plots that show individual data points.
Problem: Two very different distributions can produce identical bar + SE plots (Weissgerber et al., 2015). Fix: Show the data. At minimum, overlay individual data points on any summary plot.
Problem: Perceptually non-uniform; creates false boundaries; misleads interpretation of gradients (Borland & Taylor, 2007). Fix: Use perceptually uniform colormaps (viridis, inferno, magma) or scientifically designed colormaps (Crameri et al., 2020).
Problem: Standard error bars include between-subject variance, which is irrelevant for within-subject comparisons (Loftus & Masson, 1994). Fix: Use within-subject CIs (Morey, 2008; Cousineau, 2005).
Problem: Showing only the single slice with the largest activation cluster misrepresents spatial extent. Fix: Show a montage of slices or a glass brain projection; share full unthresholded maps on NeuroVault.
Problem: Without a labeled color bar showing the statistical range, the reader cannot interpret the image. Fix: Always include a color bar with the statistic type (z, t, F) and the numerical range.
Problem: Mixing negative-up and negative-down within the same paper or comparing across papers without noting the convention. Fix: State the polarity convention; label the y-axis clearly; be consistent throughout.
Problem: Group means alone can mask important individual variability (e.g., bimodal response patterns in clinical populations). Fix: Overlay individual data points (jitter/strip) or show small-multiples of individual subjects.
| Data Type | Recommended Plot | Tool | Recipe Reference |
|---|---|---|---|
| RT distribution | Raincloud plot | ggrain (R) / PtitPrince (Python) | references/plot-recipes.md Recipe 1 |
| ERP waveform | Line plot with CI band | MNE-Python / ggplot2 | Recipe 2 |
| ERP topography | Topographic map | MNE-Python plot_topomap | Recipe 3 |
| fMRI activation | Glass brain or surface | nilearn | Recipe 4 |
| Accuracy by condition | Dot plot with within-subject CI | ggplot2 / matplotlib | Recipe 5 |
| Group comparison | Estimation plot (Gardner-Altman) | DABEST / dabestr | Recipe 6 |
| Time-frequency | TFR heatmap | MNE-Python | Recipe 7 |
| Correlation matrix | Clustered heatmap | seaborn / corrplot | Recipe 8 |
See references/plot-recipes.md for concrete code recipes for each visualization type.