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

Home » Public Forums » archive » Re: shading/outlining on surface plot
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: shading/outlining on surface plot [message #82759 is a reply to message #82758] Fri, 18 January 2013 09:25 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Bob Plano writes:

> I probably didn't pick a very good example of what I'm trying to do,
> in that the 'pixels' on the surface plot I want to outline are not
> necessarily contiguous. That is to say, out of a 64 by 64 surface,
> there might be a few dozen points that need to be highlighted or
> outlined, at (apparently) random locations. So, contours won't work,
> at least not in a straightforward way.
>
> I wonder if it's possible to do something like:
>
> shade_surf,z,x,y,shades=col, where most of the col array has values
> that are 'invisible'. I don't suppose there is such a thing...

Actually, something like this works pretty well:

peak = cgdemodata(2)
markedData = Round(Randomu(-5L, 50) * (41*41))
cgLoadCT, 0, /Brewer, /Reverse, NColors=254
markedColor = 'red'
TVLCT, cgColor('red', /Triple), 255
markedImage = BytScl(peak, top=254)
markedImage[markedData] = 255
cgSurface, peak, texture_image=markedimage
END

Here is the result:

http://www.idlcoyote.com/misc/marked_image.png

You see one small problem with a very dark green pixels at the very top
of the data range. I know what causes this and can fix it easily, if you
think something like this works for you.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Destroying objects
Next Topic: CgWindow and multiple plots

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

Current Time: Fri Oct 10 13:38:56 PDT 2025

Total time taken to generate the page: 0.56255 seconds