Re: How to make color-scale legend [message #1000 is a reply to message #852] |
Tue, 13 April 1993 03:15  |
ruckman
Messages: 3 Registered: February 1993
|
Junior Member |
|
|
In article <1qcqrbINNm7f@elroy.jpl.nasa.gov> ian@gomez.Jpl.Nasa.Gov (H. Ian Novack) writes:
> In article <34196@oasys.dt.navy.mil> ruckman@oasys.dt.navy.mil writes:
>> Is there a way to make a color-scale legend for a 3-D plot or image? By
> ....
> Well, when I need such a box, I just make an array and fill each line with
> a value from 0 to 255. The lines are in increasing or decreasing order. Then
> I display it in an appropriate spot in the window, and read the screen into
> a variable to make the combined image.
I found a solution in a group of procedures available by anonymous ftp. There is
a procedure called TVIM that displays an image with axes, a title, and a color
scale.
I had to make a minor modification that I suspect is needed often by users of
IDL for Windows. The procedures use different techniques depending on the current
device, but they were written before the 'WIN' device existed. Therefore, whenever
I found a command such as
if !d.name eq 'X' then begin
I had to change it to
if !d.name eq 'X' or !d.name eq 'WIN' then begin
I also modified the color scale legend to show the exponent separately when
the numbers are very small or large. In other words, rather than showing the
values as x.xxe-yy, I show them as x.xx and then put the exponent at the bottom.
Anyone interested in the modifications should e-mail me.
--
Chris Ruckman - ruckman@oasys.dt.navy.mil | This .sig brought to you by
Hull Structures Acoustics, Code 741 | your local Chevrolet bottler.
Carderock Division, NSWC |
|
|
|