# ContourPlot ClippingStyle?

In Plot3D, Mathematica by default imposes a scheme for clipping the plot if it exceeds the PlotRange. You can change the default with the option ClippingStyle.

Why is there no similar option in ContourPlot3D? Or is there a way? I'd like both of these plots to look identical.

Plot3D[x^-x + y^-y, {x, 0, 3}, {y, 0, 3}, BoxRatios -> {1, 1, 1},
PlotRange -> {0, 2.5}]

ContourPlot3D[x^-x + y^-y == z, {x, 0, 3}, {y, 0, 3}, {z, 0, 2.5}]

• let me know if my answer makes sense or if there are any gaps in logic. – Kuba Jun 27 '17 at 11:04

Plot3D samples 2D domain and calculates values of provided expression for those points. If those calculated values exceed PlotRange then we have a clipping. Since domain is 2D, the PlotRange takes part in generating primitives.

ContourPlot3D samples 3D domain and (more or less) calculates values of x^-x + y^-y - z trying to find positions where those values change sign, contours. It has no idea about parts of the contour which are outside the initial domain because it was not sampled at all. Initial domain is already 3D so PlotRange does not affect primitives generation, only rendering. It could but It does not have to.

One could argue, what if ContourPlot3D's PlotRange is narrower than provided domain. The answer is, the plot was not clipped, you just don't see everything, as per request.

Take a look at this example, a contour needed for full domain was calculated even with smaller PlotRange. We can change the range later to confirm:

n = 2;

Show[
ContourPlot3D[x^-x + y^-y == z, {x, 0, 3}, {y, 0, 3}, {z, 0, 2.5}
, PlotRange -> {{0, 1}, {0, 1}, {0, 1}}
]
, PlotRange -> Dynamic[n {{0, 1}, {0, 1}, {0, 1}}]
]

Slider[Dynamic[n], {1, 5}] Related

Modular surface of tri-focal Cassini curve ContourPlot3D missing feet