16
$\begingroup$

I am trying to create Plot3D with same color as we used to get in V9 but without success. I used PlotTheme -> "Classic" in V10 but the results looks like somehow not the same as V9. I have also copied the FullForm between V9 and V10 and again the plots are different.

does anyone know the reason behind this?

V9:

enter image description here

V10:

enter image description here

$\endgroup$
  • 1
    $\begingroup$ PlotTheme->"Classic" should be setting Lighting->"Classic" to get the old lights. $\endgroup$ – Brett Champion Jul 12 '14 at 2:26
16
$\begingroup$

An alternative to @Rahul's suggested fix:

Plot3D[Sin[x+y^2],{x,-3,3},{y,-2,2}, PlotTheme->{"Classic","ClassicLights"}]

enter image description here

The associated Lighting setting matches the one in Rahul's post:

 "DefaultLighting"/.(Method /.Charting`ResolvePlotTheme["ClassicLights", Plot3D])
 (* {{"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}]}} *)

Update: Few more combinations of options that give the same result:

Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}, PlotTheme -> "Classic", Lighting -> "Classic"]
(* thanks: Algohi *)

Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}, Lighting -> "Classic", PlotTheme->None]
$\endgroup$
  • $\begingroup$ Ah! This is the better solution! $\endgroup$ – Rahul Jul 12 '14 at 1:37
  • $\begingroup$ @kguler I have got this works also Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}, PlotTheme -> "Classic", Lighting -> "Classic"] $\endgroup$ – Algohi Jul 12 '14 at 4:11
  • $\begingroup$ @Algohi, nice find! Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}, Lighting -> "Classic", PlotTheme->None] also works. $\endgroup$ – kglr Jul 12 '14 at 4:25
  • $\begingroup$ Since this is the canonical solution, I'll delete my answer and leave this here: the previous default lighting settings. $\endgroup$ – Rahul Jul 12 '14 at 4:55
  • $\begingroup$ In the Trial version of Mathematica 10 just PlotTheme->"Classic" does very little (it worked well in Prerelease 13). But adding PlotTheme -> {"Classic", "ClassicLights"} does get back to Version 9 (and earlier) coloring. Why would they want to change this anyway?? $\endgroup$ – user44641 Aug 19 '14 at 0:54
2
$\begingroup$

It quite possible that the default lighting has not changed, but that PlotTheme -> "Classic" introduces an explicit color function. That would make a difference because as it says under Lighting in the docs:

Lighting->Automatic uses ambient light together with four light sources fixed relative to the final displayed image. With the typical default setting ColorFunction->Automatic, colored light sources are used; if an explicit setting for ColorFunction is given, the light sources are taken to be white. »

Further, PlotTheme says that "Classic" is a

historical design of plots to remain compatible with existing uses

Note "compatible", not "identical".

$\endgroup$
  • 1
    $\begingroup$ Well, if you compare the first three images on the documentation page "Change the Lighting of Plots", which are supposed to look the same (and did in previous versions), it is clear that the default lighting has changed. $\endgroup$ – Rahul Jul 12 '14 at 3:29

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.