The question came up on how to generate encapsulated PostScript (EPS)
files from NCL. EPS is a specialized format used primarily for
importing PostScript into other applications.
We decided this was a question worthy of being posted to ncl-talk, so
here's the answer:
If you are using GSUN calls, you can generate an encapsulated PostScript
file as follows:
wks = gsn_open_wks("eps","name")
With straight NCL code, it might look like this:
wks = create "name" psWorkstationClass defaultapp
"wkPSFormat" : "eps"
end create
Either one of these examples will create an encapsulated PostScript
file called "name.eps".
By definition, EPS are restricted to a single page of output. Thus,
if your NCL script generates multiple frames, you can't write them
all to a single EPS file.
To generate individual EPS files from multi-framed output, first write
the output to a regular PostScript file, and then split the PS file
into individual EPS files using an application called "psplit". Your
NCL script may now look like this:
plotName = "whatever"
wks = gsn_open_wks("ps", plotName)
===> create and draw plots
system("psplit " + plotName + ".ps")
...
--Mary
This archive was generated by hypermail 2b29 : Fri Aug 25 2000 - 08:10:38 MDT