How to make multiple plots on multiple pages with the same figure filename? [message #87467] |
Wed, 05 February 2014 01:20  |
atmospheric physics
Messages: 121 Registered: June 2010
|
Senior Member |
|
|
Hello,
I am currently using coyote plotting routines. I wanted to make 3 plots each on first and second pages with same figure filename. Right now, I am plotting 3 plots on page and other 3 plots on another page with different filenames. Is there a simple way with !P.Multi tool in IDL to include multiple pages with same figure filename?
-------------------
Figfile1='figure1.ps'
cgPS_Open, FigFile1
cgDisplay,1200,1000
!P.Multi=[0,1,3]
...
...
...
!P.Multi=0
cgPS_Close
cgPS2Raster,FigFile1,/PNG, Width=1000
FigFile2='figure2.ps'
cgPS_Open, FigFile2
cgDisplay,1200,1000
!P.Multi=[0,1,3]
...
...
...
!P.Multi=0
cgPS_Close
cgPS2Raster,FigFile2,/PNG, Width=1000
--------------------------
Thanks in advance!
|
|
|
Re: How to make multiple plots on multiple pages with the same figure filename? [message #87468 is a reply to message #87467] |
Wed, 05 February 2014 02:12   |
andeh
Messages: 23 Registered: April 2011
|
Junior Member |
|
|
I don't think you can have multiple pages in a PNG file.
Non-encapsulated postscripts are fine though, so just keep plotting.
e.g.
cgPS_Open, 'figure1.ps'
cgDisplay,1200,1000
!P.Multi=[0,1,3]
FOR i=0,5 DO cgPlot, [0,1]
cgPS_Close
|
|
|
Re: How to make multiple plots on multiple pages with the same figure filename? [message #87469 is a reply to message #87468] |
Wed, 05 February 2014 03:35   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
AJAS writes:
> I don't think you can have multiple pages in a PNG file.
>
> Non-encapsulated postscripts are fine though, so just keep plotting.
Yes, this is correct. Creating multiple pages of PostScript output is as
simple as plotting on your display. Any command that would "erase" the
display on your screen before plotting will create another page of
PostScript output. There is no limit to the number of pages created. (To
manually "go to" the next page in a PostScript file, you can simply use
the cgErase command.)
The problem is converting that PostScript file into raster output.
ImageMagick is powerful, and it is possible it might be able to handle a
multipage PostScript file to do the conversion. But, I don't know how to
do that and, right now, I'm not likely to investigate it. I see other
people have tried to do this, with limited success:
http://www.imagemagick.org/discourse-server/viewtopic.php?f= 1&t=22773
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|
|