completely reset PostScript device between plots? [message #30373] |
Fri, 26 April 2002 22:33  |
noymer
Messages: 65 Registered: June 1999
|
Member |
|
|
Dear Comp.Lang.IDL-PVwave,
I have a program that generates three separate EPS graphs in IDL
(5.3) direct graphics. This must be a FAQ but searching Google didn't
yield anything. You guys have been particularly patient with my
questions in the past, so I'm going to venture a post.
The PS device is remembering something about prior graphs and it's
messing up the later graphs. They are the wrong size, etc. I tried
to mess around with various settings (charsize, etc., etc.) but none
of them seem to fix the problem. If I skip a prior graph, the problem
goes away for the subsequent one. Is there not a way just to reset
totally the PS device between plots without getting lost in resetting
every little thing? (or just some other way to prevent this problem?)
Just to be perfectly clear, this is not a !P.Multi issue: I have
three separate graphs in three separate Encapsulated Post Script
files.
I have flags that indicate which graphs to do. I usually want to
draw all three graphs, so I do: "FOO, 1,1,1" at the IDL prompt. If I
want only the middle graph, it would be "FOO, 0,1,0" - and so on. So,
for now, I can solve the problem by calling the program three separate
times (1,0,0; 0,1,0; 0,0,1). But there must be a better way. I built
the flags for reasons other than to work around this problem, and in
fact before I noticed the problem, so it's not a big deal for the time
being. But I'd like to know how to do this without the kludge.
TIA,
Andrew
|
|
|
Re: completely reset PostScript device between plots? [message #30498 is a reply to message #30373] |
Tue, 30 April 2002 04:26  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
noymer@socrates.Berkeley.EDU wrote:
>
> Reimar Bauer <r.bauer@fz-juelich.de> writes:
>
>> You can save the system variables before each plot and restore them
>> back afer one plot.
>>
>> http://www.fz-juelich.de/icg/ [...] /savesysvar.tar.gz + restsysvar.tar.gz
>>
>
> Dear Reimar,
>
> Thanks!
>
> Let me ask you:
>
> This:
> ; EXAMPLE:
> ; save = savesysvar()
> ; ..... plotting ....
> ; restore, save
>
> Should read:
> ; EXAMPLE:
> ; save = savesysvar()
> ; ..... plotting ....
> ; restsysvar, save
>
> No? Either that or I'm confused.
>
> Also: it doesn't work. I must be changing something that is not
> saved/restored by your code, which looks to be useful generally speaking.
>
> -Andrew
Thanks for this info
Can you try another trick,
save,file='sysv.sav',/SYSTEM_VARIABLES
..... plotting ....
restore,file='sysv.sav'
..... plotting ....
If this works then I like to add some more ! variables to our
routines. (If I know which)
Reimar
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
============================================================ =======
|
|
|
Re: completely reset PostScript device between plots? [message #30503 is a reply to message #30373] |
Mon, 29 April 2002 10:34  |
noymer
Messages: 65 Registered: June 1999
|
Member |
|
|
Reimar Bauer <r.bauer@fz-juelich.de> writes:
> You can save the system variables before each plot and restore them
> back afer one plot.
>
> http://www.fz-juelich.de/icg/ [...] /savesysvar.tar.gz + restsysvar.tar.gz
>
Dear Reimar,
Thanks!
Let me ask you:
This:
; EXAMPLE:
; save = savesysvar()
; ..... plotting ....
; restore, save
Should read:
; EXAMPLE:
; save = savesysvar()
; ..... plotting ....
; restsysvar, save
No? Either that or I'm confused.
Also: it doesn't work. I must be changing something that is not
saved/restored by your code, which looks to be useful generally speaking.
-Andrew
|
|
|
Re: completely reset PostScript device between plots? [message #30508 is a reply to message #30373] |
Mon, 29 April 2002 03:55  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
noymer@socrates.Berkeley.EDU wrote:
>
> Dear Comp.Lang.IDL-PVwave,
>
> I have a program that generates three separate EPS graphs in IDL
> (5.3) direct graphics. This must be a FAQ but searching Google didn't
> yield anything. You guys have been particularly patient with my
> questions in the past, so I'm going to venture a post.
>
> The PS device is remembering something about prior graphs and it's
> messing up the later graphs. They are the wrong size, etc. I tried
> to mess around with various settings (charsize, etc., etc.) but none
> of them seem to fix the problem. If I skip a prior graph, the problem
> goes away for the subsequent one. Is there not a way just to reset
> totally the PS device between plots without getting lost in resetting
> every little thing? (or just some other way to prevent this problem?)
>
> Just to be perfectly clear, this is not a !P.Multi issue: I have
> three separate graphs in three separate Encapsulated Post Script
> files.
>
> I have flags that indicate which graphs to do. I usually want to
> draw all three graphs, so I do: "FOO, 1,1,1" at the IDL prompt. If I
> want only the middle graph, it would be "FOO, 0,1,0" - and so on. So,
> for now, I can solve the problem by calling the program three separate
> times (1,0,0; 0,1,0; 0,0,1). But there must be a better way. I built
> the flags for reasons other than to work around this problem, and in
> fact before I noticed the problem, so it's not a big deal for the time
> being. But I'd like to know how to do this without the kludge.
>
> TIA,
> Andrew
>
>
You scripts or the plot itselfs changes some system variables.
This is normal but in your case you should set them back to a previous
state.
You can save the system variables before each plot and restore them
back afer one plot.
This could be done by:
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/savesysvar.tar.gz
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/restsysvar.tar.gz
For further routines please have a look at
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
regards
Reimar
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
============================================================ =======
|
|
|