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 #82771 is a reply to message #82762] Thu, 17 January 2013 21:27 Go to previous messageGo to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Thursday, January 17, 2013 11:09:38 AM UTC-7, David Fanning wrote:
> Bob Plano writes:
>
>
>
>> Sorry if this is a dumb question, but....
>
>>
>
>> I'd like to make a surface or shade_surf plot, and outline areas on
>
>> the surface. The basic idea is here:
>
>>
>
>>
>
>>
>
>> make_2d_gaussian,arr,xx,yy ;xx and yy are 2D
>
>> grid point arrays
>
>>
>
>> shade_surf, arr,xx,yy,shades=whatever
>
>>
>
>> keep=where( arr gt .5*max(arr) and arr lt .7*max(arr) )
>
>>
>
>> sub_outline_procedure,arr(keep),xx(keep),yy(keep) ???????????????????
>
>>
>
>>
>
>>
>
>> Is there a relatively easy way to do this?
>
>
>
> No, there are no easy ways to do this, I don't believe, although maybe
>
> this is a case where function graphics can come to the rescue. One
>
> problem is writing on the surface. It is very difficult to know,
>
> unfortunately, where the actual surface *is*, due to round-off errors,
>
> mostly.
>
>
>
> You might try drawing a contour line on top of an image, then using that
>
> to drape over the surface, but I don't expect good results. :-(
>
>
>
> 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.")

Hi Bob,

How about something like the following:

; Sample data, stored in the "elev" variable
RESTORE, FILEPATH('marbells.dat', $
SUBDIRECTORY=['examples', 'data'])

s = SURFACE(elev, COLOR='brown')

; Give two colors so we fill in between the contour level and the top.
c = CONTOUR(elev, C_VALUE=3800, PLANAR=0, /OVERPLOT, /FILL, $
C_COLOR=['white','white'], RGB_TABLE=0)

; Turn off labels, which are on by default.
c = CONTOUR(elev, C_VALUE=3800, PLANAR=0, /OVERPLOT, $
C_COLOR=0, RGB_TABLE=0, C_LABEL_SHOW=0, C_THICK=4)

Cheers,
Chris
ExelisVIS
[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 17:49:54 PDT 2025

Total time taken to generate the page: 1.52328 seconds