Re: !P.Background: Colours impossible? [message #13784] |
Mon, 14 December 1998 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Harald (hvdosten@aol.com) writes:
> isn't it possible to create coloured backgrounds (need it for publications)
> like
>
> !P.BACKGROUND=[r,g,b] ?
>
> The online-manual referres only for =0B and =255B. Trying =[r,g,b] leads to an
> error on the next line:
>
> %Expression must be a scalar in this context: <LONG Array[3]>
The proper syntax for loading a background color would be
something like this:
TVLCT, r, g, b, !P.Background
But you mention that you need a background color "for publications".
This often means PostScript output. In PostScript you can
have any background color you like, as long as it's white. :-)
Seriously, to make it something else requires a bit more
work. I usually load my background color somewhere near the
top of my color table and use a Polyfill command, like this:
Polyfill, [1,1,0,0,1], [1,0,0,1,1], /Normal, Color=230
If this is the kind of thing you need, you can find more details
from this article on my web page:
http://www.dfanning.com/tips/ps_backcolor.html
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Progamming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|