0
$\begingroup$

I'm plotting a surface with Plot3D, and I'm using PlotStyle -> Opacity[0.8] to get a little transparency. Unfortunately, this option seems to be getting pushed to BoundaryStyle and MeshStyle as well, resulting in the plot below:

enter image description here

I can't speak for v11 at the moment, but I've checked that this does not happen in v10:

enter image description here

Both of these plots were generated with the following command:

 Plot3D[(1 - x) (1 - y/2), {x, 0, 1}, {y, 0, 1}, 
 BoxRatios -> {1, 1, 0.8}, PlotStyle -> Opacity[0.8], 
 ImageSize -> 600, ViewVector -> 2 {1, 0.9, 0.9}, 
 ViewVertical -> {0, 0, 1}]

Specifying opacity for BoundaryStyle or MeshStyle does not override the value set by PlotStyle. The question is why is this happening? Is it a v12 bug?

$\endgroup$
  • $\begingroup$ I'm running V12 on macOS 10.14.4 and my mesh lines and boundary line both appear to be solid black. It may be an OS specific issue. If you're running Windows or Linux, perhaps someone else will be able to confirm. $\endgroup$ – MassDefect Apr 26 at 15:58
1
$\begingroup$

The style isn't getting propogated as you believe. If you use Opacity[0], you'll still see a mesh. I'm can't tell you blow-by-blow what's happening, but roughly speaking the rendering of the Graphics3D has changed slightly and the mesh lines appear thinner. If you copy the output from V10 and paste in into V12, you'll see that the two plots are indistinguishable (you could do this the other way, but you'd need to to correct for the fact that the V12 Plot3D is using a syntax that V10 doesn't understand by evaluating graphics /. (PlotRange -> _) -> (PlotRange -> {{0, 1}, {0, 1}, {0., 1.}})).

Experimentally, adding MeshStyle -> AbsoluteThickness[1] will more or less restore the V10 appearance.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.