Why Plot? The Story Neurons Tell
A neuron's story is told through plots. Raw numbers are meaningless — but a plot of voltage over time shows the entire action potential, spike pattern, and response to stimulation.
Matplotlib is the tool neuroscientists use to turn data into stories.
import matplotlib.pyplot as pltimport numpy as np# Time and voltage data from a neuron simulationt = np.linspace(0, 1000, 1000) # 1000 msV = -70 + 20*np.sin(t/100) # simplified oscillating voltageplt.figure(figsize=(10, 4))plt.plot(t, V, label='Membrane Voltage')plt.axhline(y=-55, color='r', linestyle='--', label='Threshold')plt.xlabel('Time (ms)')plt.ylabel('Voltage (mV)')plt.title('Neuron Dynamics Over Time')plt.legend()plt.show()🎯 This is the template for EVERY neuron visualization in NMA. Run it to see the plot. You'll modify it for each project, but the structure stays the same.
Why neuroscientists care:
• Debugging: A plot reveals if your simulation is realistic. Bad math = obvious weird pattern.
• Intuition: Equations are abstract. Plots show you what's actually happening.
• Communication: When you present results to advisors, they ask 'show me a plot'. A good plot says in one image what 1000 words can't.
NMA Week 1: Your first project outputs will be plots. Week 2-4: You'll generate 10+ plots per project. Master plotting now and you're unstoppable.