Message Boards Message Boards

1
|
4082 Views
|
4 Replies
|
5 Total Likes
View groups...
Share
Share this post:

3DPlot at discontinuities

Posted 10 years ago
Hi, 
I am trying to plot the 3D graphs of 1/(x+1) function. At the point x=-1 (where function turns to infinity) Mathematica plots a vertical surface. 
I tried to use "Exclusions". It removes the vertical line but there are still two horizontal surfaces near the point of discontinuity.
Can it be avoided anyhow without losing the precision of the graph and cutting the plot? Actualy I need a plot of another function, where I just can't change the plot range for some reasons

Thanks in advance.
4 Replies

In 14.0.0, you also have

Plot3D[1/(x + 1), {x, -2, 2}, {y, -1, 1}, MaxRecursion -> 4, 
 ClippingStyle -> None]

or

Plot3D[1/(x + 1), {x, -2, 2}, {y, -1, 1}, 
 Exclusions -> "Singularities", ClippingStyle -> None]
Thanks a lot for your replies.

Marco I think I found a better way:
Plot3D[1/(x + 1), {x, -2, 2}, {y, 0, 2}, Exclusions -> {x == -1},
PlotRange -> {{-2, 2}, {0, 2}, {-5, 5}}, ClippingStyle -> None]
ClippingStyle is an option that specifies the style of what should be drawn when curves or surfaces would extend beyond the plot range.
http://reference.wolfram.com/mathematica/ref/ClippingStyle.html

This way one is free to specify the plot range.
The "horizontal surfaces" you refer to seem to be a side effect of Mathematica's attempt to find a good z-range to plot. They can be avoided by specifying the PlotRange like so
Plot3D[1/(x + 1), {x, -2, 2}, {y, 0, 2}, Exclusions -> {x == -1}, PlotRange -> All]
M.
POSTED BY: Marco Thiel
Posted 10 years ago
Plot each segment with a separate Plot3D,
combine those plots with Show
and make appropriate use of PlotRegion so that all the segments appear?

Futzing around trying to make the graphics appear close to what you actually want seems to usually take three to five times longer than just getting the math close to correct. Change that scale factor to ten to infinity when you raise the bar to getting exactly the appearance that you want.
POSTED BY: Bill Simpson
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