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

Home » Public Forums » archive » Re: 24-bit color contour
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: 24-bit color contour [message #27879] Sat, 10 November 2001 07:38 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
tom (tom2959@21cn.com) writes:

> Sometimes, the contour plot was displayed by adding on a TV or TVscl plot.
> For example,
> data=fltarr(n,n)
> tv,data,/true
> contour,data
> may be wrong. How to to display the data in a 24 bit color?

Well, your example is certainly wrong, because
a 24-bit image is a 3D array, not a 2D. But there
is no problem at all putting a 24-bit image underneath
a contour plot. The question really is this: what are
you going to contour? Not the 24-bit image, since that
is made up of color triples and doesn't represent
(almost certainly) a physical quantity.

If you had a 24-bit image that you will to place
under a contour plot, and a 2D array of some
physical quantity you wish to contour, then you
can do this:

plotPosition =[0.15, 0.15, 0.9, 0.9]
TVImage, image24, Position=plotPosition
Contour, data, /NoErase, XStyle=1, YStyle=1, $
Position=plotPosition

That will work on the display and in PostScript.
(In fact, the same commands will work with a 2D
image as well.) The TVImage program can be found
on my web page:

http://www.dfanning.com/programs/tvimage.pro

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: IDL SpecII results
Next Topic: problem with "xloadct"

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

Current Time: Sat Oct 11 02:33:38 PDT 2025

Total time taken to generate the page: 1.99796 seconds