skills/cogsci-visualization/SKILL.md
Domain-specific visualization best practices for cognitive and neuroscience data, encoding plot type selection, color standards, and publication formatting
npx skillsauth add haoxuanlithuai/awesome_cognitive_and_neuroscience_skills cogsci-visualizationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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 | Weissgerber et al., 2015 | | 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.
tools
Convert a GitHub repository or local codebase into a well-structured Claude Code skill with progressive disclosure. Use this skill whenever the user provides a GitHub URL or local repo path and asks to turn it into a skill, create a skill from a repo, or convert a library/tool/framework into reusable skill documentation. Also trigger when users say things like 'make a skill from this repo', 'turn this codebase into a skill', or 'I want a skill for [library name]'.
development
Domain-validated guidance for cortical surface visualization and brain surface rendering of fMRI data using pycortex: data types (Volume, Vertex, Dataset), 2D cortical flatmaps, 3D WebGL brain viewers, volume-to-surface mapping, FreeSurfer/fMRIPrep integration, ROI management, and surface analysis. Use this skill whenever the user mentions pycortex, `import cortex`, cortical surfaces, brain flatmaps, WebGL brain viewers, cortical surface mapping, or wants to visualize neuroimaging data on the cortex, even if they don't explicitly name pycortex.
development
Domain-validated pipeline guidance for EEG/MEG data analysis using MNE-Python: data loading, preprocessing (filtering, ICA, re-referencing), epoching, ERP/ERF computation, time-frequency decomposition, source localization, decoding/MVPA, statistical testing, simulation, and visualization. Use this skill whenever the user works with EEG/MEG/sEEG/ECoG/NIRS/eye-tracking data in Python, mentions MNE, or needs neurophysiological analysis guidance.
development
Step-by-step guidance for contributing a new skill to the NeuroAIHub/awesome_cognitive_and_neuroscience_skills repository via GitHub Pull Request, including SKILL.md format requirements, quality rules, and PR checklist