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

Home » Public Forums » archive » Re: filled closed curve
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: filled closed curve [message #25538] Thu, 28 June 2001 08:10
Andy Loughe is currently offline  Andy Loughe
Messages: 174
Registered: November 1995
Senior Member
Jochen Weller wrote:
>
> Hello
>
> I am relatively new to IDL and have the following question.
>
> I have a data file which contains the x and y coordinate of a closed
> curve. I would like to shade the area inside the curve with a different
> color.
> Does anybody know how to do this ?

Is this what you are looking for...

;; Color 0=black, 1=gray, 2=white
tvlct, [0,130,255], [0,130,255], [0,130,255]
!p.background=2 ;; white background
contour, dist(30), levels=[10, 20, 30]
contour, dist(30), levels=[0,20,30], c_color=[1,0], /over, /fill



Andrew Loughe =====================================================
NOAA/OAR/FSL/AD R/FS5 | email: loughe@fsl.noaa.gov
325 Broadway | wwweb: www-ad.fsl.noaa.gov/users/loughe
Boulder, CO 80305-3328 | phone: 303-497-6211 fax: 303-497-6301
Re: filled closed curve [message #25541 is a reply to message #25538] Thu, 28 June 2001 07:29 Go to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Hi,

To shade the polygon on the current display (assuming you are using
direct graphics), try the POLYFILL procedure. You should set up a
coordinate system before calling POLYFILL unless you want to draw
directly in device (pixel) coordinate space.

Something like:

PLOT, X, Y, /NoData, /YNoZero, ...

POLYFILL, X, Y, Color = myColor, /Data


Ben


Jochen Weller wrote:
>
> Hello
>
> I am relatively new to IDL and have the following question.
>
> I have a data file which contains the x and y coordinate of a closed
> curve. I would like to shade the area inside the curve with a different
> color.
> Does anybody know how to do this ?
>
> Cheers
> Jochen
>
> ************************************************************ ******************
> * Jochen Weller Tel. +44 1223 337941 *
> * D.A.M.T.P. Fax: +44 1223 765900 *
> * Centre for Mathematical Sciences *
> * University of Cambridge www: www.damtp.cam.ac.uk/user/jw249/ *
> * Wilberforce Road e-mail: J.Weller@damtp.cam.ac.uk *
> * Cambridge, CB3 0WA *
> * U.K. *
> ************************************************************ ******************

--
Ben Tupper
Bigelow Laboratory for Ocean Sciences
180 McKown Point Rd.
W. Boothbay Harbor, ME 04575
btupper@bigelow.org
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: svd experts?
Next Topic: Re: IDL and 'nice' question

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

Current Time: Wed Oct 08 15:52:54 PDT 2025

Total time taken to generate the page: 0.00367 seconds