Re: window colour maps [message #9938 is a reply to message #9934] |
Tue, 23 September 1997 00:00  |
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.
|
|
|