Skip to main content
edited tags
Link
Tweeted twitter.com/#!/StackMma/status/203172013261586432
Source Link
Michael Wijaya
  • 2.2k
  • 16
  • 29

What does DisplayFunction->Identity do to graphics functions?

Does DisplayFunction->Identity do anything at all in Mathematica 8?

In the third edition of Programming in Mathematica, Roman Maeder gives the following explanation:

The option setting DisplayFunction->Identity causes the graphics functions Plot[], Plot3D[], ParametricPlot[], and so on to generate the graphics in the normal way, but not to render the images. We use it if we want to manipulate the graphics further. Afterwards, we can render the images with Show[graphics,DisplayFunction->$DisplayFunction].

He is referring to the following piece of code:

z = x + I y;
cz = {Re[z], Im[z]};
vlines = Table[ N[cz], {x, -Pi/2, Pi/2, Pi/12} ];
vg = ParametricPlot[ Evaluate[vlines], {y, -1, 1}, DisplayFunction -> Identity ][[1]]

SameQ tells me that even without DisplayFunction->Identity, I will still get the same result for vg. Is Maeder's precaution no longer necessary in Mathematica 8?