Saving Graphs automatically

Using the graphical user interface to build and exercise models. Includes customizing the GUI by writing a little bit of hoc or Python
Post Reply
srene

Saving Graphs automatically

Post by srene »

Hello Ted,

i wanted to ask if it is possible to write s.th. in my .hoc file so that the graphs that will be plotted, while the hoc file runs, will be saved automatically. i mean I know that I can save data from the run like explained in the Tutorial:

http://www.anc.ed.ac.uk/school/neuron/

But is there a code that I can write maybe in the session file, give a path and the plots will be saved after the run.

Best regards,
srene
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Saving Graphs automatically

Post by ted »

The most appropriate advice depends on whether you plan to do this once, a few times, or many times.
srene

Re: Saving Graphs automatically

Post by srene »

Thanks Ted for your quick response.

I plan to do this many times. That´s why I don´t want to click so much in the Print & File Manager Window on Select -> Move -> Print -> and so on.

srene
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Saving Graphs automatically

Post by ted »

The PWManager class has a method called printfile that may do what you want--see the Programmer's Reference. If you just want screenshot-quality bitmaps, you could use the system() procedure (see Programmer's Reference) to call a separate program that does that; such programs are OS-specific, but you might get some ideas from
Destexhe methods for creating movies from NEURON
and
Carnevale methods for creating movies under NEURON
in SimToolDB
https://senselab.med.yale.edu/SimToolDB ... =94&lin=-1
Post Reply