why: newPlotV() != new Graph()
Posted: Sun Feb 12, 2012 9:24 am
Why is
not the same as
When I look at the display, I see that newPlotV() creates a voltage plot with the object stored in graphItem which I can copy to g. The same thing appears to occur with g=new Graph(). However, they are not interchangable as shown in the code below.
Thanks,
Pierre
Code: Select all
newPlotV()
g=graphItem
Code: Select all
g=new Graph()
Code: Select all
// set globals
tstop=300
// create cell
create acell
access acell
objref izh,nc
acell izh=new IZH(0.5) // connect point process to cell
izh.a=0.02
izh.b=0.2
izh.c=-65
izh.d=6
izh.f=5
izh.g=140
izh.vv=-70
izh.u=izh.b*izh.vv
izh.I=0//10
nc = new NetCon(&izh.vv,izh) // when izh.vv > nc.threshold then izh repolarizes spike
nc.threshold=30
nc.delay = 0
// setup neuron voltage display
objref gV
newPlotV()
gV=graphItem
//gV = new Graph() // this does the same as the 2 steps above but it doesn't work
gV.size(0,tstop,-100,50)
gV.addvar("izh.vv",2,2)
run()
Pierre