Re: Contour: difference between IDL 8.0 and IDL 8.4 [message #94186 is a reply to message #94179] |
Fri, 17 February 2017 01:55   |
burkina
Messages: 32 Registered: February 2005
|
Member |
|
|
On Thursday, 16 February 2017 12:59:39 UTC+1, burkina wrote:
> Ciao,
>
> I've upgraded from IDL 8.0 to IDL 8.4, and found a strange difference in the behaviour of CONTOUR.
>
> Here's a simple test:
>
> data = RANDOMU(seed, 9, 9)
> smooth = CONTOUR(MIN_CURVE_SURF(data), TITLE='Smoothed', RGB_TABLE=1, /FILL, c_value=[0, 0.2, 0.3, 0.5])
>
> If you launch it in IDL 8.0, you get what you (more or less) expect: three filled contours, while the outer part is the white transparent background. I need to include the '0' level, otherwise the inner contour is left blank (BTW, I find it odd, and it is the same for IDL 8.4).
>
> On the other hand, if you launch it in IDL 8.4, there's a big difference: also the outer part is filled! Of course, I can give and explicit white color to it, but it's not the same, because it is not treated as a completely transparent background. So, when you put a contour above another, in IDL 8.0 everything is fine, because the outer part is completely transparent, while in IDL 8.4, you see also this outer part. Using 'max_value=0.5' is not an equivalent solution.
>
> What changed between 8.0 and 8.4? How can I revert to the 8.0 behaviour? I basically want to draw three filled contours, and leave the white transparent background in the rest of the image.
>
> Thanks,
>
> Stefano
Hi,
just to be more specific, this is a plot I had in IDL 8.0:
https://img42.com/MOnas
and this is what I get (exactly with the same code) in IDL 8.4:
https://img42.com/KSkRc
As you can see, in the latter the background of the reddish contour plot is still visible, because it's indeed a filled contour level, while in IDL 8.0 it is simply background. How can I get rid of it?
Something clearly changed after IDL 8.0, I hope there's some kind of switch/parameter that I don't understand that can be set to have the old behaviour. I even thought about reconstructing the contour levels polygons, and then fill them, but, apparently, there's no way to get the polygons in function graphics (!?).
Thanks,
Stefano
P.S. I had a chance to test this code on IDL 8.2, and it behaves like 8.4.
|
|
|