plotting data as the simulation runs
Posted: Thu Sep 15, 2005 5:59 am
Hi,
Whenever I create a Graph from a .hoc code, I must explicitely add the data to be plotted and this is usually done after the simulation has run, using a vector that recorded the data of interest.
I would like to create a Graph that is updated during the simulation, like the graphs that are created using the GUI.
I dived into the GUI's hoc files and found the newPlotV() procedure. I can call it from my hoc and it does what I want, but then I tried to reproduce the procedure (using different object names but the same commands and looking recursively into the procedures), and it didn't work; the graphs (or plots?) that I create always have to be updated explicitely after the simulation.
Another question: if I call the newPlotV() command from my code (to use an easy solution), what would be the most convenient way of referring to the plot that is created in order to change the scale, add more data or change the plot color?
Thanks!
Whenever I create a Graph from a .hoc code, I must explicitely add the data to be plotted and this is usually done after the simulation has run, using a vector that recorded the data of interest.
I would like to create a Graph that is updated during the simulation, like the graphs that are created using the GUI.
I dived into the GUI's hoc files and found the newPlotV() procedure. I can call it from my hoc and it does what I want, but then I tried to reproduce the procedure (using different object names but the same commands and looking recursively into the procedures), and it didn't work; the graphs (or plots?) that I create always have to be updated explicitely after the simulation.
Another question: if I call the newPlotV() command from my code (to use an easy solution), what would be the most convenient way of referring to the plot that is created in order to change the scale, add more data or change the plot color?
Thanks!