Hello,
I'm attempting to create code for a cumulative frequency spike plot for a population of 25 neurons similar to that which is included in the spikeplot feature of Network Builder. I've had success writing hoc to create raster plots for networks not created with the GUI but I'm having little luck with this. My code is based on the code for the SpikePlot feature included with NEURON. If anyone can offer any suggestions or can point me to another cumulative frequency method I would greatly appreciate it.
Here is my code:
objref vecs[24], vec, gg, yy
proc freqplot() {
yy = new Vector()
binwidth=10
for i=0, 24 {
vec = new Vector()
vec.record(&HG_HG.soma.v(0.5))
vecs=vec
}
for i=0, 24 {
yy=yy.append(vecs)
}
high=24
yy=yy.sumgauss(0,high,high/50,binwidth)
yy.label(vecs.label)
gg = new Graph()
yy.line(gg, yy.c.indgen(0, high/50), 1, 1)
yy =yy.histogram(0,tstop,binwidth)
yy=yy.c(1)
yy.line(gg, yy.c.indgen(0, binwidth), 1, 1)
}
freqplot()
Currently the hoc code loads only to get stuck in an endless segmentation errors citing a line not included in the above code.