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

Home » Public Forums » archive » Re: window colour maps
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: window colour maps [message #9938 is a reply to message #9934] Tue, 23 September 1997 00:00 Go to previous message
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
Peter Gallagher wrote:

> Does anyone know how to select a separate colour map for several
> windows? I am currently working with 2 windows; I want one window
> with a black and white colour map and the other with a red temp.
> colour table.

It's pretty easy: just split the color table in half as shown below.

;------------------------------------------
pro test

;- create two windows and save their window ids

window, /free
w1 = !d.window
window, /free
w2 = !d.window

;- assign colors for window 1

bottom1 = 0L
ncolors1 = !d.table_size / 2

;- assign colors for window 1

bottom2 = ncolors1
ncolors2 = !d.table_size - ncolors1

;- display an image in the first window with a greyscale color table

wset, w1
loadct, 0, bottom = bottom1, ncolors = ncolors1
tv, bytscl( dist(256), top = ncolors1 - 1 ) + byte( bottom1 )

;- display an image in the second window with a red/white color table

wset, w2
loadct, 3, bottom = bottom2, ncolors = ncolors2
tv, bytscl( dist(256), top = ncolors2 - 1 ) + byte( bottom2 )

end
;------------------------------------------

Cheers,
Liam.
[Message index]
 
Read Message
Read Message
Previous Topic: Q: Clear everything in IDL?
Next Topic: Re: _EXTRA keywords not noticed

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

Current Time: Wed Oct 08 17:06:03 PDT 2025

Total time taken to generate the page: 0.00437 seconds