[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: filled closed curve



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