Page 1 of 1

saving *.ps files

Posted: Sun Dec 04, 2005 11:34 am
by udi
1. When I try to save a NEURON window as a *.ps file, I get 0 kb file... What can be the problem?

2. How can I edit NEURON figures in other photo editors (eg - CorelDRAW) ?

Thanks in advance.

PostScript, EPS, Idraw, gif, jpg--what to use?

Posted: Sun Dec 04, 2005 12:07 pm
by ted
1. When I try to save a NEURON window as a *.ps file, I get 0 kb file... What can be the problem?
If you are using MSWin, try the fix described in the FAQ list
http://www.neuron.yale.edu/neuron/faq/general-questions
under the heading
Printing from the PFWM to PostScript produces an empty file.
If you find that the line in nrn.def is
*pwm_postscript_filter: sed -f ${N}/lib/psfilt.sed
then try removing the curly brackets from the N, i.e. change the line to
*pwm_postscript_filter: sed -f $N/lib/psfilt.sed

Please reply to let me know which version of NEURON you are using, under what OS,
what you tried, and whether it worked.
2. How can I edit NEURON figures in other photo editors (eg - CorelDRAW) ?
First, a word about terminology--"photo editors" are "paint" programs. "Paint" programs
are designed to work with bitmap images. Bitmap images are fine for photographs or
other images that contain "continuous scale" grey or color information, but lousy
for black and white scientific plots and graphs, because they can't be rescaled without
losing detail or appearing "blocky." Corel Draw is not a photo editor--it's a vector
graphics (or "draw") program. Vector graphics images are far superior to bitmaps for
plots and graphs, because they can be rescaled to any size without losing detail or
turning into a cloud of dots or squares. Finally, if you absolutely must use bitmaps for
plots or graphs, use gif, not jpg. jpg is one of the worst formats possible for line
drawings or text--every sharp edge in the original image acquires a cloud of dots
around it, like a smudge.

Now to your question.

Don't bother printing a PostScript file. Use the PFWM to save your graphs to an
idraw file. idraw files are actually encapsulated PostScript. I like them better than
NEURON's PostScript files because they don't include all the "window decorations"
(drag bar, close box, etc.) which are mere distractions ("chart junk" as Tufte says).

You'll probably want to give the saved file an "eps" extension, so that its name will
appear in Corel Draw's file browser window when you try to import it as an eps file.

If you save more than one graph to a single idraw file, you'll find that they're all
piled on top of each other after you import them into CorelDraw. Just grab them,
one at a time, and drag them into the arrangement you want. Each graph will
be a group of drawing elements, which you can ungroup, alter, and regroup
as you wish.

You might get some more ideas by reading this:
http://www.neuron.yale.edu/course/grafex/grafex.htm

Posted: Sun Dec 04, 2005 3:20 pm
by udi
Thanks for the quick response.

Regarding the *.ps -
I work under winXP, NEURON version 5.7. I could not find the line in the nrn.def file.

about the idraw, it works.

thanks again.

Posted: Mon Dec 05, 2005 12:52 am
by ted
I work under winXP, NEURON version 5.7. I could not find the line in the nrn.def file.
Open nrn.def in any text editor.
Search for the string
postscript_filter
There will be two lines that contain this string.
One of them will say
*pwm_postscript_filter: sed -f $(NEURONHOME)/lib/psfilt.sed
or it may say
*pwm_postscript_filter: sed -f ${N}/lib/psfilt.sed
In either case, change it to this:
*pwm_postscript_filter: sed -f $N/lib/psfilt.sed
Then you may be able to save to a PostScript file.

Not that it matters, since idraw files are working well for you (and better than the
"PostScript" option in any case).

Posted: Mon Dec 05, 2005 1:25 pm
by udi
still does not work...

Posted: Mon Dec 05, 2005 5:57 pm
by ted
Oh well. Stick with idraw.

If you ever absolutely must have a PostScript file, you can always just print to a PostScript
printer, but make the printer driver redirect its output to a file. Adobe used to give away a
very nice "generic" PostScript driver that could be used for this purpose. Not sure if they
still do.

Posted: Tue Dec 06, 2005 3:00 am
by udi
thanks.

--Udi.