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

Home » Public Forums » archive » log scale colorbar in IDL 8.0
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
log scale colorbar in IDL 8.0 [message #76113] Tue, 17 May 2011 13:25 Go to previous message
Kim is currently offline  Kim
Messages: 19
Registered: January 2009
Junior Member
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.

Thank you for your assistance,
Kim
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to run a program in a loop or batch mode
Next Topic: cgsnapshot-->dialog_pickfile:Bad initial filename

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

Current Time: Wed Oct 08 16:12:44 PDT 2025

Total time taken to generate the page: 0.00466 seconds