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

Home » Public Forums » archive » Re: FSC_contour & NaN
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: FSC_contour & NaN [message #74482 is a reply to message #74481] Wed, 19 January 2011 10:26 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
kisCA writes:

> I will try that one but don't really know how to make the NaN the
> color I want.
> What if I use a missing value instead of NaNs (like -999.99) ?

missing = Where(data EQ -999.99, count)
IF count GT 0 THEN data[missing] = !Values.F_NAN
scaledData = BytScl(data, Top=253, /NAN)
LoadCT, 33, NColors=254
TVLCT, FSC_Color('white', /Triple), 254
IF count GT 0 THEN scaledData[missing] = 254
TVImage, data

Cheers,

David

P.S. I'll put you down for a copy from the first printing
run. :-)

--
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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Blanking all 5x5 windows with less than X 'on' pixels in them
Next Topic: Re: Line plot missing data points?

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

Current Time: Thu Oct 09 21:08:07 PDT 2025

Total time taken to generate the page: 0.71873 seconds