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

Home » Public Forums » archive » Re: isodensity contours
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: isodensity contours [message #75279 is a reply to message #75273] Wed, 23 February 2011 12:06 Go to previous messageGo to previous message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
On Feb 23, 2:12 pm, Paolo <pgri...@gmail.com> wrote:
> On Feb 23, 1:24 pm, Gray <grayliketheco...@gmail.com> wrote:
>
>> Hi all,
>
>> I have a scatterplot with a bunch of points on it.  I'd like to plot
>> isodensity contours to include 99%, 90%, 75%, and 50% of my points.
>> How do I set up my data to give to cgContour?  Thanks!
>
>> --Gray
>
> If I understand this correctly, you have two arrays
> x and y of coordinates of N points.
>
> To contour them, you need first to create a
> density array from your dataset - basically
> you divide the xrange and yrange of your data
> in a number of bins and the density array will
> tell you how many points lie in each bin.
>
> Then you can use the normal contour procedures.
>
> So how you do partition the data into the density
> array? hist_2d will do that for you.
>
> Ciao,
> Paolo

I thought I posted this already... if it shows up twice, I'm sorry.

Upon further reflection, I think that "isodensity contours" are not
exactly what I want, though I may need to use them anyway (as
described by Paolo) if I can't figure out a way to do EXACTLY what I
want.

Here's some more detail on my issue. I have a plot for which the x-
axis is stellar magnitude in one image, and the y-axis is stellar
magnitude in a different image. I have two populations of stars (pop
A and pop B). Pop A is pretty clustered, but the cluster is sort of
smeared out so I can't use a simple centroid. I'd like to see where
the pop B stars lay on the plot in relation to the pop A stars by
plotting contours showing what percentage of pop A stars are within
them (99%,90%,75%,50%). Is this doable without getting really
complicated, or should I use the isodensity contours instead?

An example image is at http://tinypic.com/r/2mepz4/7
The black points are pop A and the colored symbols are pop B.

Thanks for your help!

--Gray
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PropertySheet COLOR property
Next Topic: isodensity contours

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

Current Time: Thu Oct 09 23:36:08 PDT 2025

Total time taken to generate the page: 0.56165 seconds