1
$\begingroup$

I'm used to resetting plot options using Show, but it does not seem to respond to ColorFunction. Should it? Simple example:

test = Plot3D[x^2 + y^2, {x, -1, 1}, {y, -1, 1}]
Show[test, ColorFunction -> "GrayTones"]
$\endgroup$
1
$\begingroup$

I think it shouldn't. Show can impose new values to options that apply to the Graphics object generated by the plotting functions, but it cannot be used to impose new values to options that only apply within those plotting functions.

In other words, Plot understands and interprets ColorFunction to generate an appropriately formatted Graphics object (i.e. test). Once that's done, however, Graphics does not understand a new setting of ColorFunction when Show tries to impose it. On the other hand, you could e.g. switch axes on and off using Show[test, Axes -> False], because Axes is a valid option to Graphics / Graphics3D.

See also the discussion in:

$\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.