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

Home » Public Forums » archive » ps file
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
ps file [message #53106] Wed, 21 March 2007 02:47 Go to next message
wxf is currently offline  wxf
Messages: 6
Registered: March 2007
Junior Member
I need produce a ps file which contains many pages(A4/page) by a IDL
program.
But when I plot a lot of my pictures on that ps file,I find the ps
file has only one page and terribly large size.

Who can tell me if IDL can set a ps file which the user can draw
pictures on different position of different pages and all these pages
belongs to the same ps file?

thanks
yours wxf
Re: ps file [message #53187 is a reply to message #53106] Thu, 22 March 2007 02:30 Go to previous message
Paolo Grigis is currently offline  Paolo Grigis
Messages: 171
Registered: December 2003
Senior Member
wxf@bao.ac.cn wrote:
>> In general, any time you issue a graphics command that
>> would, on your display, erase the window first (e.g, Plot,
>> Contour, Surface, etc.) will, in PostScript, create a new
>> page of output. Any time you issue a graphics command
>> that would go into the same window (e.g. OPLOT, PLOTS,
>> XYOUTS, etc.) will stay on the same page.
>>
>> Moreover, you can force a new page of PostScript output
>> by "erasing" the window with an ERASE command.
>>
>> David
> ============================================================ =
> Sorry,my statement might be ambiguous so David did not understand.
> Let me give an example to explain.
> Everybody must have seen some large geographical map(such as a US
> geographical map with scale 1:10000).I can use IDL and
> "set_plot,'ps'"command to produce such a ps file.But it is too
> large and nobady can watch it on monitor or print it by printer.
> Now,I want to produce the same map with the same scale,but change
> the map into to a book with A4 size per page.We can watch that book or
> print that book whatever size the US map is.
>
> My question is how can I make out that ps-book in an IDL procedure and
> its set_plot command.

Well, then I guess you will have to divide up your image in m by n subimages,
and then loop over all the subimages, plotting each separately....

something like this should do the job:

ndiv=3;number of pages will be ndiv*ndiv

file = FILEPATH('rose.jpg', $
SUBDIRECTORY = ['examples', 'data'])

dummy = QUERY_JPEG(file, imageinfo)
imagesize = imageinfo.dimensions
image = READ_IMAGE(file)

set_plot,'PS'

tv,image,/true;undivided image for comparison
erase

.run
FOR i=0,ndiv-1 DO BEGIN
FOR j=0,ndiv-1 DO BEGIN

partial_im=image[*,i*imagesize[0]/ndiv:(i+1)*imagesize[0]/nd iv-1 $
,j*imagesize[1]/ndiv:(j+1)*imagesize[1]/ndiv-1]
tv,partial_im,/true
erase

ENDFOR
ENDFOR
end

device,/close


Ciao,
Paolo

>
> Thanks
> wxf
>
>
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Manipulation using where
Next Topic: using ion scripts for local server -apache

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

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

Total time taken to generate the page: 0.38907 seconds