Legacy Documentation

Dynamic Visualizer (2008)

This is documentation for an obsolete product.
Current products and services

Documentation / DynamicVisualizer /

Appendix 6:

Using DisplayFunction

A6.1 Using DisplayFunction

This section delves into the technical aspects of how Mathematica creates graphics.

In[1]:=

In[2]:=

When graphics are created in Mathematica, the default behavior is to create them automatically inside the notebook. It is possible to redefine the default behavior to send graphics to Dynamic Visualizer.

Each graphics command, such as Plot3D, includes DisplayFunction as one of its options.

In[3]:=

Out[3]=

The default behavior for all three-dimensional plotting commands is to use $DisplayFunction, which then generates PostScript output in the notebook.

In[4]:=

In[5]:=

In[6]:=

Out[6]=

To override this behavior, you can always include an explicit DisplayFunction option when generating the graphics. You can send the graphics to Dynamic Visualizer immediately.

Typical settings for DisplayFunction option

Alternatively, you can change the default behavior for all graphics commands by changing $DisplayFunction. For example, you can make objects appear in Dynamic Visualizer.

In[7]:=

Out[7]=

After setting this default, Plot3D will create graphics in Dynamic Visualizer (unless you include an explicit DisplayFunction option).

In[8]:=

This produces the following graphic in Dynamic Visualizer.

The SurfaceGraphics in Dynamic Visualizer.

This sets $DisplayFunction back to its original value.

In[9]:=

Out[9]=

Note that $SystemDisplayFunction is actually defined by the Dynamic Visualizer package when it is first loaded.