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

Home » Public Forums » archive » Re: problem with multiple page postscript plots
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: problem with multiple page postscript plots [message #73679] Mon, 22 November 2010 07:35
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
BTW, you might to have a look at the "pson" and "psoff" utilities written by liam gumley:
http://www.gumley.com/
Click on the "About the book" link to get directed to a page containing tarballs of the code.

cheers,

paulv

S�ren Frimann wrote:
> Hi all.
>
> I'm having a problem with creating postscript plots of multiple pages.
>
> My code looks like this:
> ------------------------------------------------------------ -------------------------------------
> pro plotexample, n
>
> compile_opt idl2
>
> set_plot, 'ps'
> !p.multi=[0,1,3]
> device, filename='example.ps'
>
> for i = 0,n do begin
> plot, [0,1],[0,1]
> plot, [0,1],[0,1]
> plot, [0,1],[0,1]
> endfor
>
> set_plot, 'x'
> !p.multi = 0
>
> end
> ------------------------------------------------------------ -------------------------------------
>
> If n is too low (lt 29) it never produces a readable .ps file. If n is
> higher it doesn't include all pages (or for that matter all subplots
> on the last page). Sometimes the last window drawn don't contain any
> data -- at other times it only draws the horizontal axes.
>
> I'm really lost as to why this is happening.
>
> Regards,
> Soeren
Re: problem with multiple page postscript plots [message #73680 is a reply to message #73679] Mon, 22 November 2010 07:17 Go to previous message
Søren Frimann is currently offline  Søren Frimann
Messages: 13
Registered: November 2010
Junior Member
On Nov 22, 3:15 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Nov 22, 1:07 pm, Søren Frimann <frim...@phys.au.dk> wrote:
>
>> If n is too low (lt 29) it never produces a readable .ps file. If n is
>> higher it doesn't include all pages (or for that matter all subplots
>> on the last page). Sometimes the last window drawn don't contain any
>> data -- at other times it only draws the horizontal axes.
>
>> I'm really lost as to why this is happening.
>
> I suggest adding a 'device,/close' before you switch back to the X
> device. PS writing can be cached, some things may only be written to
> the file when you close it.

That did the trick - thanks very much :-)
Re: problem with multiple page postscript plots [message #73681 is a reply to message #73680] Mon, 22 November 2010 07:16 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Nov 22, 1:15 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> I suggest adding a 'device,/close' before you switch back to the X
> device. PS writing can be cached, some things may only be written to
> the file when you close it.

By that I meant to say buffered, not cached.
Re: problem with multiple page postscript plots [message #73682 is a reply to message #73681] Mon, 22 November 2010 07:15 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Nov 22, 1:07 pm, Søren Frimann <frim...@phys.au.dk> wrote:
> If n is too low (lt 29) it never produces a readable .ps file. If n is
> higher it doesn't include all pages (or for that matter all subplots
> on the last page). Sometimes the last window drawn don't contain any
> data -- at other times it only draws the horizontal axes.
>
> I'm really lost as to why this is happening.

I suggest adding a 'device,/close' before you switch back to the X
device. PS writing can be cached, some things may only be written to
the file when you close it.
Re: problem with multiple page postscript plots [message #73683 is a reply to message #73682] Mon, 22 November 2010 07:12 Go to previous message
Søren Frimann is currently offline  Søren Frimann
Messages: 13
Registered: November 2010
Junior Member
On Nov 22, 3:07 pm, Søren Frimann <frim...@phys.au.dk> wrote:
> Hi all.
>
> I'm having a problem with creating postscript plots of multiple pages.
>
> My code looks like this:
> ------------------------------------------------------------ -------------------------------------
> pro plotexample, n
>
> compile_opt idl2
>
> set_plot, 'ps'
> !p.multi=[0,1,3]
> device, filename='example.ps'
>
> for i = 0,n do begin
>   plot, [0,1],[0,1]
>   plot, [0,1],[0,1]
>   plot, [0,1],[0,1]
> endfor
>
> set_plot, 'x'
> !p.multi = 0
>
> end
> ------------------------------------------------------------ -------------------------------------
>
> If n is too low (lt 29) it never produces a readable .ps file. If n is
> higher it doesn't include all pages (or for that matter all subplots
> on the last page). Sometimes the last window drawn don't contain any
> data -- at other times it only draws the horizontal axes.
>
> I'm really lost as to why this is happening.
>
> Regards,
> Soeren

I use IDL 6.4 on a unix machine btw
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: problem with multiple page postscript plots
Next Topic: Re: Ending a code listing section with IDLdoc

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

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

Total time taken to generate the page: 0.00564 seconds