Re: log scale colorbar in IDL 8.0 [message #76096 is a reply to message #76095] |
Wed, 18 May 2011 10:26   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Paolo writes:
> Yes, we had. Well I wasn't thinking in term
> of color bars anymore but general images.
> For instance, a logarithmic y-axis is used often
> to produce spectrograms - see for instance:
>
> http://swaves.gsfc.nasa.gov/content_images/swavesf1.png
>
> note the logarithmic y-scaling
Don't you have something like this already, Paolo?
I thought you built this. If you want to turn it
into a Coyote Graphic routine, it's pretty simple.
I'll sell you a book that explains it in detail. ;-)
Actually, it's so simple you probably won't need
a book. Probably it is only a matter of using
Coyote Graphics routines internally, and it will
probably just work! (Maybe with some color modifications
so it can work in both decomposed and indexed color.)
But, if you just want log scaling on the axes, that's
already built into cgImage:
IDL> image = scale_vector(cgdemodata(7), 1, 1000)
IDL> cgimage, image, /axes, /scale, $
axkeywords={ylog:1, yrange:[1,1000]}
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.")
|
|
|