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

Home » Public Forums » archive » Density contour curves
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
Density contour curves [message #15825] Thu, 10 June 1999 00:00
Eric Williams is currently offline  Eric Williams
Messages: 14
Registered: April 1997
Junior Member
I am wondering if there is a better way of doing solving this problem:

I have a set of data (x,y coordinates) that represent a distribution
(actually the 2-D spatial distribution of a star field). I would like to
show the position of the stars and then overplot contours curves that
convey the spatial density of the stars. Here is my simplistic first approach:

************
array = fltarr(n,m)*0 ;n & m are dimensions I pick
;depending on the range of x,y values

for n=0,n_elements(x)-1 do array[x[n],y[n]]=1

sarray = smooth(array,5) ;3,5,7,9 for smooth depending
;on resolution I want, I guess

plot,x,y,psym=3

contour,sarray,/overplot ;with levels if desired.

************

So, is using smooth bogus? I did it to try and make the contours
smoother, but I don't understand if it would be better to not use them.
Is there a better/more proper way to do something like this?


Thanks for any suggestions!

Eric Williams
eric@astro.wesleyan.edu
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: axis: color and fonts - how to change it?
Next Topic: retrieving standard error stream from IDL

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

Current Time: Wed Oct 08 15:11:08 PDT 2025

Total time taken to generate the page: 0.00552 seconds