Message Boards Message Boards

0
|
420 Views
|
4 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Erratic spikes in graph from Plot3D

Posted 1 month ago

The function eFunc returns None outside a curve. At the edge of the curve, the Plot3D plot has spikes. These are spurious: They are not there in the function. And in fact, the spikes change location depending on the range of y!!! I instrumented eFunc to record (in "record") the result of every call to eFunc. As you see in demo.nb, there are no values in any of the calls to eFunc that give a value corresponding to the spikes.

And then ListPlot3D@record produces the desired plot without the spikes.

Sigh. I think that when "working" with Mathematica, I spend half of my time dealing with stuff that is obscure, badly documented, doesn't match the documentation, or (in this case) just doesn't work right.

I don't think I'm asking for help ... the only "help" I would want would be for the Mathematica staff to jump up and send me a corrected Plot3D.

Oh: I'm running 12.2 on Windows 10. At the moment, I'm facing more or less East.

POSTED BY: David Golber
4 Replies

Beyond the useful possibilities Michael notes, I will emphasize that we cannot readily address what we cannot run. A full example containing code for eFunc would address this shortcoming.

POSTED BY: Daniel Lichtblau
Posted 26 days ago

Here's a simple example.

Attachments:
POSTED BY: David Golber

Unfortunately I cannot replicate those spikes using version 13.2 or 14.0 on Ubuntu Linux. It might be platform dependent.

POSTED BY: Daniel Lichtblau

A point outside a domain can test inside at machine precision either (1) from round-off error or (2) because machine-precisions comparisons are done with tolerance.

The points Plot3D plugs into the function depend on the y range. Change it and I would expect different spikes, if the first paragraph explains the behavior.

I don't have a definitive fix. I base mine on the function being plotted. I might use WorkingPrecision, Internal`$EqualTolerance, SetPrecision, RegionFunction, Exclusions, "ExtrapolationHandler" in interpolating functions, and maybe other things. I probably can't add much more specificity without a specific function to address.

POSTED BY: Michael Rogers
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract