Page 1 of 1

Export PlotShape

Posted: Fri Mar 14, 2014 10:02 pm
by figoyouwei
Dear Ted,

What is the hoc command to export a PlotShape from NEURON into a publication-ready figure ?

For instance, like the Figure 3a in one of Magee's recent papers ?
http://www.nature.com/nature/journal/v4 ... 11554.html

Thanks.

Re: Export PlotShape

Posted: Sun Mar 16, 2014 12:08 pm
by ted
Good question. The PlotShape class, like all other graph classes (e.g. the Graph class), has a method called printfile() that generates an encapsulated PostScript file--read about it in the Programmer's Reference entry on the PlotShape class
http://www.neuron.yale.edu/neuron/stati ... class.html

Re: Export PlotShape

Posted: Tue Apr 15, 2014 6:28 pm
by figoyouwei
thank you Ted, it shapes :)

Re: Export PlotShape

Posted: Fri Nov 07, 2014 5:04 am
by figoyouwei
Is there a way to specify the resolution in printfile() ? The default one is pretty coarse :)

Re: Export PlotShape

Posted: Fri Nov 07, 2014 5:25 am
by figoyouwei
and aside from export resolution, how to specify "ShapeStyle" in hoc code which can be done by GUI ?

Re: Export PlotShape

Posted: Fri Nov 07, 2014 1:05 pm
by ted
More good questions.
Is there a way to specify the resolution in printfile() ? The default one is pretty coarse
I don't understand the question. Encapsulated PostScript is a vector format, not a bitmap format. Resolution is not an issue with vector formats, since vector format images are completely rescalable. Perhaps your image editing or word processing software is converting the PostScript to a bitmap format, without you knowing about it.
how to specify "ShapeStyle" in hoc code
Shapes and PlotShapes are graph classes, and Graphs have an exec_menu method. Read about it here
http://www.neuron.yale.edu/neuron/stati ... .exec_menu
If foo is an objref that points to a particular instance of Shape or PlotShape,
foo.exec_menu("Show Diam")
will redraw the figure with line widths proportional to local diameter.

Re: Export PlotShape

Posted: Sat Nov 08, 2014 8:16 am
by figoyouwei
thank you, exec_menu() is good !