Arguments to addvar?

The basics of how to develop, test, and use models.
Post Reply
Eric Thomson
Posts: 15
Joined: Thu Mar 02, 2006 11:18 am
Contact:

Arguments to addvar?

Post by Eric Thomson »

In the code I'm using from the book, the addvar process is typically fed six arguments (e.g., listing 6.3):
g.addvar("soma.v(0.5)",1,1,0.6,0.9,2) [1].

However, from the hoc reference online (http://www.neuron.yale.edu/neuron/stati ... tml#addvar), the different ways to call addvar include:
g.addvar("variable")
g.addvar("variable", color_index, brush_index)
g.addvar("label", "variable")
g.addvar("label", "variable", color_index, brush_index)

Because I understand it better, I've been cutting out a bunch of the arguments in [1], using something like:
g.addvar("soma.v(0.5)",1,1) [2].

Will using [2] instead of [1] get me in any trouble?

Also, and what is the meaning of all the arguments to addvar in [1]?
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Arguments to addvar?

Post by ted »

Will using [2] instead of [1] get me in any trouble?
What you're calling "[2]" is just the second form presented in the Programmer's Reference.
what is the meaning of all the arguments to addvar in [1]?
The quickest way to find out is to play with them and see what happens. So, what did you figure out?
Eric Thomson
Posts: 15
Joined: Thu Mar 02, 2006 11:18 am
Contact:

Re: Arguments to addvar?

Post by Eric Thomson »

ted wrote:What you're calling "[2]" is just the second form presented in the Programmer's Reference.
Yes, I used the simplest call in which line color can be specified.

For those interested, the undocumented arguments four through six seem to affect the appearance of the label, not the lines (they influence the label's horizontal position, vertical position, and amount of label shown, respectively). It isn't clear how they all work, so documentation would be nice. For now I'll use the simpler call until my labels start to look funny.

On a related topic, it would be helpful if Chapter 6 briefly mentioned how to control the line width and color within hoc.
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Arguments to addvar?

Post by ted »

Eric Thomson wrote:it would be helpful if Chapter 6 briefly mentioned how to control the line width and color within hoc.
Those who are interested will find this documented in the Programmer's Reference.
Post Reply