Re: log scale colorbar in IDL 8.0 [message #76106 is a reply to message #76103] |
Wed, 18 May 2011 07:35   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Kim writes:
>
> Hello,
>
> I have just started using the new graphics routines in IDL 8.0/8.1 and
> am trying to incorporate them into an extensive set of customized
> plotting and image type routines. I am able to use the IMAGE function
> to display some log-normally distributed data, however I am unable to
> create a colorbar that reflects the log-transformed data.
>
> Here is a simplified example:
> ; Read the data array
> ; Convert the scaled float array (using ALOG10) to a byte array
> im = IMAGE(bytedata)
> cb =
> COLORBAR(target=im,tickvalues=[0.01,0.03,0.1,0.3,1.0,3.0,10. 0,30.0],tickname=['.
> 01','.03','.1','.3','1','3','10','30'], title='Log Data')
>
> Some specific questions:
> 1) How do you scale the color bar so that it reflects the scaled data?
> 2) If tickvalues are supplied, can you also input ticknames? In the
> above example, the supplied ticknames are not used and instead the
> ticknames are derived from the tickvalues. The only way I have been
> able to use the ticknames is to remove the tickvalues keyword.
> 3) Is it possible to set minimum and maximum color or value ranges?
> For example, in one of my commonly used rgb_tables, the 0 value is
> black and above 250 are various shades of gray. How do I set it so
> that mincolor=1 and maxcolor=250?
> 4) Is it possible to create a colorbar that is independent of some
> specified data? It would be very useful to be able to create a
> colorbar just using a user supplied data range instead of being
> directly linked to a specfic data field. There are times when I need
> to create stand alone colorbars and I can't figure out how to do this
> with the COLORBAR function.
No takers!?
I'd propose another contest to write a log-scaled color bar function
in the iTool style, but I'm not sure I could handle another three
months of complete silence. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|