comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: write plots alternately to two postscripts files
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: write plots alternately to two postscripts files [message #72974] Thu, 21 October 2010 09:25
R.G.Stockwell is currently offline  R.G.Stockwell
Messages: 163
Registered: October 2004
Senior Member
"Kenneth P. Bowman" <k-bowman@null.edu> wrote in message
news:k-bowman-82E27C.10403019102010@news.tamu.edu...
> In article <coednS_lB9t6JCDRnZ2dnUVZ_tWdnZ2d@giganews.com>,
> Simon <user@compgroups.net/> wrote:
>
>> The problem sounds easy, but I do not know where to find the solution.
>> I want to write a program which should create two different postscript
>> files, each having 100+ pages.
>> However I don't want to open, create and close them one after another.
>> It should work like this:
>>
>> Read and process a chunk of data.
>> Add a plot to file 1
>> Add a plot to file 2
>> Read and process new chunk of data
>> add a plot to file 1
>> Add a plot to file 2
>> and so on
>>
>> As the processed data is really large it is not possible to keep it all
>> in memory. So first finish file1 and then create file2 is not an option.
>>
>> Is there any chance to switsch between to output files?
>> Any help is appreciated!
>> Simon
>
> Because of the way direct graphics talks to devices, I don't believe
> that this is possible. If I'm wrong, I expect someone will correct me!
>
> I suggest that you create individual pages as separate files, convert them
> to PDF,
> then use an external utility to merge the files into a single PDF.
>
> Unfortunately this does not allow for alternating plots at the individual
> plot level when you have multiple plots on a page.
>
> Ken Bowman

An old fashion way of doing this is to create many single PS files (one for
each figure) then
create a one page latex file that includes the many PS graphics, and that
can be arranged on the
page in any way you want, with captions and other annotations.

and, it will create that final combined PS file, if that is required.


cheers,
bob
Re: write plots alternately to two postscripts files [message #73007 is a reply to message #72974] Tue, 19 October 2010 09:23 Go to previous message
Norbert Hahn is currently offline  Norbert Hahn
Messages: 46
Registered: May 2003
Member
"Kenneth P. Bowman" <k-bowman@null.edu> wrote:

> In article <coednS_lB9t6JCDRnZ2dnUVZ_tWdnZ2d@giganews.com>,
> Simon <user@compgroups.net/> wrote:
>
>> The problem sounds easy, but I do not know where to find the solution.
>> I want to write a program which should create two different postscript files, each having 100+ pages.
>> However I don't want to open, create and close them one after another.
>> It should work like this:
>>
>> Read and process a chunk of data.
>> Add a plot to file 1
>> Add a plot to file 2
>> Read and process new chunk of data
>> add a plot to file 1
>> Add a plot to file 2
>> and so on
>>
>> As the processed data is really large it is not possible to keep it all in memory. So first finish file1 and then create file2 is not an option.
>>
>> Is there any chance to switsch between to output files?
>> Any help is appreciated!
>> Simon
>
> Because of the way direct graphics talks to devices, I don't believe
> that this is possible. If I'm wrong, I expect someone will correct me!

I think you are right.

> I suggest that you create individual pages as separate files, convert them to PDF,
> then use an external utility to merge the files into a single PDF.

Fortunately there is no need to convert PS pages to PDF as you can concatenate
them to many jobs in a single file. Usually a PS job starts with %! and ends
with ^D (CTRL-D). However, if a printer flushes the input after it encounters
^D, this end-of-job characters have to be deleted in the concatenated file.

Norbert
Re: write plots alternately to two postscripts files [message #73008 is a reply to message #73007] Tue, 19 October 2010 08:40 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <coednS_lB9t6JCDRnZ2dnUVZ_tWdnZ2d@giganews.com>,
Simon <user@compgroups.net/> wrote:

> The problem sounds easy, but I do not know where to find the solution.
> I want to write a program which should create two different postscript files, each having 100+ pages.
> However I don't want to open, create and close them one after another.
> It should work like this:
>
> Read and process a chunk of data.
> Add a plot to file 1
> Add a plot to file 2
> Read and process new chunk of data
> add a plot to file 1
> Add a plot to file 2
> and so on
>
> As the processed data is really large it is not possible to keep it all in memory. So first finish file1 and then create file2 is not an option.
>
> Is there any chance to switsch between to output files?
> Any help is appreciated!
> Simon

Because of the way direct graphics talks to devices, I don't believe
that this is possible. If I'm wrong, I expect someone will correct me!

I suggest that you create individual pages as separate files, convert them to PDF,
then use an external utility to merge the files into a single PDF.

Unfortunately this does not allow for alternating plots at the individual
plot level when you have multiple plots on a page.

Ken Bowman
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Python symposium
Next Topic: Re: IDL 8.0 garbage collector issue.

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:17:51 PDT 2025

Total time taken to generate the page: 0.34488 seconds