"MC" <moreflaps@gmail.com> wrote in message
news:024c0aea-71d7-4c31-bdc0-82da8e5eb3a1@r10g2000vbc.google groups.com...
> On Sep 25, 4:44 am, Paul <paulsta...@gmail.com> wrote:
>> I've noticed an irritating - I'm going to say it's an artifact - in
>> the new contour function. Take
>>
>> myData = [[32.7759, 30.8012, 27.8589, 24.6717, 22.2133, 20.4595,
>> 19.0960, 18.1344, 17.4240, 16.8068, 16.2542], $
>> [19.7536, 18.1935, 16.3065, 14.5951, 13.7175, 13.4065, 13.3468,
>> 13.6542, 14.1716, 14.7347, 15.3102]]
>> CONTOUR, myData
>> !null = CONTOUR(myData)
>>
>> You get it, too? Ideas? (If you're not seeing it, the contour function
>> on my machines here creates a bit of a jagged mess, while the contour
>> procedure plots nice, smooth lines.)
>
> Correctly contouring such a 'narrow' data set is problematic, if you
> pad the edges by replication, does the output improve? I'm not sure
> but I suspect the problem may be related to the inability to define
> contour curvature when the data is just 2 elements wide?
>
> Hope this helps.
I think that is the problem. I don't think anyone can reasonably expect a
two row vector to be nicely contoured.
A simple rebin
mydata = rebin(mydata,22,4)
reduces that jaggedness. However, it is still present and it is still
worse than the DG contour procedure.
Another very strange thing, in order to directly compare the contour lines,
I used the nlevels (and then n_levels) keywords
and for the NG, it would never draw more than 6 contours, and it always drew
n_levels-2 contours when less than 8.
Very strange.
Even worse, when they both draw 5 contour lines, they are actually very
different (well the first 4 are similar, but
the final one outlining the small dip at the top, appears very different.
cheers,
bob
Here is my minor modification,
myData = [[32.7759, 30.8012, 27.8589, 24.6717, 22.2133, 20.4595, 19.0960,
18.1344, 17.4240, 16.8068, 16.2542], $
[19.7536, 18.1935, 16.3065, 14.5951, 13.7175, 13.4065, 13.3468, 13.6542,
14.1716, 14.7347, 15.3102]]
mydata = rebin(mydata,22,4)
CONTOUR, myData,nlevels=5
!null = CONTOUR(myData,n_levels=7)
end
|