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"]
up vote 1 down vote accepted

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:

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.