Main Page | Report Page

 

  Computers Forum Index » Computer Languages (IDL-PVWAVE) » Multi-page graphics in IDL 8...

Author Message
Kenneth P. Bowman...
Posted: Fri Sep 03, 2010 12:33 am
 
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
 
Mark Piper...
Posted: Fri Sep 03, 2010 3:00 pm
 
On Sep 2, 2:33 pm, "Kenneth P. Bowman" <k-bow... at (no spam) null.edu> wrote:
Quote:
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
 
Kenneth P. Bowman...
Posted: Tue Sep 07, 2010 8:40 pm
 
In article
<f5fdd207-0529-4098-b2ca-a699728e0df7 at (no spam) b34g2000yqm.googlegroups.com>,
Chris Torrence <gorthmog at (no spam) gmail.com> wrote:

Quote:
In IDL 8.0, multi-page postscript files still work fine, just as they
did before.

For the new graphics, we added support for PDF output, but we ran out
of time to do multi-page output. I have some prototype code that adds
this feature, if you're interested in trying it out.

Cheers,
Chris
ITTVIS

I can continue to use direct graphics for now and wait for an
official release. I'm sure it will take some time to get my
brain to convert to using New Graphics. :-)

Cheers, Ken
 
Paulo Penteado...
Posted: Mon Oct 18, 2010 4:43 pm
 
On Oct 18, 2:09 am, Teddy Allen <teddy.ie... at (no spam) gmail.com> wrote:
Quote:
How did you find out to create multi plots on one window in 8.0?
Thank you very much for your time.

Besides what David mentioned above, note that you can combine
different layout grids to make non-rectangular multiplots, as show in
one of the examples of the last webinar:

http://groups.google.com/group/comp.lang.idl-pvwave/browse_thread/thread/a44a227fb6d32cf7/

Also, I am finishing writing a class to provide in the new graphics
functionality like IDLAstro's multiplot does for direct graphics. It
is more flexible than multiplot, allowing to have lines/columns of
different heights/widths, and providing synchronization of axes
properties. It will be out probably sometime this week.
 
 
Page 1 of 1    
All times are GMT
The time now is Mon Jul 28, 2014 10:37 pm