brainx-visualization

Create diagnostic and publication-ready scientific figures from BrainX simulation and analysis results.

1|Updated Jul 23, 2026
One-click install
npx skills add https://github.com/chaobrain/BrainX-skill --skill brainx-visualization-chaobrain
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: brainx-visualization
Source: https://github.com/chaobrain/BrainX-skill/tree/main/skills/brainx-visualization
Command: npx skills add https://github.com/chaobrain/BrainX-skill --skill brainx-visualization-chaobrain

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires matplotlib, plotly, braintools, and includes references (resource) components.

What problem does it solve? Turning BrainX simulation, training, and analysis outputs into scientifically valid figures is error-prone: axes get swapped, units get lost, comparisons use inconsistent scales, and aggregate curves hide raw evidence. This Skill enforces a rigorous figure contract so every plot preserves biological meaning, provenance, and comparison integrity. ## Core Features & Use Cases - Neural data figures: Render spike rasters, population activity, connectivity matrices, trajectories, tuning curves, and 3D views with braintools.visualize helpers that preserve time-major axes, units, and event representations. - Statistical and model evaluation plots: Inspect distributions, Q-Q plots, residuals, confusion matrices, ROC and precision-recall curves, and learning curves with correct sampling structure and held-out evidence separation. - Interactive exploration, styling, and animation: Build Plotly dashboards, apply scoped Matplotlib styles, choose semantically correct colormaps, and animate temporal data with fixed comparison limits. - Use Case: After running a BrainX network simulation, generate a two-panel figure combining a spike raster and population activity trace, verify it against raw event counts, export it at publication resolution, and record full provenance in a FIGURE_MANIFEST.md entry. ## Quick Start Use the brainx-visualization skill to plot a spike raster and population activity figure from my latest BrainX simulation run and export it as a publication-ready PDF.

Frequently Asked Questions about brainx-visualization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I plot a spike raster from BrainX simulation data?

Use braintools.visualize.spike_raster with flat spike-time arrays and matching neuron IDs, or per-neuron spike-train sequences. For dense time-by-neuron matrices aligned to timestamps, use raster_plot instead, and never convert flat events to a dense matrix just for plotting.

What is the difference between spike_raster and raster_plot in braintools?

spike_raster accepts flat event arrays with matching neuron IDs or per-neuron spike trains, while raster_plot expects a dense (time, neuron) matrix aligned to a timestamp vector. Passing the wrong representation is a common failure that corrupts the displayed event structure.

When should I use ROC curves versus precision-recall curves?

Use precision-recall curves for imbalanced positive-class evaluation or when positive predictions drive the decision, since ROC can look optimistic under severe class imbalance. Always state the positive class, score direction, and prevalence, and evaluate on held-out predictions only.

Does braintools.visualize support interactive Plotly figures?

Yes, helpers like interactive_spike_raster, interactive_heatmap, and dashboard_neural_activity return Plotly figures requiring Plotly installed. Export with fig.write_html for interactive artifacts, and keep a stable static companion figure for archival evidence.

Why does my animation show false magnitude changes between frames?

This happens when each frame autoscales its axis or color limits. Fix val_min, val_max, axis limits, and colormap normalization before rendering, and set dt from the recorded interval rather than the integration step when monitoring was subsampled.

When should I not use 3D visualization for neural data?

Avoid 3D when a 2D projection answers the same question without occlusion. Reserve 3D views for genuine geometric evidence like surfaces, volumes, electrodes, or three-coordinate trajectories, and route BrainCell morphology to the BrainCell topology visualization reference instead.