2
$\begingroup$

How can I choose the PlotStyle such that the four surfaces are visible (at least to some extent) in the following plot

 Plot3D[{Sin[0.5 x y], Cos[0.5 x y], Sin[x y], Cos[x y]}, {x, 0, 
  2 \[Pi]}, {y, 0, 2 \[Pi]}]

Edit: To be specific, I want these plots should look different from each other when one takes a black and white printout.

$\endgroup$
  • 1
    $\begingroup$ What exactly are you asking? All surfaces are visible when I run your command. $\endgroup$ – Natas Jul 15 '20 at 12:49
  • $\begingroup$ Maybe add some transparency? PlotStyle -> Opacity[.4] $\endgroup$ – flinty Jul 15 '20 at 12:59
  • $\begingroup$ @Natas, I mean when someone takes a black n white printout of this plot, he/she should be able to make the distinction in the surfaces to some extent. $\endgroup$ – Rob Jul 15 '20 at 13:08
6
$\begingroup$
(* 12.1 *)
styles = {{Gray}, {HalftoneShading[], 
    White}, {HatchShading[.5], White}, {StippleShading[.3], White}};
Plot3D[{Sin[0.5 x y], Cos[0.5 x y], Sin[x y], Cos[x y]}, {x, 0, 
  2 π}, {y, 0, 2 π}, PlotStyle -> styles, Mesh -> None, 
 Lighting -> "Accent", PlotPoints -> 50]

enter image description here

$\endgroup$
1
$\begingroup$

From the comments you seem to want a grayscale visible colorscheme. There are plenty of them, in Mathematica, check the documentation to ColorData. Also check the viridis colormap in mathematica: Colormaps for linear visual perception AND grayscale printing

With the colorscheme "AvocadoColors" you can get something like this:

color = ColorData["AvocadoColors"][#] & /@ Subdivide[0.2, 1, 3];
p = Plot3D[{Sin[0.5 x y], Cos[0.5 x y], Sin[x y], Cos[x y]}, {x, 0, 
   2 \[Pi]}, {y, 0, 2 \[Pi]}, PlotStyle -> color]
ColorConvert[p, "Grayscale"]

enter image description here

$\endgroup$
  • $\begingroup$ Thanks, @Mr Puh, it would be nice if one can have these curves with different mesh styles, so that in black-n-white mode, one can actually differentiate these surfaces easily. Something like this: one surface with mesh lines, one with mesh dashed lines, one with mesh dotted lines, and one without mesh. $\endgroup$ – Rob Jul 16 '20 at 16:49
  • $\begingroup$ Use the option MeshStyle of Plot3D. $\endgroup$ – Mr Puh Jul 16 '20 at 17:54

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.