Plotting current (i) delivered by IClamp
Plotting current (i) delivered by IClamp
I've compiled the iclamp1.mod code from page 219 of The Neuron Book (Example 9.3), in order to add an intracellular stimulating electrode to a model. The custom GUI I built includes a graph for plotting voltage against time, but I was wondering how to generate an equivalent graph for the current delivered (i) by IClamp1. (It's a question provoked by curiosity rather than need, since the graph would only show a rectangular current pulse.)
Re: Plotting current (i) delivered by IClamp
From hoc, you could do:
Alternatively, you can use the GUI: Choose "Graph->Current axis" from the menu, right-click on the graph, select "Plot what", left-click "Show->All" in the dialog, select your IClamp1 object in the left panel ("ic" in the example above), select "i" in the middle panel.
The plotting system is explained in chapter 7, pp. 179-181 of the Neuron book.
Code: Select all
objref ic, g
g = new Graph()
ic = new IClamp1(0.5)
g.addvar("ic.i")
addplot(g, 0)
The plotting system is explained in chapter 7, pp. 179-181 of the Neuron book.
Re: Plotting current (i) delivered by IClamp
Thanks! I used the GUI method. Other readers might like to know I had to double-click the IClamp1 object in the left panel, which brought up "0." in the middle panel (my model's only IClamp1 object). Double-clicking "0." brought up a list of the available variables (including amp, dur, del, and i). From there I selected "i".csh wrote:Choose "Graph->Current axis" from the menu, right-click on the graph, select "Plot what", left-click "Show->All" in the dialog, select your IClamp1 object in the left panel ("ic" in the example above), select "i" in the middle panel.
Thanks also for directing me to the relevant section of The Neuron Book.