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

Home » Public Forums » archive » Re: Widget color tables
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: Widget color tables [message #14643] Tue, 16 March 1999 00:00
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
throop@colorado.edu wrote:
> Thanks -- but it doesn't work; I get the same behavior.
> In both cases, IDL really _does_ seem to be allocating the
> color table -- it's just not swapping it in at the proper time.

A couple of things to try:

(1) How many colors does the startup file report, just after you start
IDL?

(2) On Sun boxes which use the CDE desktop, the default 'Colors' setting
may not allow IDL to allocate enough colors. On the CDE taskbar, click
on the icon which shows a color palette. Then select 'Colors', 'Number
of Colors', 'Most Colors for Applications'. I think you'll need to
logout and log back in for the changes to take effect.

Does this make any difference?

---
Liam E. Gumley
Space Science and Engineering Center, UW-Madison
http://cimss.ssec.wisc.edu/~gumley
Re: Widget color tables [message #14646 is a reply to message #14643] Tue, 16 March 1999 00:00 Go to previous message
throop is currently offline  throop
Messages: 8
Registered: August 1998
Junior Member
In article <36ED957B.2D06B714@ssec.wisc.edu>,
Liam Gumley <Liam.Gumley@ssec.wisc.edu> wrote:
> throop@colorado.edu wrote:
>> I'm having problems setting the color table properly in a widget
>> program. IDL 5.2, sparc ultra, 8-bit display. Here's the situation:
>> o The problem is that the loadct command appears to be completely
>> ignored; the color table is just not set, or at least not displayed.
>> Instead, my default desktop color table is used. help, /device tells
>> me that indeed a 100-element private color map is assigned.
>> o I've found that if, before or after the widget is realized,
>> I create a non-widget window:
>> and move the cursor _into that window_, the color table for the widget
>> will be properly displayed and updated, as long as the cursor's in
>> that window. It appears that idl may be setting the color table
>> properly, but only displaying it when the cursor is in a draw window,
>> and not when the cursor's in a widget window.
>
> The following IDL startup file should be an effective cure for this
> problem:
>
> ;---cut here---
> ;- Set up 8 bit display and grab colors
>
> if !version.os_family eq 'unix' then device, pseudo = 8
> device, retain = 2, decomposed = 0
> window, /free, /pixmap, colors = -5
> plot, [ 0 ]
> wdelete, !d.window
> print, 'Number of colors is ', !d.n_colors

Thanks -- but it doesn't work; I get the same behavior.
In both cases, IDL really _does_ seem to be allocating the
color table -- it's just not swapping it in at the proper time.

-Henry
------------------------------------------------------
| Henry Throop throop@colorado.edu (303) 492-1628 |
------------------------------------------------------
| Laboratory for Atmospheric and Space Physics |
| University of Colorado, Boulder 80309-0392 |
------------------------------------------------------

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Re: Widget color tables [message #14649 is a reply to message #14643] Mon, 15 March 1999 00:00 Go to previous message
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
throop@colorado.edu wrote:
> I'm having problems setting the color table properly in a widget
> program. IDL 5.2, sparc ultra, 8-bit display. Here's the situation:
> o The problem is that the loadct command appears to be completely
> ignored; the color table is just not set, or at least not displayed.
> Instead, my default desktop color table is used. help, /device tells
> me that indeed a 100-element private color map is assigned.
> o I've found that if, before or after the widget is realized,
> I create a non-widget window:
> and move the cursor _into that window_, the color table for the widget
> will be properly displayed and updated, as long as the cursor's in
> that window. It appears that idl may be setting the color table
> properly, but only displaying it when the cursor is in a draw window,
> and not when the cursor's in a widget window.
> | Henry Throop throop@colorado.edu (303) 492-1628 |
> | Laboratory for Atmospheric and Space Physics |
> | University of Colorado, Boulder 80309-0392 |

The following IDL startup file should be an effective cure for this
problem:

;---cut here---
;- Set up 8 bit display and grab colors

if !version.os_family eq 'unix' then device, pseudo = 8
device, retain = 2, decomposed = 0
window, /free, /pixmap, colors = -5
plot, [ 0 ]
wdelete, !d.window
print, 'Number of colors is ', !d.n_colors

;- Set graphics and widget font sizes

device, set_character_size = [ 6, 9 ]
widget_control, default_font = '7x13'

;- ensure IDL 5.0 XMANAGER behavior is consistent with IDL 4.0

xmanager, catch = 0
;---cut here---

Just set the environment variable IDL_STARTUP to the full name and path
of the startup file. It will then be executed every time you start IDL.

Cheers,
Liam.
PS Didn't IDL get started at LASP way back when?

---
Liam E. Gumley
Space Science and Engineering Center, UW-Madison
1225 W. Dayton St., Madison WI 53706, USA
Phone (608) 265-5358, Fax (608) 262-5974
http://cimss.ssec.wisc.edu/~gumley
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: concat of %1 to a sav file
Next Topic: Re: problems printing labels on graphs

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

Current Time: Wed Oct 08 16:50:24 PDT 2025

Total time taken to generate the page: 0.00610 seconds