Skip to content

Instantly share code, notes, and snippets.

@nclack
Created January 23, 2012 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nclack/1665932 to your computer and use it in GitHub Desktop.
Save nclack/1665932 to your computer and use it in GitHub Desktop.
Plotting whiskers using whisk's Python interface (and matplotlib)
import traj
from numpy import *
from pylab import *
data = traj.MeasurementsTable('trial.measurements').asarray()
dt = 0.002 # seconds per frame
for i in xrange(data[:,0].max()+1):
mask = data[:,0]==i
plot(data[mask,1]*dt,data[mask,5])
xlabel('Time (s)')
ylabel('Angle (deg.)')
show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment