Re: Fill intersection of two contours [message #55446] |
Thu, 23 August 2007 02:23  |
burkina
Messages: 32 Registered: February 2005
|
Member |
|
|
On Aug 22, 5:22 pm, Brian Larsen <balar...@gmail.com> wrote:
> While I am sure there is a much more elegant solution this one works
> pretty well. I have hacking this kinda thing together before. I
> would love to see the more elegant solution...
>
> dat = dist(100)
> loadct, 0
> contour, dist(100), /fill, nlevels=20
> mask = dat gt 30 and dat lt 40
> loadct, 12
> contour, mask*100, /over, /fill, nlevels=1
> end
>
> To be more specific on the filled region you might need to specify the
> contours in the original plot so that the colored region falls on top
> of it nicely.
>
> Cheers,
>
> Brian
>
> ------------------------------------------------------------ ---------------------
> Brian Larsen
> Boston University
> Center for Space Physics
Hi Brian,
thanks for the reply.
The method you are suggesting me is the one I was thinking about.
Unfortunately, it does not work as I wish, because the 'mask' is not
coincident with the contours' region. It must be the way the contour
procedure works. The two regions are similar, of course, but the
difference is not acceptable for my plot.
I guess the solution should be a graphical one, in the sense that the
contours produced by the contour procedure should be treated as
polygons, with their coordinates, and then, in some way, their
intersection should be found in this way, not in an analytical way.
I hoped this problem had been solved by someone else, since it sould
be quite useful in this kind of plots...
Stefano
|
|
|