I really like the 3D plots in Mathematica with the PlotTheme option set to "Classic". I wonder if there's a way to export the colormap (RGB, alpha-array) for use in some other open-source software, and also which function is used to choose the color.

I'd be very glad, if you can give me a (hint to a) solution.

TIA

  • 1
    The "Classic" color scheme for Plot3D colors the polygons white and uses custom lighting to give the illusion of different colors. – Chip Hurst Sep 14 at 12:00
  • Hi Chip, thanks for your answer! Is there a way to reproduce this effect and get similar plots with matlab/matplotlib/mayavi – J.Doe Sep 14 at 12:21
  • I've turned my comment into an answer. – Chip Hurst Sep 14 at 12:35
up vote 6 down vote accepted

The "Classic" theme for Plot3D colors the surface white and uses custom lighting. It can be recreated with these options:

Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}, 
  PlotStyle -> White, 
  Lighting -> {
    {"Ambient", RGBColor[0.312, 0.188, 0.4]}, 
    {"Directional", RGBColor[0.8, 0, 0], ImageScaled[{2, 0, 2}]},
    {"Directional", RGBColor[0, 0.8, 0], ImageScaled[{2, 2, 2}]}, 
    {"Directional", RGBColor[0, 0, 0.8], ImageScaled[{0, 2, 2}]}
  }
]

enter image description here

I'm not sure how to export lighting or recreate it in other applications though.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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