What Are We Even Plotting?
Before we touch any code, let's understand what neuroscience plots actually show — because if you don't know what voltage and firing rate mean, the code is just noise.
Two numbers describe almost everything a neuron does:
1. Membrane voltage (mV) — is the neuron about to fire?
2. Firing rate (Hz) — how often is it firing?
Membrane Voltage — the neuron's 'charge level'
Your phone has a battery voltage. Neurons do too — it's called membrane voltage, and it's measured in millivolts (mV). 1 mV = 1/1000 of a volt.
At rest, a neuron sits around –70 mV. That negative sign matters — the inside of the neuron is negatively charged compared to the outside. Think of it like a spring being held down: stored energy, ready to release.
When something stimulates the neuron (a signal from another neuron, a sound, a touch), the voltage rises. If it crosses the threshold (~–55 mV), the neuron fires — an electrical spike shoots down the axon. Then it resets back to –70 mV and waits.
Resting: –70 mV → Threshold: –55 mV → Spike: +40 mV → Reset: –70 mV
This cycle is called an action potential. It happens in ~2 milliseconds.
Firing Rate — how busy is the neuron?
A single spike isn't very informative. What matters is: how many spikes per second? That's the firing rate, measured in Hz (hertz = times per second).
• 0 Hz → silent, not responding
• 5 Hz → quietly active (5 spikes per second)
• 40 Hz → strongly active (40 spikes per second)
• 100 Hz → maximum effort (a neuron can't go much faster)
When you look at a hand, your visual neurons might fire at 2 Hz. When you look at a bright flash of light, those same neurons might jump to 80 Hz. The difference is the information.
So what do neuroscience plots show?
• Voltage vs Time — you're watching a neuron in real time. Did it fire? When? How big was the spike? This is like an EKG for a single neuron.
• Firing Rate vs Time — you're watching how busy the neuron is over seconds or minutes. Did it respond to the stimulus? Did it adapt (slow down) over time?
These two plots appear in nearly every NMA project. Now when you see V on the y-axis, you know: that's the neuron's charge level. When you see Hz, you know: that's how often it's spiking.
Wait — isn't this just electricity from physics?
Yes. Exactly. Same vocabulary, same units:
• Voltage (mV) → electrical potential difference — identical concept to physics
• Current → movement of charged particles — same idea, but ions (Na⁺, K⁺) instead of electrons in a wire
• Hz → events per second — mathematically identical to frequency in physics
The difference is the mechanism. In a circuit, electrons flow continuously through metal. In a neuron, charged ions (sodium, potassium) move through tiny protein channels in the cell wall — like valves opening and closing.
So if physics electricity felt familiar: trust that instinct. You already have the foundation.
The one big difference: neurons are not continuous
In physics, voltage changes smoothly. A circuit can output 1.5V, then 1.6V, then 1.7V — a gradual ramp.
Neurons don't work like that. They're mostly silent, sitting at –70 mV doing nothing. Then — when the threshold is crossed — they fire a full spike instantly. Then silence again.
It's more like a gun trigger than a volume knob:
• Volume knob = smooth, continuous, adjustable
• Gun trigger = nothing, nothing, nothing… BANG. Reset.
This is why neuroscientists count spikes (discrete events) rather than measure continuous voltage levels when describing what a neuron is "saying."
🤖 Why this matters for AI: Neural networks (like ChatGPT) use 'activation functions' — ReLU, sigmoid — that loosely mimic this threshold behavior. A ReLU fires 0 until input crosses 0, then outputs the value. It's a simplified, smooth version of what biological neurons do. So when you understand real neurons, you understand why AI is designed the way it is.
Quick cheat sheet:
• mV (millivolts) = voltage = is the neuron about to fire?
• Hz (hertz) = firing rate = how often is it firing?
• –70 mV = resting (quiet)
• –55 mV = threshold (about to fire)
• +40 mV = peak of spike (firing!)