Re: problem with multiple page postscript plots [message #73679] |
Mon, 22 November 2010 07:35 |
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  |
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  |
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  |
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  |
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
|
|
|