Re: Multi-page graphics in IDL 8 [message #72372 is a reply to message #72371] |
Fri, 03 September 2010 08:00   |
Mark Piper
Messages: 198 Registered: December 2009
|
Senior Member |
|
|
On Sep 2, 2:33 pm, "Kenneth P. Bowman" <k-bow...@null.edu> wrote:
> We frequently use direct graphics and !P.MULTI to generate graphics output
> where there are multiple plots on multiple pages. It is not hard to make
> this work either to the display or to a PS file. When drawing to the display
> you can wait for a <cr> before moving to the next page. When creating PS, you
> just draw all the plots to a single file. The PS file can then be easily converted
> to a multi-page PDF file.
>
> With the new Graphics system, I can see how to draw multiple plots in a single
> window, but not how to create multi-page graphics. Is the concept of multi-page graphics
> not part of the new Graphics system?
>
> I can see that it could be done by keeping track of the number of plots in a window and
> saving the window to a graphics file when full, etc., but the result is then multiple PDF files
> rather than a single file.
>
> Am I missing something? Is there an easy way to do what I need with the New Graphics
> system, or do I need to stay with Classic Graphics.
>
> Thanks, Ken Bowman
Hi Ken,
Spawning a call to ImageMagick's 'convert' program will join several
PS files into a single PDF file:
infiles = ['plot1.eps', 'plot2.eps']
infiles = strjoin(infiles, ' ')
outfile = 'plots.pdf'
cmd = 'convert -density 300 ' + infiles + ' -quality 100 ' + outfile
spawn, cmd
mp
|
|
|