saving *.ps files

Using the graphical user interface to build and exercise models. Includes customizing the GUI by writing a little bit of hoc.
Post Reply
udi
Posts: 13
Joined: Wed Aug 10, 2005 3:25 am
Location: Hebrew University, School of Medicine

saving *.ps files

Post by udi » Sun Dec 04, 2005 11:34 am

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.

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

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

Post by ted » Sun Dec 04, 2005 12:07 pm

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

udi
Posts: 13
Joined: Wed Aug 10, 2005 3:25 am
Location: Hebrew University, School of Medicine

Post by udi » Sun Dec 04, 2005 3:20 pm

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.

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

Post by ted » Mon Dec 05, 2005 12:52 am

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).

udi
Posts: 13
Joined: Wed Aug 10, 2005 3:25 am
Location: Hebrew University, School of Medicine

Post by udi » Mon Dec 05, 2005 1:25 pm

still does not work...

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

Post by ted » Mon Dec 05, 2005 5:57 pm

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.

udi
Posts: 13
Joined: Wed Aug 10, 2005 3:25 am
Location: Hebrew University, School of Medicine

Post by udi » Tue Dec 06, 2005 3:00 am

thanks.

--Udi.

Post Reply