Bug in ListContourPlot?

123 views
Skip to first unread message

Barak Shoshany

unread,
Apr 28, 2011, 6:36:55 AM4/28/11
to
Please copy and paste this into a Mathematica notebook:

ListContourPlot[{{0.42256875000000005`, 3091.38125`,
8.271213205043878`}, {0.42256875000000005`, 3092.00625`,
6.266039117378199`}, {0.4263187500000001`, 3091.38125`,
5.613752062730342`}, {0.4263187500000001`,
3092.00625`, -5.684341886080802`*^-14}, {0.4263187500000001`,
3092.63125`, 5.599651386371079`}, {0.43006875000000006`,
3092.00625`, 6.059667975471868`}}]

When I execute this code on my computer (Mathematica v8.0.1, Windows 7
x64), the Mathematica kernel hangs. Does this happen to anyone else as
well?

Barak

DrMajorBob

unread,
Apr 29, 2011, 7:31:52 AM4/29/11
to
At my iMac, the computation didn't "hang", but it seemed to, for a few
seconds, and then murdered the kernel.

$Version

"8.0 for Mac OS X x86 (64-bit) (February 23, 2011)"

Bobby

On Thu, 28 Apr 2011 05:37:05 -0500, Barak Shoshany <bar...@gmail.com>
wrote:


--
DrMaj...@yahoo.com

Patrick Scheibe

unread,
Apr 30, 2011, 5:52:53 AM4/30/11
to
Hi,

same behavoir here (Ubuntu 64bit, Kernel crashes after 20 sec.).

I assume Mathematica runs into trouble while recognizing the tiny
differences of your coordinates when it tries to triangulate the points
to make an interpolation possible. Adding a bit perturbation to your
data helps on my machine (although there is of course the possibility
that the random pertubation is badly choosen by some incompetent random
generator):

data = {{0.42256875000000005`, 3091.38125`,

8.271213205043878`}, {0.42256875000000005`, 3092.00625`,
6.266039117378199`}, {0.4263187500000001`, 3091.38125`,
5.613752062730342`}, {0.4263187500000001`,
3092.00625`, -5.684341886080802`*^-14}, {0.4263187500000001`,
3092.63125`, 5.599651386371079`}, {0.43006875000000006`,

3092.00625`, 6.059667975471868`}} /. {x_, y_,
z_} :> {x + RandomReal[{-10^-10, 10^-10}],
y + RandomReal[{-10^-10, 10^-10}], z};
ListContourPlot[data]

Cheers
Patrick

Barak Shoshany

unread,
Apr 30, 2011, 5:53:47 AM4/30/11
to
On Apr 29, 2:31 pm, DrMajorBob <btre...@austin.rr.com> wrote:
> At my iMac, the computation didn't "hang", but it seemed to, for a few
> seconds, and then murdered the kernel.
>
> $Version
>
> "8.0 for Mac OS X x86 (64-bit) (February 23, 2011)"
>
> Bobby
>
> On Thu, 28 Apr 2011 05:37:05 -0500, Barak Shoshany <bara...@gmail.com>
> wrote:
>
>
>
>
>
>
>
>
>
> > Please copy and paste this into a Mathematica notebook:
>
> > ListContourPlot[{{0.42256875000000005`, 3091.38125`,
> > 8.271213205043878`}, {0.42256875000000005`, 3092.00625`,
> > 6.266039117378199`}, {0.4263187500000001`, 3091.38125`,
> > 5.613752062730342`}, {0.4263187500000001`,
> > 3092.00625`, -5.684341886080802`*^-14}, {0.4263187500000001`,
> > 3092.63125`, 5.599651386371079`}, {0.43006875000000006`,
> > 3092.00625`, 6.059667975471868`}}]
>
> > When I execute this code on my computer (Mathematica v8.0.1, Windows 7
> > x64), the Mathematica kernel hangs. Does this happen to anyone else as
> > well?
>
> > Barak
>
> --
> DrMajor...@yahoo.com

So... What am I supposed to do? Is this a bug in Mathematica? If so,
is there someone at Wolfram I can report it to?

By the way, if you subtract 3000 from the y values this works without
problem. Weird.

Barak

Ulf-Dietrich Braumann

unread,
May 1, 2011, 6:22:36 AM5/1/11
to
Hi, on my 8.0.1 installation (32bit WinXP), your small ListContourPlot
example is processed without any problems, no delay, no crash, etc.

Regards - Ulf-Dietrich

Barak Shoshany

unread,
May 2, 2011, 6:52:59 AM5/2/11
to
On May 1, 1:22 pm, Ulf-Dietrich Braumann <braum...@uni-leipzig.de>
wrote:

Perhaps the problem only occurs on 64-bit systems.

Yves Klett

unread,
May 2, 2011, 6:53:31 AM5/2/11
to
Hi,

I can confirm the crash with the pasted code on Win7 64 bit.

Regards,
Yves

Berthold Hamburger

unread,
May 2, 2011, 6:53:53 AM5/2/11
to
Hi Ulf-Dietrich,

Yes, it happens on my Win7/64bit as well. It eventually crashes and I have
to terminate the program.

Regards

Berthold

--
Berthold Hamburger - Cellist/Spain
Email: beh...@artinso.com
http://www.artinso.com
http://www.astronomy.artinso.com


> -----Original Message-----
> From: Ulf-Dietrich Braumann [mailto:brau...@uni-leipzig.de]
> Sent: domingo, 01 de mayo de 2011 12:22
> To: math...@smc.vnet.net
> Subject: Re: Bug in ListContourPlot?
>
> Hi, on my 8.0.1 installation (32bit WinXP), your small ListContourPlot
example
> is processed without any problems, no delay, no crash, etc.
>
> Regards - Ulf-Dietrich
>
>
> On Thu, 28 Apr 2011, Barak Shoshany wrote:
>

Peter Pein

unread,
May 6, 2011, 7:23:58 AM5/6/11
to
Am 28.04.2011 12:36, schrieb Barak Shoshany:
Hi!

Just a (late) proposal for cases like this:

Try to rationalize the values, but _not_ to full precision:

ListContourPlot[
tbl = Rationalize[intbl={{0.42256875000000005`, 3091.38125`,


8.271213205043878`}, {0.42256875000000005`, 3092.00625`,
6.266039117378199`}, {0.4263187500000001`, 3091.38125`,
5.613752062730342`}, {0.4263187500000001`,
3092.00625`, -5.684341886080802`*^-14}, {0.4263187500000001`,
3092.63125`, 5.599651386371079`}, {0.43006875000000006`,

3092.00625`, 6.059667975471868`}}, 10^-$MachinePrecision]]

works great on Version 8.01/Win7-64 and reveals a set of levels of
contours like concentric squares.
But be sure, not to use "Rationalize[....,0]"!


As a measure for the error,

tbl - intbl // Flatten // Norm

--> 8.98526*10^-16

seems small enough to me.

Cheers,
Peter

Reply all
Reply to author
Forward
0 new messages