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

Home » Public Forums » archive » Re: Change default value of system variable?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Change default value of system variable? [message #23835 is a reply to message #23825] Fri, 23 February 2001 11:56 Go to previous messageGo to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
Craig Markwardt wrote:
>
> "K. Bowman" <k-bowman@null.tamu.edu> writes:
>> I prefer to plot with black lines on a white background, so in my
>> idl_startup file I include
>>
>> !P.BACKGROUND = COLOR_24('white') ;Set background color to white
>> !P.COLOR = COLOR_24('black') ;Set default draw color to black
>>
>> (COLOR_24 is my own routine.)
>>
>> This works fine until I change plot devices and then change back, viz.
> ... deleted ...
>>
>> This means that I have to include code to set !P.BACKGROUND and
>> !P.COLOR in every time I switch graphics devices. Is there any way to
>> change the default value of a built-in system variable?
>
> You could simply save and restore the entire !P variable, right?
>
> old_p = !p
> set_plot, 'ps'
> ...
> set_plot, 'x'
> !p = old_p

I do this (relatively) religiously. Haven't ever had any problems (as long as the code
doesn't crash or I don't Ctrl-C before the restoration statement).

> and you have the satisfaction
> that you didn't miss any stray graphics keywords by accident.

exact-o-moe

paulv

--
Paul van Delst A little learning is a dangerous thing;
CIMSS @ NOAA/NCEP Drink deep, or taste not the Pierian spring;
Ph: (301)763-8000 x7274 There shallow draughts intoxicate the brain,
Fax:(301)763-8545 And drinking largely sobers us again.
pvandelst@ncep.noaa.gov Alexander Pope.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: !EXCEPT
Next Topic: Re: reading files with date- and time - columns

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

Current Time: Fri Oct 10 05:11:22 PDT 2025

Total time taken to generate the page: 0.40062 seconds