Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

This should be a really simple question, but it isn't in the documentation for some perverse reason. I like the default ColorFunction that Mathematica uses for Plot3D and the like. I'd like to use the same color scheme for other Mathematica plots that don't have it as the automatic default. However, after looking through all of the Color Gradients listed by ColorData["Gradients"] I can't find any that match the effect of just setting ColorFunction->Automatic.

My question: What does Mathematica call its default color palette, why isn't it listed in ColorData, and how can I access it to apply it to other plots?

share|improve this question
    
I think the default color scheme comes from PlotStyle -> White, Lighting -> Automatic, without setting any ColorFunction. –  Silvia Jun 25 '13 at 17:18

2 Answers 2

I think the default color scheme comes from PlotStyle -> White, Lighting -> Automatic, without setting any ColorFunction.

Please compare the results of these two commands:

Row[{
    Plot3D[Sin[x y], {x, 0, 3}, {y, 0, 3}, ImageSize -> 200],
    Plot3D[Sin[x y], {x, 0, 3}, {y, 0, 3}, ImageSize -> 200,
           PlotStyle -> White,
           Lighting -> Automatic]
   }]

image comparison

Also, the documentation for Lighting states "If a color function is given to a plot, then neutral lighting is used automatically". Please compare the results of the following commands:

Row[{
    Plot3D[Sin[x y], {x, 0, 3}, {y, 0, 3}, ImageSize -> 200,
           ColorFunction -> (White &)],
    Show[
         Plot3D[Sin[x y], {x, 0, 3}, {y, 0, 3}, ImageSize -> 200,
                ColorFunction -> (White &)],
         Lighting -> Automatic]
  }]

image comparison 2

share|improve this answer

The howto/ChangeTheLightingOfPlots section of the documentation centre specifies the default lighting settings:

Graphics3D[Sphere[], 
 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}]}}]

So, the object coloring derives from using colored lights, not from a coloring function.

share|improve this answer
    
Aha I know I saw it somewhere! (+1) –  Silvia Jun 25 '13 at 21:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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