Line plots with filled regions? (was: Star chart and better poly_area? [message #12326] |
Mon, 13 July 1998 00:00  |
dEdmundson
Messages: 23 Registered: February 1998
|
Junior Member |
|
|
In article <35A72423.5B448CC9@lanl.gov>, bill4@lanl.gov wrote:
> Does anyone know if anyone has developed a good poly_area function for
> IDL? The current version does not handle non-simple polygons at all.
On a related note, I saw a seminar last week in which the speaker
had beautiful XY plots with different regions done in different colours.
When a plot line indicates a dividing line between different regions of
interest, the use of colour is a great aid to understanding.
The question is: how can one achieve this in IDL? I am interested in
writing a very general object that takes sets of XY plot data and can
fill interior regions with different colours. This amounts to: given
sets of lines and a bounding box (the axes), locate all the closed
polygons.
Comments?
Darran.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
|
|
|
Re: Line plots with filled regions? (was: Star chart and better poly_area? [message #12363 is a reply to message #12326] |
Thu, 16 July 1998 00:00  |
William H Dorin IV
Messages: 5 Registered: June 1998
|
Junior Member |
|
|
<HTML>
dEdmundson@Bigfoot.com wrote:
<BLOCKQUOTE TYPE=CITE>In article <35A72423.5B448CC9@lanl.gov>, bill4@lanl.gov
wrote:
<BR>> Does anyone know if anyone has developed a good poly_area function
for
<BR>> IDL? The current version does not handle non-simple polygons
at all.
<P>On a related note, I saw a seminar last week in which the speaker
<BR>had beautiful XY plots with different regions done in different colours.
<BR>When a plot line indicates a dividing line between different regions
of
<BR>interest, the use of colour is a great aid to understanding.
<P>The question is: how can one achieve this in IDL? I am interested
in
<BR>writing a very general object that takes sets of XY plot data and can
<BR>fill interior regions with different colours. This amounts to:
given
<BR>sets of lines and a bounding box (the axes), locate all the closed
<BR>polygons.
<P>Comments?
<P>Darran.
<P>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
<BR><A HREF="http://www.dejanews.com/rg_mkgrp.xp">http://www.dejanews.com/rg_mkgrp.xp</A>
Create Your Own Free Member Forum</BLOCKQUOTE>
You know, I'm working with a very similar problem right now as well.
As it happened, I gave up on quadrilaterals and turned to triangles (which
I should have thought of to start with). Fortunately, my points are
associated to start with, so polygons are rather an easy task. For
a general set of (x,y,value) data points, maybe approaching it along the
lines of:
<P>pick a point
<BR>find two nearest neighbors
<BR>poly_fill ([point(0), neighbor1(0), neighbor2(0)],[point(1), neighbor1(1),
neighbor2(1)], color=avg. value of the three)
<BR>repeat until done
<P>which is essentially what I'm doing. it doesn't work so well on
Map_set, because of the north/south polar problem. I've found that
if you have regular xy data, it makes your job a lot easier.
<P>Wm.
<PRE>--
****************************
William H Dorin IV
NIS-1, LANL &n bsp;
505-665-7682</PRE>
</HTML>
|
|
|